g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"static/js/\" + chunkId + \".\" + \"7f45becd\" + \".chunk.js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var inProgress = {};\nvar dataWebpackPrefix = \"password-timer:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpassword_timer\"] = self[\"webpackChunkpassword_timer\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","export const generatedAttribute = \"generated\";\nexport const mouseDownEvent = \"pointerdown\";\nexport const mouseUpEvent = \"pointerup\";\nexport const mouseLeaveEvent = \"pointerleave\";\nexport const mouseOutEvent = \"pointerout\";\nexport const mouseMoveEvent = \"pointermove\";\nexport const touchStartEvent = \"touchstart\";\nexport const touchEndEvent = \"touchend\";\nexport const touchMoveEvent = \"touchmove\";\nexport const touchCancelEvent = \"touchcancel\";\nexport const resizeEvent = \"resize\";\nexport const visibilityChangeEvent = \"visibilitychange\";\nexport const errorPrefix = \"tsParticles - Error\";\n","import { errorPrefix } from \"./Constants\";\nimport { isNumber } from \"../../Utils/Utils\";\nexport class Vector3d {\n constructor(xOrCoords, y, z) {\n this._updateFromAngle = (angle, length) => {\n this.x = Math.cos(angle) * length;\n this.y = Math.sin(angle) * length;\n };\n if (!isNumber(xOrCoords) && xOrCoords) {\n this.x = xOrCoords.x;\n this.y = xOrCoords.y;\n const coords3d = xOrCoords;\n this.z = coords3d.z ? coords3d.z : 0;\n }\n else if (xOrCoords !== undefined && y !== undefined) {\n this.x = xOrCoords;\n this.y = y;\n this.z = z ?? 0;\n }\n else {\n throw new Error(`${errorPrefix} Vector3d not initialized correctly`);\n }\n }\n static get origin() {\n return Vector3d.create(0, 0, 0);\n }\n get angle() {\n return Math.atan2(this.y, this.x);\n }\n set angle(angle) {\n this._updateFromAngle(angle, this.length);\n }\n get length() {\n return Math.sqrt(this.getLengthSq());\n }\n set length(length) {\n this._updateFromAngle(this.angle, length);\n }\n static clone(source) {\n return Vector3d.create(source.x, source.y, source.z);\n }\n static create(x, y, z) {\n return new Vector3d(x, y, z);\n }\n add(v) {\n return Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n addTo(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n }\n copy() {\n return Vector3d.clone(this);\n }\n distanceTo(v) {\n return this.sub(v).length;\n }\n distanceToSq(v) {\n return this.sub(v).getLengthSq();\n }\n div(n) {\n return Vector3d.create(this.x / n, this.y / n, this.z / n);\n }\n divTo(n) {\n this.x /= n;\n this.y /= n;\n this.z /= n;\n }\n getLengthSq() {\n return this.x ** 2 + this.y ** 2;\n }\n mult(n) {\n return Vector3d.create(this.x * n, this.y * n, this.z * n);\n }\n multTo(n) {\n this.x *= n;\n this.y *= n;\n this.z *= n;\n }\n normalize() {\n const length = this.length;\n if (length != 0) {\n this.multTo(1.0 / length);\n }\n }\n rotate(angle) {\n return Vector3d.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle), 0);\n }\n setTo(c) {\n this.x = c.x;\n this.y = c.y;\n const v3d = c;\n this.z = v3d.z ? v3d.z : 0;\n }\n sub(v) {\n return Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n subFrom(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n }\n}\n","import { Vector3d } from \"./Vector3d\";\nexport class Vector extends Vector3d {\n constructor(xOrCoords, y) {\n super(xOrCoords, y, 0);\n }\n static get origin() {\n return Vector.create(0, 0);\n }\n static clone(source) {\n return Vector.create(source.x, source.y);\n }\n static create(x, y) {\n return new Vector(x, y);\n }\n}\n","import { isBoolean, isNumber } from \"./Utils\";\nimport { Vector } from \"../Core/Utils/Vector\";\nlet _random = Math.random;\nconst easings = new Map();\nexport function addEasing(name, easing) {\n if (easings.get(name)) {\n return;\n }\n easings.set(name, easing);\n}\nexport function getEasing(name) {\n return easings.get(name) || ((value) => value);\n}\nexport function setRandom(rnd = Math.random) {\n _random = rnd;\n}\nexport function getRandom() {\n return clamp(_random(), 0, 1 - 1e-16);\n}\nexport function clamp(num, min, max) {\n return Math.min(Math.max(num, min), max);\n}\nexport function mix(comp1, comp2, weight1, weight2) {\n return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));\n}\nexport function randomInRange(r) {\n const max = getRangeMax(r);\n let min = getRangeMin(r);\n if (max === min) {\n min = 0;\n }\n return getRandom() * (max - min) + min;\n}\nexport function getRangeValue(value) {\n return isNumber(value) ? value : randomInRange(value);\n}\nexport function getRangeMin(value) {\n return isNumber(value) ? value : value.min;\n}\nexport function getRangeMax(value) {\n return isNumber(value) ? value : value.max;\n}\nexport function setRangeValue(source, value) {\n if (source === value || (value === undefined && isNumber(source))) {\n return source;\n }\n const min = getRangeMin(source), max = getRangeMax(source);\n return value !== undefined\n ? {\n min: Math.min(min, value),\n max: Math.max(max, value),\n }\n : setRangeValue(min, max);\n}\nexport function getValue(options) {\n const random = options.random, { enable, minimumValue } = isBoolean(random)\n ? {\n enable: random,\n minimumValue: 0,\n }\n : random;\n return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);\n}\nexport function getDistances(pointA, pointB) {\n const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;\n return { dx: dx, dy: dy, distance: Math.sqrt(dx ** 2 + dy ** 2) };\n}\nexport function getDistance(pointA, pointB) {\n return getDistances(pointA, pointB).distance;\n}\nexport function getParticleDirectionAngle(direction, position, center) {\n if (isNumber(direction)) {\n return (direction * Math.PI) / 180;\n }\n switch (direction) {\n case \"top\":\n return -Math.PI / 2;\n case \"top-right\":\n return -Math.PI / 4;\n case \"right\":\n return 0;\n case \"bottom-right\":\n return Math.PI / 4;\n case \"bottom\":\n return Math.PI / 2;\n case \"bottom-left\":\n return (3 * Math.PI) / 4;\n case \"left\":\n return Math.PI;\n case \"top-left\":\n return (-3 * Math.PI) / 4;\n case \"inside\":\n return Math.atan2(center.y - position.y, center.x - position.x);\n case \"outside\":\n return Math.atan2(position.y - center.y, position.x - center.x);\n default:\n return getRandom() * Math.PI * 2;\n }\n}\nexport function getParticleBaseVelocity(direction) {\n const baseVelocity = Vector.origin;\n baseVelocity.length = 1;\n baseVelocity.angle = direction;\n return baseVelocity;\n}\nexport function collisionVelocity(v1, v2, m1, m2) {\n return Vector.create((v1.x * (m1 - m2)) / (m1 + m2) + (v2.x * 2 * m2) / (m1 + m2), v1.y);\n}\nexport function calcPositionFromSize(data) {\n return data.position && data.position.x !== undefined && data.position.y !== undefined\n ? {\n x: (data.position.x * data.size.width) / 100,\n y: (data.position.y * data.size.height) / 100,\n }\n : undefined;\n}\nexport function calcPositionOrRandomFromSize(data) {\n return {\n x: ((data.position?.x ?? getRandom() * 100) * data.size.width) / 100,\n y: ((data.position?.y ?? getRandom() * 100) * data.size.height) / 100,\n };\n}\nexport function calcPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function calcExactPositionOrRandomFromSize(data) {\n return {\n x: data.position?.x ?? getRandom() * data.size.width,\n y: data.position?.y ?? getRandom() * data.size.height,\n };\n}\nexport function calcExactPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcExactPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function parseAlpha(input) {\n return input ? (input.endsWith(\"%\") ? parseFloat(input) / 100 : parseFloat(input)) : 1;\n}\n","import { collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, getValue, randomInRange, } from \"./NumberUtils\";\nimport { Vector } from \"../Core/Utils/Vector\";\nconst _logger = {\n debug: console.debug,\n error: console.error,\n info: console.info,\n log: console.log,\n verbose: console.log,\n warning: console.warn,\n};\nexport function setLogger(logger) {\n _logger.debug = logger.debug || _logger.debug;\n _logger.error = logger.error || _logger.error;\n _logger.info = logger.info || _logger.info;\n _logger.log = logger.log || _logger.log;\n _logger.verbose = logger.verbose || _logger.verbose;\n _logger.warning = logger.warning || _logger.warning;\n}\nexport function getLogger() {\n return _logger;\n}\nfunction rectSideBounce(data) {\n const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data;\n if (pOtherSide.min < rectOtherSide.min ||\n pOtherSide.min > rectOtherSide.max ||\n pOtherSide.max < rectOtherSide.min ||\n pOtherSide.max > rectOtherSide.max) {\n return res;\n }\n if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) / 2 && velocity > 0) ||\n (pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) / 2 && velocity < 0)) {\n res.velocity = velocity * -factor;\n res.bounced = true;\n }\n return res;\n}\nfunction checkSelector(element, selectors) {\n const res = executeOnSingleOrMultiple(selectors, (selector) => {\n return element.matches(selector);\n });\n return isArray(res) ? res.some((t) => t) : res;\n}\nexport function isSsr() {\n return typeof window === \"undefined\" || !window || typeof window.document === \"undefined\" || !window.document;\n}\nexport function hasMatchMedia() {\n return !isSsr() && typeof matchMedia !== \"undefined\";\n}\nexport function safeMatchMedia(query) {\n if (!hasMatchMedia()) {\n return;\n }\n return matchMedia(query);\n}\nexport function safeMutationObserver(callback) {\n if (isSsr() || typeof MutationObserver === \"undefined\") {\n return;\n }\n return new MutationObserver(callback);\n}\nexport function isInArray(value, array) {\n return value === array || (isArray(array) && array.indexOf(value) > -1);\n}\nexport async function loadFont(font, weight) {\n try {\n await document.fonts.load(`${weight ?? \"400\"} 36px '${font ?? \"Verdana\"}'`);\n }\n catch {\n }\n}\nexport function arrayRandomIndex(array) {\n return Math.floor(getRandom() * array.length);\n}\nexport function itemFromArray(array, index, useIndex = true) {\n return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];\n}\nexport function isPointInside(point, size, offset, radius, direction) {\n return areBoundsInside(calculateBounds(point, radius ?? 0), size, offset, direction);\n}\nexport function areBoundsInside(bounds, size, offset, direction) {\n let inside = true;\n if (!direction || direction === \"bottom\") {\n inside = bounds.top < size.height + offset.x;\n }\n if (inside && (!direction || direction === \"left\")) {\n inside = bounds.right > offset.x;\n }\n if (inside && (!direction || direction === \"right\")) {\n inside = bounds.left < size.width + offset.y;\n }\n if (inside && (!direction || direction === \"top\")) {\n inside = bounds.bottom > offset.y;\n }\n return inside;\n}\nexport function calculateBounds(point, radius) {\n return {\n bottom: point.y + radius,\n left: point.x - radius,\n right: point.x + radius,\n top: point.y - radius,\n };\n}\nexport function deepExtend(destination, ...sources) {\n for (const source of sources) {\n if (source === undefined || source === null) {\n continue;\n }\n if (!isObject(source)) {\n destination = source;\n continue;\n }\n const sourceIsArray = Array.isArray(source);\n if (sourceIsArray && (isObject(destination) || !destination || !Array.isArray(destination))) {\n destination = [];\n }\n else if (!sourceIsArray && (isObject(destination) || !destination || Array.isArray(destination))) {\n destination = {};\n }\n for (const key in source) {\n if (key === \"__proto__\") {\n continue;\n }\n const sourceDict = source, value = sourceDict[key], destDict = destination;\n destDict[key] =\n isObject(value) && Array.isArray(value)\n ? value.map((v) => deepExtend(destDict[key], v))\n : deepExtend(destDict[key], value);\n }\n }\n return destination;\n}\nexport function isDivModeEnabled(mode, divs) {\n return !!findItemFromSingleOrMultiple(divs, (t) => t.enable && isInArray(mode, t.mode));\n}\nexport function divModeExecute(mode, divs, callback) {\n executeOnSingleOrMultiple(divs, (div) => {\n const divMode = div.mode, divEnabled = div.enable;\n if (divEnabled && isInArray(mode, divMode)) {\n singleDivModeExecute(div, callback);\n }\n });\n}\nexport function singleDivModeExecute(div, callback) {\n const selectors = div.selectors;\n executeOnSingleOrMultiple(selectors, (selector) => {\n callback(selector, div);\n });\n}\nexport function divMode(divs, element) {\n if (!element || !divs) {\n return;\n }\n return findItemFromSingleOrMultiple(divs, (div) => {\n return checkSelector(element, div.selectors);\n });\n}\nexport function circleBounceDataFromParticle(p) {\n return {\n position: p.getPosition(),\n radius: p.getRadius(),\n mass: p.getMass(),\n velocity: p.velocity,\n factor: Vector.create(getValue(p.options.bounce.horizontal), getValue(p.options.bounce.vertical)),\n };\n}\nexport function circleBounce(p1, p2) {\n const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = getDistances(pos2, pos1);\n if (xVelocityDiff * xDist + yVelocityDiff * yDist < 0) {\n return;\n }\n const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = collisionVelocity(u1, u2, m1, m2), v2 = collisionVelocity(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);\n p1.velocity.x = vFinal1.x * p1.factor.x;\n p1.velocity.y = vFinal1.y * p1.factor.y;\n p2.velocity.x = vFinal2.x * p2.factor.x;\n p2.velocity.y = vFinal2.y * p2.factor.y;\n}\nexport function rectBounce(particle, divBounds) {\n const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), resH = rectSideBounce({\n pSide: {\n min: bounds.left,\n max: bounds.right,\n },\n pOtherSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n rectSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n rectOtherSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n velocity: particle.velocity.x,\n factor: getValue(particle.options.bounce.horizontal),\n });\n if (resH.bounced) {\n if (resH.velocity !== undefined) {\n particle.velocity.x = resH.velocity;\n }\n if (resH.position !== undefined) {\n particle.position.x = resH.position;\n }\n }\n const resV = rectSideBounce({\n pSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n pOtherSide: {\n min: bounds.left,\n max: bounds.right,\n },\n rectSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n rectOtherSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n velocity: particle.velocity.y,\n factor: getValue(particle.options.bounce.vertical),\n });\n if (resV.bounced) {\n if (resV.velocity !== undefined) {\n particle.velocity.y = resV.velocity;\n }\n if (resV.position !== undefined) {\n particle.position.y = resV.position;\n }\n }\n}\nexport function executeOnSingleOrMultiple(obj, callback) {\n return isArray(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, 0);\n}\nexport function itemFromSingleOrMultiple(obj, index, useIndex) {\n return isArray(obj) ? itemFromArray(obj, index, useIndex) : obj;\n}\nexport function findItemFromSingleOrMultiple(obj, callback) {\n return isArray(obj) ? obj.find((t, index) => callback(t, index)) : callback(obj, 0) ? obj : undefined;\n}\nexport function initParticleNumericAnimationValue(options, pxRatio) {\n const valueRange = options.value, animationOptions = options.animation, res = {\n delayTime: getRangeValue(animationOptions.delay) * 1000,\n enable: animationOptions.enable,\n value: getRangeValue(options.value) * pxRatio,\n max: getRangeMax(valueRange) * pxRatio,\n min: getRangeMin(valueRange) * pxRatio,\n loops: 0,\n maxLoops: getRangeValue(animationOptions.count),\n time: 0,\n };\n if (animationOptions.enable) {\n res.decay = 1 - getRangeValue(animationOptions.decay);\n switch (animationOptions.mode) {\n case \"increase\":\n res.status = \"increasing\";\n break;\n case \"decrease\":\n res.status = \"decreasing\";\n break;\n case \"random\":\n res.status = getRandom() >= 0.5 ? \"increasing\" : \"decreasing\";\n break;\n }\n const autoStatus = animationOptions.mode === \"auto\";\n switch (animationOptions.startValue) {\n case \"min\":\n res.value = res.min;\n if (autoStatus) {\n res.status = \"increasing\";\n }\n break;\n case \"max\":\n res.value = res.max;\n if (autoStatus) {\n res.status = \"decreasing\";\n }\n break;\n case \"random\":\n default:\n res.value = randomInRange(res);\n if (autoStatus) {\n res.status = getRandom() >= 0.5 ? \"increasing\" : \"decreasing\";\n }\n break;\n }\n }\n res.initialValue = res.value;\n return res;\n}\nfunction getPositionOrSize(positionOrSize, canvasSize) {\n const isPercent = positionOrSize.mode === \"percent\";\n if (!isPercent) {\n const { mode: _, ...rest } = positionOrSize;\n return rest;\n }\n const isPosition = \"x\" in positionOrSize;\n if (isPosition) {\n return {\n x: (positionOrSize.x / 100) * canvasSize.width,\n y: (positionOrSize.y / 100) * canvasSize.height,\n };\n }\n else {\n return {\n width: (positionOrSize.width / 100) * canvasSize.width,\n height: (positionOrSize.height / 100) * canvasSize.height,\n };\n }\n}\nexport function getPosition(position, canvasSize) {\n return getPositionOrSize(position, canvasSize);\n}\nexport function getSize(size, canvasSize) {\n return getPositionOrSize(size, canvasSize);\n}\nexport function isBoolean(arg) {\n return typeof arg === \"boolean\";\n}\nexport function isString(arg) {\n return typeof arg === \"string\";\n}\nexport function isNumber(arg) {\n return typeof arg === \"number\";\n}\nexport function isFunction(arg) {\n return typeof arg === \"function\";\n}\nexport function isObject(arg) {\n return typeof arg === \"object\" && arg !== null;\n}\nexport function isArray(arg) {\n return Array.isArray(arg);\n}\n","import { getRandom, getRangeValue, mix, randomInRange, setRangeValue } from \"./NumberUtils\";\nimport { isArray, isString, itemFromArray } from \"./Utils\";\nconst randomColorValue = \"random\", midColorValue = \"mid\", colorManagers = new Map();\nexport function addColorManager(manager) {\n colorManagers.set(manager.key, manager);\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction stringToRgba(input) {\n for (const [, manager] of colorManagers) {\n if (input.startsWith(manager.stringPrefix)) {\n return manager.parseString(input);\n }\n }\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])?$/i, hexFixed = input.replace(shorthandRegex, (_, r, g, b, a) => {\n return r + r + g + g + b + b + (a !== undefined ? a + a : \"\");\n }), regex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})?$/i, result = regex.exec(hexFixed);\n return result\n ? {\n a: result[4] !== undefined ? parseInt(result[4], 16) / 0xff : 1,\n b: parseInt(result[3], 16),\n g: parseInt(result[2], 16),\n r: parseInt(result[1], 16),\n }\n : undefined;\n}\nexport function rangeColorToRgb(input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return colorToRgb(color.value, index, useIndex);\n }\n if (isArray(color.value)) {\n return rangeColorToRgb({\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const [, manager] of colorManagers) {\n const res = manager.handleRangeColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToRgb(input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return color.value === randomColorValue ? getRandomRgbColor() : stringToRgb(color.value);\n }\n if (isArray(color.value)) {\n return colorToRgb({\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const [, manager] of colorManagers) {\n const res = manager.handleColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToHsl(color, index, useIndex = true) {\n const rgb = colorToRgb(color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rangeColorToHsl(color, index, useIndex = true) {\n const rgb = rangeColorToRgb(color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rgbToHsl(color) {\n const r1 = color.r / 255, g1 = color.g / 255, b1 = color.b / 255, max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1), res = {\n h: 0,\n l: (max + min) / 2,\n s: 0,\n };\n if (max !== min) {\n res.s = res.l < 0.5 ? (max - min) / (max + min) : (max - min) / (2.0 - max - min);\n res.h =\n r1 === max\n ? (g1 - b1) / (max - min)\n : (res.h = g1 === max ? 2.0 + (b1 - r1) / (max - min) : 4.0 + (r1 - g1) / (max - min));\n }\n res.l *= 100;\n res.s *= 100;\n res.h *= 60;\n if (res.h < 0) {\n res.h += 360;\n }\n if (res.h >= 360) {\n res.h -= 360;\n }\n return res;\n}\nexport function stringToAlpha(input) {\n return stringToRgba(input)?.a;\n}\nexport function stringToRgb(input) {\n return stringToRgba(input);\n}\nexport function hslToRgb(hsl) {\n const result = { b: 0, g: 0, r: 0 }, hslPercent = {\n h: hsl.h / 360,\n l: hsl.l / 100,\n s: hsl.s / 100,\n };\n if (!hslPercent.s) {\n result.r = result.g = result.b = hslPercent.l;\n }\n else {\n const q = hslPercent.l < 0.5\n ? hslPercent.l * (1 + hslPercent.s)\n : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s, p = 2 * hslPercent.l - q;\n result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);\n result.g = hue2rgb(p, q, hslPercent.h);\n result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);\n }\n result.r = Math.floor(result.r * 255);\n result.g = Math.floor(result.g * 255);\n result.b = Math.floor(result.b * 255);\n return result;\n}\nexport function hslaToRgba(hsla) {\n const rgbResult = hslToRgb(hsla);\n return {\n a: hsla.a,\n b: rgbResult.b,\n g: rgbResult.g,\n r: rgbResult.r,\n };\n}\nexport function getRandomRgbColor(min) {\n const fixedMin = min ?? 0;\n return {\n b: Math.floor(randomInRange(setRangeValue(fixedMin, 256))),\n g: Math.floor(randomInRange(setRangeValue(fixedMin, 256))),\n r: Math.floor(randomInRange(setRangeValue(fixedMin, 256))),\n };\n}\nexport function getStyleFromRgb(color, opacity) {\n return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity ?? 1})`;\n}\nexport function getStyleFromHsl(color, opacity) {\n return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${opacity ?? 1})`;\n}\nexport function colorMix(color1, color2, size1, size2) {\n let rgb1 = color1, rgb2 = color2;\n if (rgb1.r === undefined) {\n rgb1 = hslToRgb(color1);\n }\n if (rgb2.r === undefined) {\n rgb2 = hslToRgb(color2);\n }\n return {\n b: mix(rgb1.b, rgb2.b, size1, size2),\n g: mix(rgb1.g, rgb2.g, size1, size2),\n r: mix(rgb1.r, rgb2.r, size1, size2),\n };\n}\nexport function getLinkColor(p1, p2, linkColor) {\n if (linkColor === randomColorValue) {\n return getRandomRgbColor();\n }\n else if (linkColor === midColorValue) {\n const sourceColor = p1.getFillColor() ?? p1.getStrokeColor(), destColor = p2?.getFillColor() ?? p2?.getStrokeColor();\n if (sourceColor && destColor && p2) {\n return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());\n }\n else {\n const hslColor = sourceColor ?? destColor;\n if (hslColor) {\n return hslToRgb(hslColor);\n }\n }\n }\n else {\n return linkColor;\n }\n}\nexport function getLinkRandomColor(optColor, blink, consent) {\n const color = isString(optColor) ? optColor : optColor.value;\n if (color === randomColorValue) {\n if (consent) {\n return rangeColorToRgb({\n value: color,\n });\n }\n if (blink) {\n return randomColorValue;\n }\n return midColorValue;\n }\n else if (color === midColorValue) {\n return midColorValue;\n }\n else {\n return rangeColorToRgb({\n value: color,\n });\n }\n}\nexport function getHslFromAnimation(animation) {\n return animation !== undefined\n ? {\n h: animation.h.value,\n s: animation.s.value,\n l: animation.l.value,\n }\n : undefined;\n}\nexport function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {\n const resColor = {\n h: {\n enable: false,\n value: hsl.h,\n },\n s: {\n enable: false,\n value: hsl.s,\n },\n l: {\n enable: false,\n value: hsl.l,\n },\n };\n if (animationOptions) {\n setColorAnimation(resColor.h, animationOptions.h, reduceFactor);\n setColorAnimation(resColor.s, animationOptions.s, reduceFactor);\n setColorAnimation(resColor.l, animationOptions.l, reduceFactor);\n }\n return resColor;\n}\nfunction setColorAnimation(colorValue, colorAnimation, reduceFactor) {\n colorValue.enable = colorAnimation.enable;\n if (colorValue.enable) {\n colorValue.velocity = (getRangeValue(colorAnimation.speed) / 100) * reduceFactor;\n colorValue.decay = 1 - getRangeValue(colorAnimation.decay);\n colorValue.status = \"increasing\";\n colorValue.loops = 0;\n colorValue.maxLoops = getRangeValue(colorAnimation.count);\n colorValue.time = 0;\n colorValue.delayTime = getRangeValue(colorAnimation.delay) * 1000;\n if (!colorAnimation.sync) {\n colorValue.velocity *= getRandom();\n colorValue.value *= getRandom();\n }\n colorValue.initialValue = colorValue.value;\n }\n else {\n colorValue.velocity = 0;\n }\n}\n","import { getStyleFromRgb } from \"./ColorUtils\";\nexport function drawLine(context, begin, end) {\n context.beginPath();\n context.moveTo(begin.x, begin.y);\n context.lineTo(end.x, end.y);\n context.closePath();\n}\nexport function drawTriangle(context, p1, p2, p3) {\n context.beginPath();\n context.moveTo(p1.x, p1.y);\n context.lineTo(p2.x, p2.y);\n context.lineTo(p3.x, p3.y);\n context.closePath();\n}\nexport function paintBase(context, dimension, baseColor) {\n context.fillStyle = baseColor ?? \"rgba(0,0,0,0)\";\n context.fillRect(0, 0, dimension.width, dimension.height);\n}\nexport function paintImage(context, dimension, image, opacity) {\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n context.drawImage(image, 0, 0, dimension.width, dimension.height);\n context.globalAlpha = 1;\n}\nexport function clear(context, dimension) {\n context.clearRect(0, 0, dimension.width, dimension.height);\n}\nexport function drawParticle(data) {\n const { container, context, particle, delta, colorStyles, backgroundMask, composite, radius, opacity, shadow, transform, } = data;\n const pos = particle.getPosition(), angle = particle.rotation + (particle.pathRotation ? particle.velocity.angle : 0), rotateData = {\n sin: Math.sin(angle),\n cos: Math.cos(angle),\n }, transformData = {\n a: rotateData.cos * (transform.a ?? 1),\n b: rotateData.sin * (transform.b ?? 1),\n c: -rotateData.sin * (transform.c ?? 1),\n d: rotateData.cos * (transform.d ?? 1),\n };\n context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, pos.x, pos.y);\n context.beginPath();\n if (backgroundMask) {\n context.globalCompositeOperation = composite;\n }\n const shadowColor = particle.shadowColor;\n if (shadow.enable && shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n context.shadowOffsetX = shadow.offset.x;\n context.shadowOffsetY = shadow.offset.y;\n }\n if (colorStyles.fill) {\n context.fillStyle = colorStyles.fill;\n }\n const strokeWidth = particle.strokeWidth ?? 0;\n context.lineWidth = strokeWidth;\n if (colorStyles.stroke) {\n context.strokeStyle = colorStyles.stroke;\n }\n drawShape(container, context, particle, radius, opacity, delta);\n if (strokeWidth > 0) {\n context.stroke();\n }\n if (particle.close) {\n context.closePath();\n }\n if (particle.fill) {\n context.fill();\n }\n drawShapeAfterEffect(container, context, particle, radius, opacity, delta);\n context.globalCompositeOperation = \"source-over\";\n context.setTransform(1, 0, 0, 1, 0, 0);\n}\nexport function drawShape(container, context, particle, radius, opacity, delta) {\n if (!particle.shape) {\n return;\n }\n const drawer = container.drawers.get(particle.shape);\n if (!drawer) {\n return;\n }\n drawer.draw(context, particle, radius, opacity, delta, container.retina.pixelRatio);\n}\nexport function drawShapeAfterEffect(container, context, particle, radius, opacity, delta) {\n if (!particle.shape) {\n return;\n }\n const drawer = container.drawers.get(particle.shape);\n if (!drawer || !drawer.afterEffect) {\n return;\n }\n drawer.afterEffect(context, particle, radius, opacity, delta, container.retina.pixelRatio);\n}\nexport function drawPlugin(context, plugin, delta) {\n if (!plugin.draw) {\n return;\n }\n plugin.draw(context, delta);\n}\nexport function drawParticlePlugin(context, plugin, particle, delta) {\n if (!plugin.drawParticle) {\n return;\n }\n plugin.drawParticle(context, particle, delta);\n}\nexport function alterHsl(color, type, value) {\n return {\n h: color.h,\n s: color.s,\n l: color.l + (type === \"darken\" ? -1 : 1) * value,\n };\n}\n","import { clear, drawParticle, drawParticlePlugin, drawPlugin, paintBase, paintImage } from \"../Utils/CanvasUtils\";\nimport { deepExtend, getLogger, safeMutationObserver } from \"../Utils/Utils\";\nimport { getStyleFromHsl, getStyleFromRgb, rangeColorToHsl, rangeColorToRgb } from \"../Utils/ColorUtils\";\nimport { generatedAttribute } from \"./Utils/Constants\";\nfunction setTransformValue(factor, newFactor, key) {\n const newValue = newFactor[key];\n if (newValue !== undefined) {\n factor[key] = (factor[key] ?? 1) * newValue;\n }\n}\nexport class Canvas {\n constructor(container) {\n this.container = container;\n this._applyPostDrawUpdaters = (particle) => {\n for (const updater of this._postDrawUpdaters) {\n updater.afterDraw && updater.afterDraw(particle);\n }\n };\n this._applyPreDrawUpdaters = (ctx, particle, radius, zOpacity, colorStyles, transform) => {\n for (const updater of this._preDrawUpdaters) {\n if (updater.getColorStyles) {\n const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity);\n if (fill) {\n colorStyles.fill = fill;\n }\n if (stroke) {\n colorStyles.stroke = stroke;\n }\n }\n if (updater.getTransformValues) {\n const updaterTransform = updater.getTransformValues(particle);\n for (const key in updaterTransform) {\n setTransformValue(transform, updaterTransform, key);\n }\n }\n updater.beforeDraw && updater.beforeDraw(particle);\n }\n };\n this._applyResizePlugins = () => {\n for (const plugin of this._resizePlugins) {\n plugin.resize && plugin.resize();\n }\n };\n this._getPluginParticleColors = (particle) => {\n let fColor, sColor;\n for (const plugin of this._colorPlugins) {\n if (!fColor && plugin.particleFillColor) {\n fColor = rangeColorToHsl(plugin.particleFillColor(particle));\n }\n if (!sColor && plugin.particleStrokeColor) {\n sColor = rangeColorToHsl(plugin.particleStrokeColor(particle));\n }\n if (fColor && sColor) {\n break;\n }\n }\n return [fColor, sColor];\n };\n this._initCover = () => {\n const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color, coverRgb = rangeColorToRgb(color);\n if (coverRgb) {\n const coverColor = {\n ...coverRgb,\n a: cover.opacity,\n };\n this._coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);\n }\n };\n this._initStyle = () => {\n const element = this.element, options = this.container.actualOptions;\n if (!element) {\n return;\n }\n if (this._fullScreen) {\n this._originalStyle = deepExtend({}, element.style);\n this._setFullScreenStyle();\n }\n else {\n this._resetOriginalStyle();\n }\n for (const key in options.style) {\n if (!key || !options.style) {\n continue;\n }\n const value = options.style[key];\n if (!value) {\n continue;\n }\n element.style.setProperty(key, value, \"important\");\n }\n };\n this._initTrail = async () => {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = trail.fill;\n if (!trail.enable) {\n return;\n }\n if (trailFill.color) {\n const fillColor = rangeColorToRgb(trailFill.color);\n if (!fillColor) {\n return;\n }\n const trail = options.particles.move.trail;\n this._trailFill = {\n color: {\n ...fillColor,\n },\n opacity: 1 / trail.length,\n };\n }\n else {\n await new Promise((resolve, reject) => {\n if (!trailFill.image) {\n return;\n }\n const img = document.createElement(\"img\");\n img.addEventListener(\"load\", () => {\n this._trailFill = {\n image: img,\n opacity: 1 / trail.length,\n };\n resolve();\n });\n img.addEventListener(\"error\", (evt) => {\n reject(evt.error);\n });\n img.src = trailFill.image;\n });\n }\n };\n this._paintBase = (baseColor) => {\n this.draw((ctx) => paintBase(ctx, this.size, baseColor));\n };\n this._paintImage = (image, opacity) => {\n this.draw((ctx) => paintImage(ctx, this.size, image, opacity));\n };\n this._repairStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n this._safeMutationObserver((observer) => observer.disconnect());\n this._initStyle();\n this.initBackground();\n this._safeMutationObserver((observer) => observer.observe(element, { attributes: true }));\n };\n this._resetOriginalStyle = () => {\n const element = this.element, originalStyle = this._originalStyle;\n if (!(element && originalStyle)) {\n return;\n }\n const style = element.style;\n style.position = originalStyle.position;\n style.zIndex = originalStyle.zIndex;\n style.top = originalStyle.top;\n style.left = originalStyle.left;\n style.width = originalStyle.width;\n style.height = originalStyle.height;\n };\n this._safeMutationObserver = (callback) => {\n if (!this._mutationObserver) {\n return;\n }\n callback(this._mutationObserver);\n };\n this._setFullScreenStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n const priority = \"important\", style = element.style;\n style.setProperty(\"position\", \"fixed\", priority);\n style.setProperty(\"z-index\", this.container.actualOptions.fullScreen.zIndex.toString(10), priority);\n style.setProperty(\"top\", \"0\", priority);\n style.setProperty(\"left\", \"0\", priority);\n style.setProperty(\"width\", \"100%\", priority);\n style.setProperty(\"height\", \"100%\", priority);\n };\n this.size = {\n height: 0,\n width: 0,\n };\n this._context = null;\n this._generated = false;\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n get _fullScreen() {\n return this.container.actualOptions.fullScreen.enable;\n }\n clear() {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = this._trailFill;\n if (options.backgroundMask.enable) {\n this.paint();\n }\n else if (trail.enable && trail.length > 0 && trailFill) {\n if (trailFill.color) {\n this._paintBase(getStyleFromRgb(trailFill.color, trailFill.opacity));\n }\n else if (trailFill.image) {\n this._paintImage(trailFill.image, trailFill.opacity);\n }\n }\n else {\n this.draw((ctx) => {\n clear(ctx, this.size);\n });\n }\n }\n destroy() {\n this.stop();\n if (this._generated) {\n const element = this.element;\n element && element.remove();\n }\n else {\n this._resetOriginalStyle();\n }\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n draw(cb) {\n const ctx = this._context;\n if (!ctx) {\n return;\n }\n return cb(ctx);\n }\n drawParticle(particle, delta) {\n if (particle.spawning || particle.destroyed) {\n return;\n }\n const radius = particle.getRadius();\n if (radius <= 0) {\n return;\n }\n const pfColor = particle.getFillColor(), psColor = particle.getStrokeColor() ?? pfColor;\n let [fColor, sColor] = this._getPluginParticleColors(particle);\n if (!fColor) {\n fColor = pfColor;\n }\n if (!sColor) {\n sColor = psColor;\n }\n if (!fColor && !sColor) {\n return;\n }\n this.draw((ctx) => {\n const container = this.container, options = container.actualOptions, zIndexOptions = particle.options.zIndex, zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate, opacity = particle.bubble.opacity ?? particle.opacity?.value ?? 1, strokeOpacity = particle.strokeOpacity ?? opacity, zOpacity = opacity * zOpacityFactor, zStrokeOpacity = strokeOpacity * zOpacityFactor, transform = {}, colorStyles = {\n fill: fColor ? getStyleFromHsl(fColor, zOpacity) : undefined,\n };\n colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;\n this._applyPreDrawUpdaters(ctx, particle, radius, zOpacity, colorStyles, transform);\n drawParticle({\n container,\n context: ctx,\n particle,\n delta,\n colorStyles,\n backgroundMask: options.backgroundMask.enable,\n composite: options.backgroundMask.composite,\n radius: radius * (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate,\n opacity: zOpacity,\n shadow: particle.options.shadow,\n transform,\n });\n this._applyPostDrawUpdaters(particle);\n });\n }\n drawParticlePlugin(plugin, particle, delta) {\n this.draw((ctx) => drawParticlePlugin(ctx, plugin, particle, delta));\n }\n drawPlugin(plugin, delta) {\n this.draw((ctx) => drawPlugin(ctx, plugin, delta));\n }\n async init() {\n this._safeMutationObserver((obs) => obs.disconnect());\n this._mutationObserver = safeMutationObserver((records) => {\n for (const record of records) {\n if (record.type === \"attributes\" && record.attributeName === \"style\") {\n this._repairStyle();\n }\n }\n });\n this.resize();\n this._initStyle();\n this._initCover();\n try {\n await this._initTrail();\n }\n catch (e) {\n getLogger().error(e);\n }\n this.initBackground();\n this._safeMutationObserver((obs) => {\n if (!this.element) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.initUpdaters();\n this.initPlugins();\n this.paint();\n }\n initBackground() {\n const options = this.container.actualOptions, background = options.background, element = this.element;\n if (!element) {\n return;\n }\n const elementStyle = element.style;\n if (!elementStyle) {\n return;\n }\n if (background.color) {\n const color = rangeColorToRgb(background.color);\n elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : \"\";\n }\n else {\n elementStyle.backgroundColor = \"\";\n }\n elementStyle.backgroundImage = background.image || \"\";\n elementStyle.backgroundPosition = background.position || \"\";\n elementStyle.backgroundRepeat = background.repeat || \"\";\n elementStyle.backgroundSize = background.size || \"\";\n }\n initPlugins() {\n this._resizePlugins = [];\n for (const [, plugin] of this.container.plugins) {\n if (plugin.resize) {\n this._resizePlugins.push(plugin);\n }\n if (plugin.particleFillColor || plugin.particleStrokeColor) {\n this._colorPlugins.push(plugin);\n }\n }\n }\n initUpdaters() {\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n for (const updater of this.container.particles.updaters) {\n if (updater.afterDraw) {\n this._postDrawUpdaters.push(updater);\n }\n if (updater.getColorStyles || updater.getTransformValues || updater.beforeDraw) {\n this._preDrawUpdaters.push(updater);\n }\n }\n }\n loadCanvas(canvas) {\n if (this._generated && this.element) {\n this.element.remove();\n }\n this._generated =\n canvas.dataset && generatedAttribute in canvas.dataset\n ? canvas.dataset[generatedAttribute] === \"true\"\n : this._generated;\n this.element = canvas;\n this.element.ariaHidden = \"true\";\n this._originalStyle = deepExtend({}, this.element.style);\n this.size.height = canvas.offsetHeight;\n this.size.width = canvas.offsetWidth;\n this._context = this.element.getContext(\"2d\");\n this._safeMutationObserver((obs) => {\n if (!this.element) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.container.retina.init();\n this.initBackground();\n }\n paint() {\n const options = this.container.actualOptions;\n this.draw((ctx) => {\n if (options.backgroundMask.enable && options.backgroundMask.cover) {\n clear(ctx, this.size);\n this._paintBase(this._coverColorStyle);\n }\n else {\n this._paintBase();\n }\n });\n }\n resize() {\n if (!this.element) {\n return false;\n }\n const container = this.container, pxRatio = container.retina.pixelRatio, size = container.canvas.size, newSize = {\n width: this.element.offsetWidth * pxRatio,\n height: this.element.offsetHeight * pxRatio,\n };\n if (newSize.height === size.height &&\n newSize.width === size.width &&\n newSize.height === this.element.height &&\n newSize.width === this.element.width) {\n return false;\n }\n const oldSize = { ...size };\n this.element.width = size.width = this.element.offsetWidth * pxRatio;\n this.element.height = size.height = this.element.offsetHeight * pxRatio;\n if (this.container.started) {\n this.resizeFactor = {\n width: size.width / oldSize.width,\n height: size.height / oldSize.height,\n };\n }\n return true;\n }\n stop() {\n this._safeMutationObserver((obs) => obs.disconnect());\n this._mutationObserver = undefined;\n this.draw((ctx) => clear(ctx, this.size));\n }\n async windowResize() {\n if (!this.element || !this.resize()) {\n return;\n }\n const container = this.container, needsRefresh = container.updateActualOptions();\n container.particles.setDensity();\n this._applyResizePlugins();\n if (needsRefresh) {\n await container.refresh();\n }\n }\n}\n","import { executeOnSingleOrMultiple, isBoolean, safeMatchMedia } from \"../../Utils/Utils\";\nimport { mouseDownEvent, mouseLeaveEvent, mouseMoveEvent, mouseOutEvent, mouseUpEvent, resizeEvent, touchCancelEvent, touchEndEvent, touchMoveEvent, touchStartEvent, visibilityChangeEvent, } from \"./Constants\";\nfunction manageListener(element, event, handler, add, options) {\n if (add) {\n let addOptions = { passive: true };\n if (isBoolean(options)) {\n addOptions.capture = options;\n }\n else if (options !== undefined) {\n addOptions = options;\n }\n element.addEventListener(event, handler, addOptions);\n }\n else {\n const removeOptions = options;\n element.removeEventListener(event, handler, removeOptions);\n }\n}\nexport class EventListeners {\n constructor(container) {\n this.container = container;\n this._doMouseTouchClick = (e) => {\n const container = this.container, options = container.actualOptions;\n if (this._canPush) {\n const mouseInteractivity = container.interactivity.mouse, mousePos = mouseInteractivity.position;\n if (!mousePos) {\n return;\n }\n mouseInteractivity.clickPosition = { ...mousePos };\n mouseInteractivity.clickTime = new Date().getTime();\n const onClick = options.interactivity.events.onClick;\n executeOnSingleOrMultiple(onClick.mode, (mode) => this.container.handleClickMode(mode));\n }\n if (e.type === \"touchend\") {\n setTimeout(() => this._mouseTouchFinish(), 500);\n }\n };\n this._handleThemeChange = (e) => {\n const mediaEvent = e, container = this.container, options = container.options, defaultThemes = options.defaultThemes, themeName = mediaEvent.matches ? defaultThemes.dark : defaultThemes.light, theme = options.themes.find((theme) => theme.name === themeName);\n if (theme && theme.default.auto) {\n container.loadTheme(themeName);\n }\n };\n this._handleVisibilityChange = () => {\n const container = this.container, options = container.actualOptions;\n this._mouseTouchFinish();\n if (!options.pauseOnBlur) {\n return;\n }\n if (document && document.hidden) {\n container.pageHidden = true;\n container.pause();\n }\n else {\n container.pageHidden = false;\n if (container.getAnimationStatus()) {\n container.play(true);\n }\n else {\n container.draw(true);\n }\n }\n };\n this._handleWindowResize = async () => {\n if (this._resizeTimeout) {\n clearTimeout(this._resizeTimeout);\n delete this._resizeTimeout;\n }\n this._resizeTimeout = setTimeout(async () => {\n const canvas = this.container.canvas;\n canvas && (await canvas.windowResize());\n }, this.container.actualOptions.interactivity.events.resize.delay * 1000);\n };\n this._manageInteractivityListeners = (mouseLeaveTmpEvent, add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n const interactivityEl = container.interactivity.element;\n if (!interactivityEl) {\n return;\n }\n const html = interactivityEl, canvasEl = container.canvas.element;\n if (canvasEl) {\n canvasEl.style.pointerEvents = html === canvasEl ? \"initial\" : \"none\";\n }\n if (!(options.interactivity.events.onHover.enable || options.interactivity.events.onClick.enable)) {\n return;\n }\n manageListener(interactivityEl, mouseMoveEvent, handlers.mouseMove, add);\n manageListener(interactivityEl, touchStartEvent, handlers.touchStart, add);\n manageListener(interactivityEl, touchMoveEvent, handlers.touchMove, add);\n if (!options.interactivity.events.onClick.enable) {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEnd, add);\n }\n else {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEndClick, add);\n manageListener(interactivityEl, mouseUpEvent, handlers.mouseUp, add);\n manageListener(interactivityEl, mouseDownEvent, handlers.mouseDown, add);\n }\n manageListener(interactivityEl, mouseLeaveTmpEvent, handlers.mouseLeave, add);\n manageListener(interactivityEl, touchCancelEvent, handlers.touchCancel, add);\n };\n this._manageListeners = (add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions, detectType = options.interactivity.detectsOn, canvasEl = container.canvas.element;\n let mouseLeaveTmpEvent = mouseLeaveEvent;\n if (detectType === \"window\") {\n container.interactivity.element = window;\n mouseLeaveTmpEvent = mouseOutEvent;\n }\n else if (detectType === \"parent\" && canvasEl) {\n container.interactivity.element = canvasEl.parentElement ?? canvasEl.parentNode;\n }\n else {\n container.interactivity.element = canvasEl;\n }\n this._manageMediaMatch(add);\n this._manageResize(add);\n this._manageInteractivityListeners(mouseLeaveTmpEvent, add);\n if (document) {\n manageListener(document, visibilityChangeEvent, handlers.visibilityChange, add, false);\n }\n };\n this._manageMediaMatch = (add) => {\n const handlers = this._handlers, mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\");\n if (!mediaMatch) {\n return;\n }\n if (mediaMatch.addEventListener !== undefined) {\n manageListener(mediaMatch, \"change\", handlers.themeChange, add);\n return;\n }\n if (mediaMatch.addListener === undefined) {\n return;\n }\n if (add) {\n mediaMatch.addListener(handlers.oldThemeChange);\n }\n else {\n mediaMatch.removeListener(handlers.oldThemeChange);\n }\n };\n this._manageResize = (add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n if (!options.interactivity.events.resize) {\n return;\n }\n if (typeof ResizeObserver === \"undefined\") {\n manageListener(window, resizeEvent, handlers.resize, add);\n return;\n }\n const canvasEl = container.canvas.element;\n if (this._resizeObserver && !add) {\n if (canvasEl) {\n this._resizeObserver.unobserve(canvasEl);\n }\n this._resizeObserver.disconnect();\n delete this._resizeObserver;\n }\n else if (!this._resizeObserver && add && canvasEl) {\n this._resizeObserver = new ResizeObserver(async (entries) => {\n const entry = entries.find((e) => e.target === canvasEl);\n if (!entry) {\n return;\n }\n await this._handleWindowResize();\n });\n this._resizeObserver.observe(canvasEl);\n }\n };\n this._mouseDown = () => {\n const { interactivity } = this.container;\n if (!interactivity) {\n return;\n }\n const { mouse } = interactivity;\n mouse.clicking = true;\n mouse.downPosition = mouse.position;\n };\n this._mouseTouchClick = (e) => {\n const container = this.container, options = container.actualOptions, { mouse } = container.interactivity;\n mouse.inside = true;\n let handled = false;\n const mousePosition = mouse.position;\n if (!mousePosition || !options.interactivity.events.onClick.enable) {\n return;\n }\n for (const [, plugin] of container.plugins) {\n if (!plugin.clickPositionValid) {\n continue;\n }\n handled = plugin.clickPositionValid(mousePosition);\n if (handled) {\n break;\n }\n }\n if (!handled) {\n this._doMouseTouchClick(e);\n }\n mouse.clicking = false;\n };\n this._mouseTouchFinish = () => {\n const interactivity = this.container.interactivity;\n if (!interactivity) {\n return;\n }\n const mouse = interactivity.mouse;\n delete mouse.position;\n delete mouse.clickPosition;\n delete mouse.downPosition;\n interactivity.status = mouseLeaveEvent;\n mouse.inside = false;\n mouse.clicking = false;\n };\n this._mouseTouchMove = (e) => {\n const container = this.container, options = container.actualOptions, interactivity = container.interactivity, canvasEl = container.canvas.element;\n if (!interactivity || !interactivity.element) {\n return;\n }\n interactivity.mouse.inside = true;\n let pos;\n if (e.type.startsWith(\"pointer\")) {\n this._canPush = true;\n const mouseEvent = e;\n if (interactivity.element === window) {\n if (canvasEl) {\n const clientRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.clientX - clientRect.left,\n y: mouseEvent.clientY - clientRect.top,\n };\n }\n }\n else if (options.interactivity.detectsOn === \"parent\") {\n const source = mouseEvent.target, target = mouseEvent.currentTarget;\n if (source && target && canvasEl) {\n const sourceRect = source.getBoundingClientRect(), targetRect = target.getBoundingClientRect(), canvasRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.offsetX + 2 * sourceRect.left - (targetRect.left + canvasRect.left),\n y: mouseEvent.offsetY + 2 * sourceRect.top - (targetRect.top + canvasRect.top),\n };\n }\n else {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else if (mouseEvent.target === canvasEl) {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else {\n this._canPush = e.type !== \"touchmove\";\n if (canvasEl) {\n const touchEvent = e, lastTouch = touchEvent.touches[touchEvent.touches.length - 1], canvasRect = canvasEl.getBoundingClientRect();\n pos = {\n x: lastTouch.clientX - (canvasRect.left ?? 0),\n y: lastTouch.clientY - (canvasRect.top ?? 0),\n };\n }\n }\n const pxRatio = container.retina.pixelRatio;\n if (pos) {\n pos.x *= pxRatio;\n pos.y *= pxRatio;\n }\n interactivity.mouse.position = pos;\n interactivity.status = mouseMoveEvent;\n };\n this._touchEnd = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchFinish();\n };\n this._touchEndClick = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchClick(e);\n };\n this._touchStart = (e) => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.set(touch.identifier, performance.now());\n }\n this._mouseTouchMove(e);\n };\n this._canPush = true;\n this._touches = new Map();\n this._handlers = {\n mouseDown: () => this._mouseDown(),\n mouseLeave: () => this._mouseTouchFinish(),\n mouseMove: (e) => this._mouseTouchMove(e),\n mouseUp: (e) => this._mouseTouchClick(e),\n touchStart: (e) => this._touchStart(e),\n touchMove: (e) => this._mouseTouchMove(e),\n touchEnd: (e) => this._touchEnd(e),\n touchCancel: (e) => this._touchEnd(e),\n touchEndClick: (e) => this._touchEndClick(e),\n visibilityChange: () => this._handleVisibilityChange(),\n themeChange: (e) => this._handleThemeChange(e),\n oldThemeChange: (e) => this._handleThemeChange(e),\n resize: () => {\n this._handleWindowResize();\n },\n };\n }\n addListeners() {\n this._manageListeners(true);\n }\n removeListeners() {\n this._manageListeners(false);\n }\n}\n","import { isArray, isString } from \"../../Utils/Utils\";\nexport class OptionsColor {\n constructor() {\n this.value = \"\";\n }\n static create(source, data) {\n const color = new OptionsColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n if (data?.value === undefined) {\n return;\n }\n this.value = data.value;\n }\n}\n","import { OptionsColor } from \"../OptionsColor\";\nexport class Background {\n constructor() {\n this.color = new OptionsColor();\n this.color.value = \"\";\n this.image = \"\";\n this.position = \"\";\n this.repeat = \"\";\n this.size = \"\";\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n if (data.position !== undefined) {\n this.position = data.position;\n }\n if (data.repeat !== undefined) {\n this.repeat = data.repeat;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor\";\nexport class BackgroundMaskCover {\n constructor() {\n this.color = new OptionsColor();\n this.color.value = \"#fff\";\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { BackgroundMaskCover } from \"./BackgroundMaskCover\";\nimport { isString } from \"../../../Utils/Utils\";\nexport class BackgroundMask {\n constructor() {\n this.composite = \"destination-out\";\n this.cover = new BackgroundMaskCover();\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.composite !== undefined) {\n this.composite = data.composite;\n }\n if (data.cover !== undefined) {\n const cover = data.cover;\n const color = (isString(data.cover) ? { color: data.cover } : data.cover);\n this.cover.load(cover.color !== undefined ? cover : { color: color });\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","export class FullScreen {\n constructor() {\n this.enable = true;\n this.zIndex = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.zIndex !== undefined) {\n this.zIndex = data.zIndex;\n }\n }\n}\n","export class ClickEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n }\n}\n","import { executeOnSingleOrMultiple } from \"../../../../Utils/Utils\";\nexport class DivEvent {\n constructor() {\n this.selectors = [];\n this.enable = false;\n this.mode = [];\n this.type = \"circle\";\n }\n get el() {\n return this.elementId;\n }\n set el(value) {\n this.elementId = value;\n }\n get elementId() {\n return this.ids;\n }\n set elementId(value) {\n this.ids = value;\n }\n get ids() {\n return executeOnSingleOrMultiple(this.selectors, (t) => t.replace(\"#\", \"\"));\n }\n set ids(value) {\n this.selectors = executeOnSingleOrMultiple(value, (t) => `#${t}`);\n }\n load(data) {\n if (!data) {\n return;\n }\n const ids = data.ids ?? data.elementId ?? data.el;\n if (ids !== undefined) {\n this.ids = ids;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","export class Parallax {\n constructor() {\n this.enable = false;\n this.force = 2;\n this.smooth = 10;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.force !== undefined) {\n this.force = data.force;\n }\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n }\n}\n","import { Parallax } from \"./Parallax\";\nexport class HoverEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n this.parallax = new Parallax();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.parallax.load(data.parallax);\n }\n}\n","export class ResizeEvent {\n constructor() {\n this.delay = 0.5;\n this.enable = true;\n }\n load(data) {\n if (data === undefined) {\n return;\n }\n if (data.delay !== undefined) {\n this.delay = data.delay;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { executeOnSingleOrMultiple, isBoolean } from \"../../../../Utils/Utils\";\nimport { ClickEvent } from \"./ClickEvent\";\nimport { DivEvent } from \"./DivEvent\";\nimport { HoverEvent } from \"./HoverEvent\";\nimport { ResizeEvent } from \"./ResizeEvent\";\nexport class Events {\n constructor() {\n this.onClick = new ClickEvent();\n this.onDiv = new DivEvent();\n this.onHover = new HoverEvent();\n this.resize = new ResizeEvent();\n }\n get onclick() {\n return this.onClick;\n }\n set onclick(value) {\n this.onClick = value;\n }\n get ondiv() {\n return this.onDiv;\n }\n set ondiv(value) {\n this.onDiv = value;\n }\n get onhover() {\n return this.onHover;\n }\n set onhover(value) {\n this.onHover = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.onClick.load(data.onClick ?? data.onclick);\n const onDiv = data.onDiv ?? data.ondiv;\n if (onDiv !== undefined) {\n this.onDiv = executeOnSingleOrMultiple(onDiv, (t) => {\n const tmp = new DivEvent();\n tmp.load(t);\n return tmp;\n });\n }\n this.onHover.load(data.onHover ?? data.onhover);\n if (isBoolean(data.resize)) {\n this.resize.enable = data.resize;\n }\n else {\n this.resize.load(data.resize);\n }\n }\n}\n","export class Modes {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (!this._container) {\n return;\n }\n const interactors = this._engine.plugins.interactors.get(this._container);\n if (!interactors) {\n return;\n }\n for (const interactor of interactors) {\n if (!interactor.loadModeOptions) {\n continue;\n }\n interactor.loadModeOptions(this, data);\n }\n }\n}\n","import { Events } from \"./Events/Events\";\nimport { Modes } from \"./Modes/Modes\";\nexport class Interactivity {\n constructor(engine, container) {\n this.detectsOn = \"window\";\n this.events = new Events();\n this.modes = new Modes(engine, container);\n }\n get detect_on() {\n return this.detectsOn;\n }\n set detect_on(value) {\n this.detectsOn = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n const detectsOn = data.detectsOn ?? data.detect_on;\n if (detectsOn !== undefined) {\n this.detectsOn = detectsOn;\n }\n this.events.load(data.events);\n this.modes.load(data.modes);\n }\n}\n","import { deepExtend } from \"../../Utils/Utils\";\nexport class ManualParticle {\n load(data) {\n if (!data) {\n return;\n }\n if (data.position) {\n this.position = {\n x: data.position.x ?? 50,\n y: data.position.y ?? 50,\n mode: data.position.mode ?? \"percent\",\n };\n }\n if (data.options) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","import { deepExtend } from \"../../Utils/Utils\";\nexport class Responsive {\n constructor() {\n this.maxWidth = Infinity;\n this.options = {};\n this.mode = \"canvas\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.maxWidth !== undefined) {\n this.maxWidth = data.maxWidth;\n }\n if (data.mode !== undefined) {\n if (data.mode === \"screen\") {\n this.mode = \"screen\";\n }\n else {\n this.mode = \"canvas\";\n }\n }\n if (data.options !== undefined) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","export class ThemeDefault {\n constructor() {\n this.auto = false;\n this.mode = \"any\";\n this.value = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.auto !== undefined) {\n this.auto = data.auto;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { ThemeDefault } from \"./ThemeDefault\";\nimport { deepExtend } from \"../../../Utils/Utils\";\nexport class Theme {\n constructor() {\n this.name = \"\";\n this.default = new ThemeDefault();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n this.default.load(data.default);\n if (data.options !== undefined) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","import { setRangeValue } from \"../../Utils/NumberUtils\";\nexport class ColorAnimation {\n constructor() {\n this.count = 0;\n this.enable = false;\n this.offset = 0;\n this.speed = 1;\n this.delay = 0;\n this.decay = 0;\n this.sync = true;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = setRangeValue(data.count);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ColorAnimation } from \"./ColorAnimation\";\nexport class HslAnimation {\n constructor() {\n this.h = new ColorAnimation();\n this.s = new ColorAnimation();\n this.l = new ColorAnimation();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.h.load(data.h);\n this.s.load(data.s);\n this.l.load(data.l);\n }\n}\n","import { isArray, isString } from \"../../Utils/Utils\";\nimport { HslAnimation } from \"./HslAnimation\";\nimport { OptionsColor } from \"./OptionsColor\";\nexport class AnimatableColor extends OptionsColor {\n constructor() {\n super();\n this.animation = new HslAnimation();\n }\n static create(source, data) {\n const color = new AnimatableColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const colorAnimation = data.animation;\n if (colorAnimation !== undefined) {\n if (colorAnimation.enable !== undefined) {\n this.animation.h.load(colorAnimation);\n }\n else {\n this.animation.load(data.animation);\n }\n }\n }\n}\n","export class CollisionsAbsorb {\n constructor() {\n this.speed = 2;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","export class CollisionsOverlap {\n constructor() {\n this.enable = true;\n this.retries = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.retries !== undefined) {\n this.retries = data.retries;\n }\n }\n}\n","import { setRangeValue } from \"../../Utils/NumberUtils\";\nexport class AnimationOptions {\n constructor() {\n this.count = 0;\n this.enable = false;\n this.speed = 1;\n this.decay = 0;\n this.delay = 0;\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = setRangeValue(data.count);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\nexport class RangedAnimationOptions extends AnimationOptions {\n constructor() {\n super();\n this.mode = \"auto\";\n this.startValue = \"random\";\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.minimumValue !== undefined) {\n this.minimumValue = data.minimumValue;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.startValue !== undefined) {\n this.startValue = data.startValue;\n }\n }\n}\n","export class Random {\n constructor() {\n this.enable = false;\n this.minimumValue = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.minimumValue !== undefined) {\n this.minimumValue = data.minimumValue;\n }\n }\n}\n","import { AnimationOptions, RangedAnimationOptions } from \"./AnimationOptions\";\nimport { Random } from \"./Random\";\nimport { isBoolean } from \"../../Utils/Utils\";\nimport { setRangeValue } from \"../../Utils/NumberUtils\";\nexport class ValueWithRandom {\n constructor() {\n this.random = new Random();\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (isBoolean(data.random)) {\n this.random.enable = data.random;\n }\n else {\n this.random.load(data.random);\n }\n if (data.value !== undefined) {\n this.value = setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);\n }\n }\n}\nexport class AnimationValueWithRandom extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new AnimationOptions();\n }\n get anim() {\n return this.animation;\n }\n set anim(value) {\n this.animation = value;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const animation = data.animation ?? data.anim;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\nexport class RangedAnimationValueWithRandom extends AnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new RangedAnimationOptions();\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const animation = data.animation ?? data.anim;\n if (animation !== undefined) {\n this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);\n }\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom\";\nexport class ParticlesBounceFactor extends ValueWithRandom {\n constructor() {\n super();\n this.random.minimumValue = 0.1;\n this.value = 1;\n }\n}\n","import { ParticlesBounceFactor } from \"./ParticlesBounceFactor\";\nexport class ParticlesBounce {\n constructor() {\n this.horizontal = new ParticlesBounceFactor();\n this.vertical = new ParticlesBounceFactor();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.horizontal.load(data.horizontal);\n this.vertical.load(data.vertical);\n }\n}\n","import { CollisionsAbsorb } from \"./CollisionsAbsorb\";\nimport { CollisionsOverlap } from \"./CollisionsOverlap\";\nimport { ParticlesBounce } from \"../Bounce/ParticlesBounce\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class Collisions {\n constructor() {\n this.absorb = new CollisionsAbsorb();\n this.bounce = new ParticlesBounce();\n this.enable = false;\n this.maxSpeed = 50;\n this.mode = \"bounce\";\n this.overlap = new CollisionsOverlap();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.absorb.load(data.absorb);\n this.bounce.load(data.bounce);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.overlap.load(data.overlap);\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class MoveAngle {\n constructor() {\n this.offset = 0;\n this.value = 90;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n if (data.value !== undefined) {\n this.value = setRangeValue(data.value);\n }\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class MoveAttract {\n constructor() {\n this.distance = 200;\n this.enable = false;\n this.rotate = {\n x: 3000,\n y: 3000,\n };\n }\n get rotateX() {\n return this.rotate.x;\n }\n set rotateX(value) {\n this.rotate.x = value;\n }\n get rotateY() {\n return this.rotate.y;\n }\n set rotateY(value) {\n this.rotate.y = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = setRangeValue(data.distance);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const rotateX = data.rotate?.x ?? data.rotateX;\n if (rotateX !== undefined) {\n this.rotate.x = rotateX;\n }\n const rotateY = data.rotate?.y ?? data.rotateY;\n if (rotateY !== undefined) {\n this.rotate.y = rotateY;\n }\n }\n}\n","export class MoveCenter {\n constructor() {\n this.x = 50;\n this.y = 50;\n this.mode = \"percent\";\n this.radius = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.x !== undefined) {\n this.x = data.x;\n }\n if (data.y !== undefined) {\n this.y = data.y;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class MoveGravity {\n constructor() {\n this.acceleration = 9.81;\n this.enable = false;\n this.inverse = false;\n this.maxSpeed = 50;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.inverse !== undefined) {\n this.inverse = data.inverse;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n }\n}\n","import { ValueWithRandom } from \"../../../ValueWithRandom\";\nimport { deepExtend } from \"../../../../../Utils/Utils\";\nexport class MovePath {\n constructor() {\n this.clamp = true;\n this.delay = new ValueWithRandom();\n this.enable = false;\n this.options = {};\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.clamp !== undefined) {\n this.clamp = data.clamp;\n }\n this.delay.load(data.delay);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.generator = data.generator;\n if (data.options) {\n this.options = deepExtend(this.options, data.options);\n }\n }\n}\n","import { OptionsColor } from \"../../OptionsColor\";\nexport class MoveTrailFill {\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n }\n}\n","import { MoveTrailFill } from \"./MoveTrailFill\";\nexport class MoveTrail {\n constructor() {\n this.enable = false;\n this.length = 10;\n this.fill = new MoveTrailFill();\n }\n get fillColor() {\n return this.fill.color;\n }\n set fillColor(value) {\n this.fill.load({ color: value });\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.fill !== undefined || data.fillColor !== undefined) {\n this.fill.load(data.fill || { color: data.fillColor });\n }\n if (data.length !== undefined) {\n this.length = data.length;\n }\n }\n}\n","export class OutModes {\n constructor() {\n this.default = \"out\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n this.bottom = data.bottom ?? data.default;\n this.left = data.left ?? data.default;\n this.right = data.right ?? data.default;\n this.top = data.top ?? data.default;\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class Spin {\n constructor() {\n this.acceleration = 0;\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.position) {\n this.position = deepExtend({}, data.position);\n }\n }\n}\n","import { isNumber, isObject } from \"../../../../Utils/Utils\";\nimport { MoveAngle } from \"./MoveAngle\";\nimport { MoveAttract } from \"./MoveAttract\";\nimport { MoveCenter } from \"./MoveCenter\";\nimport { MoveGravity } from \"./MoveGravity\";\nimport { MovePath } from \"./Path/MovePath\";\nimport { MoveTrail } from \"./MoveTrail\";\nimport { OutModes } from \"./OutModes\";\nimport { Spin } from \"./Spin\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class Move {\n constructor() {\n this.angle = new MoveAngle();\n this.attract = new MoveAttract();\n this.center = new MoveCenter();\n this.decay = 0;\n this.distance = {};\n this.direction = \"none\";\n this.drift = 0;\n this.enable = false;\n this.gravity = new MoveGravity();\n this.path = new MovePath();\n this.outModes = new OutModes();\n this.random = false;\n this.size = false;\n this.speed = 2;\n this.spin = new Spin();\n this.straight = false;\n this.trail = new MoveTrail();\n this.vibrate = false;\n this.warp = false;\n }\n get bounce() {\n return this.collisions;\n }\n set bounce(value) {\n this.collisions = value;\n }\n get collisions() {\n return false;\n }\n set collisions(_) {\n }\n get noise() {\n return this.path;\n }\n set noise(value) {\n this.path = value;\n }\n get outMode() {\n return this.outModes.default;\n }\n set outMode(value) {\n this.outModes.default = value;\n }\n get out_mode() {\n return this.outMode;\n }\n set out_mode(value) {\n this.outMode = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.angle.load(isNumber(data.angle) ? { value: data.angle } : data.angle);\n this.attract.load(data.attract);\n this.center.load(data.center);\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n if (data.distance !== undefined) {\n this.distance = isNumber(data.distance)\n ? {\n horizontal: data.distance,\n vertical: data.distance,\n }\n : { ...data.distance };\n }\n if (data.drift !== undefined) {\n this.drift = setRangeValue(data.drift);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.gravity.load(data.gravity);\n const outModes = data.outModes ?? data.outMode ?? data.out_mode;\n if (outModes !== undefined) {\n if (isObject(outModes)) {\n this.outModes.load(outModes);\n }\n else {\n this.outModes.load({\n default: outModes,\n });\n }\n }\n this.path.load(data.path ?? data.noise);\n if (data.random !== undefined) {\n this.random = data.random;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n this.spin.load(data.spin);\n if (data.straight !== undefined) {\n this.straight = data.straight;\n }\n this.trail.load(data.trail);\n if (data.vibrate !== undefined) {\n this.vibrate = data.vibrate;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","import { RangedAnimationOptions } from \"../../AnimationOptions\";\nexport class OpacityAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = \"none\";\n this.speed = 2;\n }\n get opacity_min() {\n return this.minimumValue;\n }\n set opacity_min(value) {\n this.minimumValue = value;\n }\n load(data) {\n if (data?.opacity_min !== undefined && data.minimumValue === undefined) {\n data.minimumValue = data.opacity_min;\n }\n super.load(data);\n if (!data) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { OpacityAnimation } from \"./OpacityAnimation\";\nimport { ValueWithRandom } from \"../../ValueWithRandom\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class Opacity extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new OpacityAnimation();\n this.random.minimumValue = 0.1;\n this.value = 1;\n }\n get anim() {\n return this.animation;\n }\n set anim(value) {\n this.animation = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n const animation = data.animation ?? data.anim;\n if (animation !== undefined) {\n this.animation.load(animation);\n this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);\n }\n }\n}\n","export class ParticlesDensity {\n constructor() {\n this.enable = false;\n this.width = 1920;\n this.height = 1080;\n }\n get area() {\n return this.width;\n }\n set area(value) {\n this.width = value;\n }\n get factor() {\n return this.height;\n }\n set factor(value) {\n this.height = value;\n }\n get value_area() {\n return this.area;\n }\n set value_area(value) {\n this.area = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const width = data.width ?? data.area ?? data.value_area;\n if (width !== undefined) {\n this.width = width;\n }\n const height = data.height ?? data.factor;\n if (height !== undefined) {\n this.height = height;\n }\n }\n}\n","import { ParticlesDensity } from \"./ParticlesDensity\";\nexport class ParticlesNumber {\n constructor() {\n this.density = new ParticlesDensity();\n this.limit = 0;\n this.value = 0;\n }\n get max() {\n return this.limit;\n }\n set max(value) {\n this.limit = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.density.load(data.density);\n const limit = data.limit ?? data.max;\n if (limit !== undefined) {\n this.limit = limit;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor\";\nexport class Shadow {\n constructor() {\n this.blur = 0;\n this.color = new OptionsColor();\n this.enable = false;\n this.offset = {\n x: 0,\n y: 0,\n };\n this.color.value = \"#000\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.offset === undefined) {\n return;\n }\n if (data.offset.x !== undefined) {\n this.offset.x = data.offset.x;\n }\n if (data.offset.y !== undefined) {\n this.offset.y = data.offset.y;\n }\n }\n}\n","import { deepExtend, isArray } from \"../../../../Utils/Utils\";\nconst charKey = \"character\", charAltKey = \"char\", imageKey = \"image\", imageAltKey = \"images\", polygonKey = \"polygon\", polygonAltKey = \"star\";\nexport class Shape {\n constructor() {\n this.loadShape = (item, mainKey, altKey, altOverride) => {\n if (!item) {\n return;\n }\n const itemIsArray = isArray(item), emptyValue = itemIsArray ? [] : {}, mainDifferentValues = itemIsArray !== isArray(this.options[mainKey]), altDifferentValues = itemIsArray !== isArray(this.options[altKey]);\n if (mainDifferentValues) {\n this.options[mainKey] = emptyValue;\n }\n if (altDifferentValues && altOverride) {\n this.options[altKey] = emptyValue;\n }\n this.options[mainKey] = deepExtend(this.options[mainKey] ?? emptyValue, item);\n if (!this.options[altKey] || altOverride) {\n this.options[altKey] = deepExtend(this.options[altKey] ?? emptyValue, item);\n }\n };\n this.close = true;\n this.fill = true;\n this.options = {};\n this.type = \"circle\";\n }\n get character() {\n return (this.options[charKey] ?? this.options[charAltKey]);\n }\n set character(value) {\n this.options[charAltKey] = this.options[charKey] = value;\n }\n get custom() {\n return this.options;\n }\n set custom(value) {\n this.options = value;\n }\n get image() {\n return (this.options[imageKey] ?? this.options[imageAltKey]);\n }\n set image(value) {\n this.options[imageAltKey] = this.options[imageKey] = value;\n }\n get images() {\n return this.image;\n }\n set images(value) {\n this.image = value;\n }\n get polygon() {\n return (this.options[polygonKey] ?? this.options[polygonAltKey]);\n }\n set polygon(value) {\n this.options[polygonAltKey] = this.options[polygonKey] = value;\n }\n get stroke() {\n return [];\n }\n set stroke(_value) {\n }\n load(data) {\n if (!data) {\n return;\n }\n const options = data.options ?? data.custom;\n if (options !== undefined) {\n for (const shape in options) {\n const item = options[shape];\n if (item) {\n this.options[shape] = deepExtend(this.options[shape] ?? {}, item);\n }\n }\n }\n this.loadShape(data.character, charKey, charAltKey, true);\n this.loadShape(data.polygon, polygonKey, polygonAltKey, false);\n this.loadShape(data.image ?? data.images, imageKey, imageAltKey, true);\n if (data.close !== undefined) {\n this.close = data.close;\n }\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { RangedAnimationOptions } from \"../../AnimationOptions\";\nexport class SizeAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = \"none\";\n this.speed = 5;\n }\n get size_min() {\n return this.minimumValue;\n }\n set size_min(value) {\n this.minimumValue = value;\n }\n load(data) {\n if (data?.size_min !== undefined && data.minimumValue === undefined) {\n data.minimumValue = data.size_min;\n }\n super.load(data);\n if (!data) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { SizeAnimation } from \"./SizeAnimation\";\nimport { ValueWithRandom } from \"../../ValueWithRandom\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils\";\nexport class Size extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new SizeAnimation();\n this.random.minimumValue = 1;\n this.value = 3;\n }\n get anim() {\n return this.animation;\n }\n set anim(value) {\n this.animation = value;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n const animation = data.animation ?? data.anim;\n if (animation !== undefined) {\n this.animation.load(animation);\n this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);\n }\n }\n}\n","import { AnimatableColor } from \"../AnimatableColor\";\nimport { setRangeValue } from \"../../../Utils/NumberUtils\";\nexport class Stroke {\n constructor() {\n this.width = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = AnimatableColor.create(this.color, data.color);\n }\n if (data.width !== undefined) {\n this.width = setRangeValue(data.width);\n }\n if (data.opacity !== undefined) {\n this.opacity = setRangeValue(data.opacity);\n }\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom\";\nexport class ZIndex extends ValueWithRandom {\n constructor() {\n super();\n this.opacityRate = 1;\n this.sizeRate = 1;\n this.velocityRate = 1;\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.opacityRate !== undefined) {\n this.opacityRate = data.opacityRate;\n }\n if (data.sizeRate !== undefined) {\n this.sizeRate = data.sizeRate;\n }\n if (data.velocityRate !== undefined) {\n this.velocityRate = data.velocityRate;\n }\n }\n}\n","import { deepExtend, executeOnSingleOrMultiple } from \"../../../Utils/Utils\";\nimport { AnimatableColor } from \"../AnimatableColor\";\nimport { Collisions } from \"./Collisions/Collisions\";\nimport { Move } from \"./Move/Move\";\nimport { Opacity } from \"./Opacity/Opacity\";\nimport { ParticlesBounce } from \"./Bounce/ParticlesBounce\";\nimport { ParticlesNumber } from \"./Number/ParticlesNumber\";\nimport { Shadow } from \"./Shadow\";\nimport { Shape } from \"./Shape/Shape\";\nimport { Size } from \"./Size/Size\";\nimport { Stroke } from \"./Stroke\";\nimport { ZIndex } from \"./ZIndex/ZIndex\";\nexport class ParticlesOptions {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n this.bounce = new ParticlesBounce();\n this.collisions = new Collisions();\n this.color = new AnimatableColor();\n this.color.value = \"#fff\";\n this.groups = {};\n this.move = new Move();\n this.number = new ParticlesNumber();\n this.opacity = new Opacity();\n this.reduceDuplicates = false;\n this.shadow = new Shadow();\n this.shape = new Shape();\n this.size = new Size();\n this.stroke = new Stroke();\n this.zIndex = new ZIndex();\n }\n load(data) {\n if (!data) {\n return;\n }\n this.bounce.load(data.bounce);\n this.color.load(AnimatableColor.create(this.color, data.color));\n if (data.groups !== undefined) {\n for (const group in data.groups) {\n const item = data.groups[group];\n if (item !== undefined) {\n this.groups[group] = deepExtend(this.groups[group] ?? {}, item);\n }\n }\n }\n this.move.load(data.move);\n this.number.load(data.number);\n this.opacity.load(data.opacity);\n if (data.reduceDuplicates !== undefined) {\n this.reduceDuplicates = data.reduceDuplicates;\n }\n this.shape.load(data.shape);\n this.size.load(data.size);\n this.shadow.load(data.shadow);\n this.zIndex.load(data.zIndex);\n const collisions = data.move?.collisions ?? data.move?.bounce;\n if (collisions !== undefined) {\n this.collisions.enable = collisions;\n }\n this.collisions.load(data.collisions);\n if (data.interactivity !== undefined) {\n this.interactivity = deepExtend({}, data.interactivity);\n }\n const strokeToLoad = data.stroke ?? data.shape?.stroke;\n if (strokeToLoad) {\n this.stroke = executeOnSingleOrMultiple(strokeToLoad, (t) => {\n const tmp = new Stroke();\n tmp.load(t);\n return tmp;\n });\n }\n if (this._container) {\n const updaters = this._engine.plugins.updaters.get(this._container);\n if (updaters) {\n for (const updater of updaters) {\n if (updater.loadOptions) {\n updater.loadOptions(this, data);\n }\n }\n }\n const interactors = this._engine.plugins.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadParticlesOptions) {\n interactor.loadParticlesOptions(this, data);\n }\n }\n }\n }\n }\n}\n","import { ParticlesOptions } from \"../Options/Classes/Particles/ParticlesOptions\";\nexport function loadOptions(options, ...sourceOptionsArr) {\n for (const sourceOptions of sourceOptionsArr) {\n options.load(sourceOptions);\n }\n}\nexport function loadParticlesOptions(engine, container, ...sourceOptionsArr) {\n const options = new ParticlesOptions(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\n","import { deepExtend, executeOnSingleOrMultiple, isBoolean, safeMatchMedia } from \"../../Utils/Utils\";\nimport { Background } from \"./Background/Background\";\nimport { BackgroundMask } from \"./BackgroundMask/BackgroundMask\";\nimport { FullScreen } from \"./FullScreen/FullScreen\";\nimport { Interactivity } from \"./Interactivity/Interactivity\";\nimport { ManualParticle } from \"./ManualParticle\";\nimport { Responsive } from \"./Responsive\";\nimport { Theme } from \"./Theme/Theme\";\nimport { loadParticlesOptions } from \"../../Utils/OptionsUtils\";\nimport { setRangeValue } from \"../../Utils/NumberUtils\";\nexport class Options {\n constructor(engine, container) {\n this._findDefaultTheme = (mode) => {\n return (this.themes.find((theme) => theme.default.value && theme.default.mode === mode) ??\n this.themes.find((theme) => theme.default.value && theme.default.mode === \"any\"));\n };\n this._importPreset = (preset) => {\n this.load(this._engine.plugins.getPreset(preset));\n };\n this._engine = engine;\n this._container = container;\n this.autoPlay = true;\n this.background = new Background();\n this.backgroundMask = new BackgroundMask();\n this.defaultThemes = {};\n this.delay = 0;\n this.fullScreen = new FullScreen();\n this.detectRetina = true;\n this.duration = 0;\n this.fpsLimit = 120;\n this.interactivity = new Interactivity(engine, container);\n this.manualParticles = [];\n this.particles = loadParticlesOptions(this._engine, this._container);\n this.pauseOnBlur = true;\n this.pauseOnOutsideViewport = true;\n this.responsive = [];\n this.smooth = false;\n this.style = {};\n this.themes = [];\n this.zLayers = 100;\n }\n get backgroundMode() {\n return this.fullScreen;\n }\n set backgroundMode(value) {\n this.fullScreen.load(value);\n }\n get fps_limit() {\n return this.fpsLimit;\n }\n set fps_limit(value) {\n this.fpsLimit = value;\n }\n get retina_detect() {\n return this.detectRetina;\n }\n set retina_detect(value) {\n this.detectRetina = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.preset !== undefined) {\n executeOnSingleOrMultiple(data.preset, (preset) => this._importPreset(preset));\n }\n if (data.autoPlay !== undefined) {\n this.autoPlay = data.autoPlay;\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n const detectRetina = data.detectRetina ?? data.retina_detect;\n if (detectRetina !== undefined) {\n this.detectRetina = detectRetina;\n }\n if (data.duration !== undefined) {\n this.duration = setRangeValue(data.duration);\n }\n const fpsLimit = data.fpsLimit ?? data.fps_limit;\n if (fpsLimit !== undefined) {\n this.fpsLimit = fpsLimit;\n }\n if (data.pauseOnBlur !== undefined) {\n this.pauseOnBlur = data.pauseOnBlur;\n }\n if (data.pauseOnOutsideViewport !== undefined) {\n this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;\n }\n if (data.zLayers !== undefined) {\n this.zLayers = data.zLayers;\n }\n this.background.load(data.background);\n const fullScreen = data.fullScreen ?? data.backgroundMode;\n if (isBoolean(fullScreen)) {\n this.fullScreen.enable = fullScreen;\n }\n else {\n this.fullScreen.load(fullScreen);\n }\n this.backgroundMask.load(data.backgroundMask);\n this.interactivity.load(data.interactivity);\n if (data.manualParticles) {\n this.manualParticles = data.manualParticles.map((t) => {\n const tmp = new ManualParticle();\n tmp.load(t);\n return tmp;\n });\n }\n this.particles.load(data.particles);\n this.style = deepExtend(this.style, data.style);\n this._engine.plugins.loadOptions(this, data);\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n const interactors = this._engine.plugins.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadOptions) {\n interactor.loadOptions(this, data);\n }\n }\n }\n if (data.responsive !== undefined) {\n for (const responsive of data.responsive) {\n const optResponsive = new Responsive();\n optResponsive.load(responsive);\n this.responsive.push(optResponsive);\n }\n }\n this.responsive.sort((a, b) => a.maxWidth - b.maxWidth);\n if (data.themes !== undefined) {\n for (const theme of data.themes) {\n const existingTheme = this.themes.find((t) => t.name === theme.name);\n if (!existingTheme) {\n const optTheme = new Theme();\n optTheme.load(theme);\n this.themes.push(optTheme);\n }\n else {\n existingTheme.load(theme);\n }\n }\n }\n this.defaultThemes.dark = this._findDefaultTheme(\"dark\")?.name;\n this.defaultThemes.light = this._findDefaultTheme(\"light\")?.name;\n }\n setResponsive(width, pxRatio, defaultOptions) {\n this.load(defaultOptions);\n const responsiveOptions = this.responsive.find((t) => t.mode === \"screen\" && screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);\n this.load(responsiveOptions?.options);\n return responsiveOptions?.maxWidth;\n }\n setTheme(name) {\n if (name) {\n const chosenTheme = this.themes.find((theme) => theme.name === name);\n if (chosenTheme) {\n this.load(chosenTheme.options);\n }\n }\n else {\n const mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? \"dark\" : \"light\");\n if (defaultTheme) {\n this.load(defaultTheme.options);\n }\n }\n }\n}\n","export class InteractionManager {\n constructor(engine, container) {\n this.container = container;\n this._engine = engine;\n this._interactors = engine.plugins.getInteractors(this.container, true);\n this._externalInteractors = [];\n this._particleInteractors = [];\n }\n async externalInteract(delta) {\n for (const interactor of this._externalInteractors) {\n interactor.isEnabled() && (await interactor.interact(delta));\n }\n }\n handleClickMode(mode) {\n for (const interactor of this._externalInteractors) {\n interactor.handleClickMode && interactor.handleClickMode(mode);\n }\n }\n init() {\n this._externalInteractors = [];\n this._particleInteractors = [];\n for (const interactor of this._interactors) {\n switch (interactor.type) {\n case \"external\":\n this._externalInteractors.push(interactor);\n break;\n case \"particles\":\n this._particleInteractors.push(interactor);\n break;\n }\n interactor.init();\n }\n }\n async particlesInteract(particle, delta) {\n for (const interactor of this._externalInteractors) {\n interactor.clear(particle, delta);\n }\n for (const interactor of this._particleInteractors) {\n interactor.isEnabled(particle) && (await interactor.interact(particle, delta));\n }\n }\n async reset(particle) {\n for (const interactor of this._externalInteractors) {\n interactor.isEnabled() && interactor.reset(particle);\n }\n for (const interactor of this._particleInteractors) {\n interactor.isEnabled(particle) && interactor.reset(particle);\n }\n }\n}\n","import { calcExactPositionOrRandomFromSize, clamp, getDistance, getParticleBaseVelocity, getParticleDirectionAngle, getRandom, getRangeValue, getValue, randomInRange, setRangeValue, } from \"../Utils/NumberUtils\";\nimport { deepExtend, getPosition, initParticleNumericAnimationValue, isInArray, itemFromSingleOrMultiple, } from \"../Utils/Utils\";\nimport { getHslFromAnimation, rangeColorToRgb } from \"../Utils/ColorUtils\";\nimport { Interactivity } from \"../Options/Classes/Interactivity/Interactivity\";\nimport { Vector } from \"./Utils/Vector\";\nimport { Vector3d } from \"./Utils/Vector3d\";\nimport { alterHsl } from \"../Utils/CanvasUtils\";\nimport { errorPrefix } from \"./Utils/Constants\";\nimport { loadParticlesOptions } from \"../Utils/OptionsUtils\";\nconst fixOutMode = (data) => {\n if (!isInArray(data.outMode, data.checkModes)) {\n return;\n }\n const diameter = data.radius * 2;\n if (data.coord > data.maxCoord - diameter) {\n data.setCb(-data.radius);\n }\n else if (data.coord < diameter) {\n data.setCb(data.radius);\n }\n};\nexport class Particle {\n constructor(engine, id, container, position, overrideOptions, group) {\n this.container = container;\n this._calcPosition = (container, position, zIndex, tryCount = 0) => {\n for (const [, plugin] of container.plugins) {\n const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;\n if (pluginPos) {\n return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);\n }\n }\n const canvasSize = container.canvas.size, exactPosition = calcExactPositionOrRandomFromSize({\n size: canvasSize,\n position: position,\n }), pos = Vector3d.create(exactPosition.x, exactPosition.y, zIndex), radius = this.getRadius(), outModes = this.options.move.outModes, fixHorizontal = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [\"bounce\", \"bounce-horizontal\"],\n coord: pos.x,\n maxCoord: container.canvas.size.width,\n setCb: (value) => (pos.x += value),\n radius,\n });\n }, fixVertical = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [\"bounce\", \"bounce-vertical\"],\n coord: pos.y,\n maxCoord: container.canvas.size.height,\n setCb: (value) => (pos.y += value),\n radius,\n });\n };\n fixHorizontal(outModes.left ?? outModes.default);\n fixHorizontal(outModes.right ?? outModes.default);\n fixVertical(outModes.top ?? outModes.default);\n fixVertical(outModes.bottom ?? outModes.default);\n if (this._checkOverlap(pos, tryCount)) {\n return this._calcPosition(container, undefined, zIndex, tryCount + 1);\n }\n return pos;\n };\n this._calculateVelocity = () => {\n const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move;\n if (moveOptions.direction === \"inside\" || moveOptions.direction === \"outside\") {\n return res;\n }\n const rad = (Math.PI / 180) * getRangeValue(moveOptions.angle.value), radOffset = (Math.PI / 180) * getRangeValue(moveOptions.angle.offset), range = {\n left: radOffset - rad / 2,\n right: radOffset + rad / 2,\n };\n if (!moveOptions.straight) {\n res.angle += randomInRange(setRangeValue(range.left, range.right));\n }\n if (moveOptions.random && typeof moveOptions.speed === \"number\") {\n res.length *= getRandom();\n }\n return res;\n };\n this._checkOverlap = (pos, tryCount = 0) => {\n const collisionsOptions = this.options.collisions, radius = this.getRadius();\n if (!collisionsOptions.enable) {\n return false;\n }\n const overlapOptions = collisionsOptions.overlap;\n if (overlapOptions.enable) {\n return false;\n }\n const retries = overlapOptions.retries;\n if (retries >= 0 && tryCount > retries) {\n throw new Error(`${errorPrefix} particle is overlapping and can't be placed`);\n }\n return !!this.container.particles.find((particle) => getDistance(pos, particle.position) < radius + particle.getRadius());\n };\n this._getRollColor = (color) => {\n if (!color || !this.roll || (!this.backColor && !this.roll.alter)) {\n return color;\n }\n const backFactor = this.roll.horizontal && this.roll.vertical ? 2 : 1, backSum = this.roll.horizontal ? Math.PI / 2 : 0, rolled = Math.floor(((this.roll.angle ?? 0) + backSum) / (Math.PI / backFactor)) % 2;\n if (!rolled) {\n return color;\n }\n if (this.backColor) {\n return this.backColor;\n }\n if (this.roll.alter) {\n return alterHsl(color, this.roll.alter.type, this.roll.alter.value);\n }\n return color;\n };\n this._initPosition = (position) => {\n const container = this.container, zIndexValue = getRangeValue(this.options.zIndex.value);\n this.position = this._calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));\n this.initialPosition = this.position.copy();\n const canvasSize = container.canvas.size;\n this.moveCenter = {\n ...getPosition(this.options.move.center, canvasSize),\n radius: this.options.move.center.radius ?? 0,\n mode: this.options.move.center.mode ?? \"percent\",\n };\n this.direction = getParticleDirectionAngle(this.options.move.direction, this.position, this.moveCenter);\n switch (this.options.move.direction) {\n case \"inside\":\n this.outType = \"inside\";\n break;\n case \"outside\":\n this.outType = \"outside\";\n break;\n }\n this.offset = Vector.origin;\n };\n this._loadShapeData = (shapeOptions, reduceDuplicates) => {\n const shapeData = shapeOptions.options[this.shape];\n if (!shapeData) {\n return;\n }\n return deepExtend({\n close: shapeOptions.close,\n fill: shapeOptions.fill,\n }, itemFromSingleOrMultiple(shapeData, this.id, reduceDuplicates));\n };\n this._engine = engine;\n this.init(id, position, overrideOptions, group);\n }\n destroy(override) {\n if (this.unbreakable || this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.bubble.inRange = false;\n this.slow.inRange = false;\n const container = this.container, pathGenerator = this.pathGenerator;\n for (const [, plugin] of container.plugins) {\n if (plugin.particleDestroyed) {\n plugin.particleDestroyed(this, override);\n }\n }\n for (const updater of container.particles.updaters) {\n if (updater.particleDestroyed) {\n updater.particleDestroyed(this, override);\n }\n }\n if (pathGenerator) {\n pathGenerator.reset(this);\n }\n }\n draw(delta) {\n const container = this.container;\n for (const [, plugin] of container.plugins) {\n container.canvas.drawParticlePlugin(plugin, this, delta);\n }\n container.canvas.drawParticle(this, delta);\n }\n getFillColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.color));\n }\n getMass() {\n return (this.getRadius() ** 2 * Math.PI) / 2;\n }\n getPosition() {\n return {\n x: this.position.x + this.offset.x,\n y: this.position.y + this.offset.y,\n z: this.position.z,\n };\n }\n getRadius() {\n return this.bubble.radius ?? this.size.value;\n }\n getStrokeColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.strokeColor));\n }\n init(id, position, overrideOptions, group) {\n const container = this.container, engine = this._engine;\n this.id = id;\n this.group = group;\n this.fill = true;\n this.pathRotation = false;\n this.close = true;\n this.lastPathTime = 0;\n this.destroyed = false;\n this.unbreakable = false;\n this.rotation = 0;\n this.misplaced = false;\n this.retina = {\n maxDistance: {},\n };\n this.outType = \"normal\";\n this.ignoresResizeRatio = true;\n const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), shapeType = particlesOptions.shape.type, { reduceDuplicates } = particlesOptions;\n this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);\n const shapeOptions = particlesOptions.shape;\n if (overrideOptions && overrideOptions.shape && overrideOptions.shape.type) {\n const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);\n if (shape) {\n this.shape = shape;\n shapeOptions.load(overrideOptions.shape);\n }\n }\n this.shapeData = this._loadShapeData(shapeOptions, reduceDuplicates);\n particlesOptions.load(overrideOptions);\n const shapeData = this.shapeData;\n if (shapeData) {\n particlesOptions.load(shapeData.particles);\n }\n const interactivity = new Interactivity(engine, container);\n interactivity.load(container.actualOptions.interactivity);\n interactivity.load(particlesOptions.interactivity);\n this.interactivity = interactivity;\n this.fill = shapeData?.fill ?? particlesOptions.shape.fill;\n this.close = shapeData?.close ?? particlesOptions.shape.close;\n this.options = particlesOptions;\n const pathOptions = this.options.move.path;\n this.pathDelay = getValue(pathOptions.delay) * 1000;\n if (pathOptions.generator) {\n this.pathGenerator = this._engine.plugins.getPathGenerator(pathOptions.generator);\n if (this.pathGenerator && container.addPath(pathOptions.generator, this.pathGenerator)) {\n this.pathGenerator.init(container);\n }\n }\n container.retina.initParticle(this);\n this.size = initParticleNumericAnimationValue(this.options.size, pxRatio);\n this.bubble = {\n inRange: false,\n };\n this.slow = {\n inRange: false,\n factor: 1,\n };\n this._initPosition(position);\n this.initialVelocity = this._calculateVelocity();\n this.velocity = this.initialVelocity.copy();\n this.moveDecay = 1 - getRangeValue(this.options.move.decay);\n const particles = container.particles;\n particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;\n particles.lastZIndex = this.position.z;\n this.zIndexFactor = this.position.z / container.zLayers;\n this.sides = 24;\n let drawer = container.drawers.get(this.shape);\n if (!drawer) {\n drawer = this._engine.plugins.getShapeDrawer(this.shape);\n if (drawer) {\n container.drawers.set(this.shape, drawer);\n }\n }\n if (drawer && drawer.loadShape) {\n drawer.loadShape(this);\n }\n const sideCountFunc = drawer?.getSidesCount;\n if (sideCountFunc) {\n this.sides = sideCountFunc(this);\n }\n this.spawning = false;\n this.shadowColor = rangeColorToRgb(this.options.shadow.color);\n for (const updater of container.particles.updaters) {\n updater.init(this);\n }\n for (const mover of container.particles.movers) {\n mover.init && mover.init(this);\n }\n if (drawer && drawer.particleInit) {\n drawer.particleInit(container, this);\n }\n for (const [, plugin] of container.plugins) {\n plugin.particleCreated && plugin.particleCreated(this);\n }\n }\n isInsideCanvas() {\n const radius = this.getRadius(), canvasSize = this.container.canvas.size, position = this.position;\n return (position.x >= -radius &&\n position.y >= -radius &&\n position.y <= canvasSize.height + radius &&\n position.x <= canvasSize.width + radius);\n }\n isVisible() {\n return !this.destroyed && !this.spawning && this.isInsideCanvas();\n }\n reset() {\n for (const updater of this.container.particles.updaters) {\n updater.reset && updater.reset(this);\n }\n }\n}\n","export class Point {\n constructor(position, particle) {\n this.position = position;\n this.particle = particle;\n }\n}\n","export class Range {\n constructor(x, y) {\n this.position = {\n x: x,\n y: y,\n };\n }\n}\n","import { Circle } from \"./Circle\";\nimport { Range } from \"./Range\";\nexport class Rectangle extends Range {\n constructor(x, y, width, height) {\n super(x, y);\n this.size = {\n height: height,\n width: width,\n };\n }\n contains(point) {\n const w = this.size.width, h = this.size.height, pos = this.position;\n return point.x >= pos.x && point.x <= pos.x + w && point.y >= pos.y && point.y <= pos.y + h;\n }\n intersects(range) {\n if (range instanceof Circle) {\n range.intersects(this);\n }\n const w = this.size.width, h = this.size.height, pos1 = this.position, pos2 = range.position, size2 = range instanceof Rectangle ? range.size : { width: 0, height: 0 }, w2 = size2.width, h2 = size2.height;\n return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;\n }\n}\n","import { Range } from \"./Range\";\nimport { Rectangle } from \"./Rectangle\";\nimport { getDistance } from \"../../Utils/NumberUtils\";\nexport class Circle extends Range {\n constructor(x, y, radius) {\n super(x, y);\n this.radius = radius;\n }\n contains(point) {\n return getDistance(point, this.position) <= this.radius;\n }\n intersects(range) {\n const pos1 = this.position, pos2 = range.position, distPos = { x: Math.abs(pos2.x - pos1.x), y: Math.abs(pos2.y - pos1.y) }, r = this.radius;\n if (range instanceof Circle) {\n const rSum = r + range.radius, dist = Math.sqrt(distPos.x ** 2 + distPos.y ** 2);\n return rSum > dist;\n }\n else if (range instanceof Rectangle) {\n const { width, height } = range.size, edges = Math.pow(distPos.x - width, 2) + Math.pow(distPos.y - height, 2);\n return (edges <= r ** 2 ||\n (distPos.x <= r + width && distPos.y <= r + height) ||\n distPos.x <= width ||\n distPos.y <= height);\n }\n return false;\n }\n}\n","import { Circle } from \"./Circle\";\nimport { Rectangle } from \"./Rectangle\";\nimport { getDistance } from \"../../Utils/NumberUtils\";\nexport class QuadTree {\n constructor(rectangle, capacity) {\n this.rectangle = rectangle;\n this.capacity = capacity;\n this._subdivide = () => {\n const { x, y } = this.rectangle.position, { width, height } = this.rectangle.size, { capacity } = this;\n for (let i = 0; i < 4; i++) {\n this._subs.push(new QuadTree(new Rectangle(x + (width / 2) * (i % 2), y + (height / 2) * (Math.round(i / 2) - (i % 2)), width / 2, height / 2), capacity));\n }\n this._divided = true;\n };\n this._points = [];\n this._divided = false;\n this._subs = [];\n }\n insert(point) {\n if (!this.rectangle.contains(point.position)) {\n return false;\n }\n if (this._points.length < this.capacity) {\n this._points.push(point);\n return true;\n }\n if (!this._divided) {\n this._subdivide();\n }\n return this._subs.some((sub) => sub.insert(point));\n }\n query(range, check, found) {\n const res = found || [];\n if (!range.intersects(this.rectangle)) {\n return [];\n }\n for (const p of this._points) {\n if (!range.contains(p.position) &&\n getDistance(range.position, p.position) > p.particle.getRadius() &&\n (!check || check(p.particle))) {\n continue;\n }\n res.push(p.particle);\n }\n if (this._divided) {\n for (const sub of this._subs) {\n sub.query(range, check, res);\n }\n }\n return res;\n }\n queryCircle(position, radius, check) {\n return this.query(new Circle(position.x, position.y, radius), check);\n }\n queryRectangle(position, size, check) {\n return this.query(new Rectangle(position.x, position.y, size.width, size.height), check);\n }\n}\n","import { getLogger, getPosition } from \"../Utils/Utils\";\nimport { InteractionManager } from \"./Utils/InteractionManager\";\nimport { Particle } from \"./Particle\";\nimport { Point } from \"./Utils/Point\";\nimport { QuadTree } from \"./Utils/QuadTree\";\nimport { Rectangle } from \"./Utils/Rectangle\";\nimport { errorPrefix } from \"./Utils/Constants\";\nconst qTreeCapacity = 4;\nconst qTreeRectangle = (canvasSize) => {\n return new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, (canvasSize.width * 3) / 2, (canvasSize.height * 3) / 2);\n};\nexport class Particles {\n constructor(engine, container) {\n this._applyDensity = (options, manualCount, group) => {\n if (!options.number.density?.enable) {\n return;\n }\n const numberOptions = options.number, densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter((t) => t.group === group).length);\n this.limit = numberOptions.limit * densityFactor;\n if (particlesCount < particlesNumber) {\n this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);\n }\n else if (particlesCount > particlesNumber) {\n this.removeQuantity(particlesCount - particlesNumber, group);\n }\n };\n this._initDensityFactor = (densityOptions) => {\n const container = this._container;\n if (!container.canvas.element || !densityOptions.enable) {\n return 1;\n }\n const canvas = container.canvas.element, pxRatio = container.retina.pixelRatio;\n return (canvas.width * canvas.height) / (densityOptions.factor * pxRatio ** 2 * densityOptions.area);\n };\n this._pushParticle = (position, overrideOptions, group, initializer) => {\n try {\n let particle = this.pool.pop();\n if (particle) {\n particle.init(this._nextId, position, overrideOptions, group);\n }\n else {\n particle = new Particle(this._engine, this._nextId, this._container, position, overrideOptions, group);\n }\n let canAdd = true;\n if (initializer) {\n canAdd = initializer(particle);\n }\n if (!canAdd) {\n return;\n }\n this._array.push(particle);\n this._zArray.push(particle);\n this._nextId++;\n this._engine.dispatchEvent(\"particleAdded\", {\n container: this._container,\n data: {\n particle,\n },\n });\n return particle;\n }\n catch (e) {\n getLogger().warning(`${errorPrefix} adding particle: ${e}`);\n return;\n }\n };\n this._removeParticle = (index, group, override) => {\n const particle = this._array[index];\n if (!particle || particle.group !== group) {\n return false;\n }\n particle.destroy(override);\n const zIdx = this._zArray.indexOf(particle);\n this._array.splice(index, 1);\n this._zArray.splice(zIdx, 1);\n this.pool.push(particle);\n this._engine.dispatchEvent(\"particleRemoved\", {\n container: this._container,\n data: {\n particle,\n },\n });\n return true;\n };\n this._engine = engine;\n this._container = container;\n this._nextId = 0;\n this._array = [];\n this._zArray = [];\n this.pool = [];\n this.limit = 0;\n this.needsSort = false;\n this.lastZIndex = 0;\n this._interactionManager = new InteractionManager(engine, container);\n const canvasSize = container.canvas.size;\n this.quadTree = new QuadTree(qTreeRectangle(canvasSize), qTreeCapacity);\n this.movers = this._engine.plugins.getMovers(container, true);\n this.updaters = this._engine.plugins.getUpdaters(container, true);\n }\n get count() {\n return this._array.length;\n }\n addManualParticles() {\n const container = this._container, options = container.actualOptions;\n for (const particle of options.manualParticles) {\n this.addParticle(particle.position ? getPosition(particle.position, container.canvas.size) : undefined, particle.options);\n }\n }\n addParticle(position, overrideOptions, group, initializer) {\n const container = this._container, options = container.actualOptions, limit = options.particles.number.limit;\n if (limit > 0) {\n const countToRemove = this.count + 1 - limit;\n if (countToRemove > 0) {\n this.removeQuantity(countToRemove);\n }\n }\n return this._pushParticle(position, overrideOptions, group, initializer);\n }\n clear() {\n this._array = [];\n this._zArray = [];\n }\n destroy() {\n this._array = [];\n this._zArray = [];\n this.movers = [];\n this.updaters = [];\n }\n async draw(delta) {\n const container = this._container;\n container.canvas.clear();\n await this.update(delta);\n for (const [, plugin] of container.plugins) {\n container.canvas.drawPlugin(plugin, delta);\n }\n for (const p of this._zArray) {\n p.draw(delta);\n }\n }\n filter(condition) {\n return this._array.filter(condition);\n }\n find(condition) {\n return this._array.find(condition);\n }\n handleClickMode(mode) {\n this._interactionManager.handleClickMode(mode);\n }\n init() {\n const container = this._container, options = container.actualOptions;\n this.lastZIndex = 0;\n this.needsSort = false;\n let handled = false;\n this.updaters = this._engine.plugins.getUpdaters(container, true);\n this._interactionManager.init();\n for (const [, plugin] of container.plugins) {\n if (plugin.particlesInitialization !== undefined) {\n handled = plugin.particlesInitialization();\n }\n if (handled) {\n break;\n }\n }\n this._interactionManager.init();\n for (const [, pathGenerator] of container.pathGenerators) {\n pathGenerator.init(container);\n }\n this.addManualParticles();\n if (!handled) {\n for (const group in options.particles.groups) {\n const groupOptions = options.particles.groups[group];\n for (let i = this.count, j = 0; j < groupOptions.number?.value && i < options.particles.number.value; i++, j++) {\n this.addParticle(undefined, groupOptions, group);\n }\n }\n for (let i = this.count; i < options.particles.number.value; i++) {\n this.addParticle();\n }\n }\n }\n push(nb, mouse, overrideOptions, group) {\n this.pushing = true;\n for (let i = 0; i < nb; i++) {\n this.addParticle(mouse?.position, overrideOptions, group);\n }\n this.pushing = false;\n }\n async redraw() {\n this.clear();\n this.init();\n await this.draw({ value: 0, factor: 0 });\n }\n remove(particle, group, override) {\n this.removeAt(this._array.indexOf(particle), undefined, group, override);\n }\n removeAt(index, quantity = 1, group, override) {\n if (index < 0 || index > this.count) {\n return;\n }\n let deleted = 0;\n for (let i = index; deleted < quantity && i < this.count; i++) {\n this._removeParticle(i--, group, override) && deleted++;\n }\n }\n removeQuantity(quantity, group) {\n this.removeAt(0, quantity, group);\n }\n setDensity() {\n const options = this._container.actualOptions, groups = options.particles.groups;\n for (const group in groups) {\n this._applyDensity(groups[group], 0, group);\n }\n this._applyDensity(options.particles, options.manualParticles.length);\n }\n async update(delta) {\n const container = this._container, particlesToDelete = new Set();\n this.quadTree = new QuadTree(qTreeRectangle(container.canvas.size), qTreeCapacity);\n for (const [, pathGenerator] of container.pathGenerators) {\n pathGenerator.update();\n }\n for (const [, plugin] of container.plugins) {\n plugin.update && plugin.update(delta);\n }\n for (const particle of this._array) {\n const resizeFactor = container.canvas.resizeFactor;\n if (resizeFactor && !particle.ignoresResizeRatio) {\n particle.position.x *= resizeFactor.width;\n particle.position.y *= resizeFactor.height;\n particle.initialPosition.x *= resizeFactor.width;\n particle.initialPosition.y *= resizeFactor.height;\n }\n particle.ignoresResizeRatio = false;\n await this._interactionManager.reset(particle);\n for (const [, plugin] of this._container.plugins) {\n if (particle.destroyed) {\n break;\n }\n if (plugin.particleUpdate) {\n plugin.particleUpdate(particle, delta);\n }\n }\n for (const mover of this.movers) {\n mover.isEnabled(particle) && mover.move(particle, delta);\n }\n if (particle.destroyed) {\n particlesToDelete.add(particle);\n continue;\n }\n this.quadTree.insert(new Point(particle.getPosition(), particle));\n }\n if (particlesToDelete.size) {\n const checkDelete = (p) => !particlesToDelete.has(p);\n this._array = this.filter(checkDelete);\n this._zArray = this._zArray.filter(checkDelete);\n this.pool.push(...particlesToDelete);\n }\n await this._interactionManager.externalInteract(delta);\n for (const particle of this._array) {\n for (const updater of this.updaters) {\n updater.update(particle, delta);\n }\n if (!particle.destroyed && !particle.spawning) {\n await this._interactionManager.particlesInteract(particle, delta);\n }\n }\n delete container.canvas.resizeFactor;\n if (this.needsSort) {\n const zArray = this._zArray;\n zArray.sort((a, b) => b.position.z - a.position.z || a.id - b.id);\n this.lastZIndex = zArray[zArray.length - 1].position.z;\n this.needsSort = false;\n }\n }\n}\n","import { getRangeValue } from \"../Utils/NumberUtils\";\nimport { isSsr } from \"../Utils/Utils\";\nexport class Retina {\n constructor(container) {\n this.container = container;\n this.pixelRatio = 1;\n this.reduceFactor = 1;\n }\n init() {\n const container = this.container, options = container.actualOptions;\n this.pixelRatio = !options.detectRetina || isSsr() ? 1 : window.devicePixelRatio;\n this.reduceFactor = 1;\n const ratio = this.pixelRatio;\n if (container.canvas.element) {\n const element = container.canvas.element;\n container.canvas.size.width = element.offsetWidth * ratio;\n container.canvas.size.height = element.offsetHeight * ratio;\n }\n const particles = options.particles, moveOptions = particles.move;\n this.attractDistance = getRangeValue(moveOptions.attract.distance) * ratio;\n this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;\n }\n initParticle(particle) {\n const options = particle.options, ratio = this.pixelRatio, moveOptions = options.move, moveDistance = moveOptions.distance, props = particle.retina;\n props.attractDistance = getRangeValue(moveOptions.attract.distance) * ratio;\n props.moveDrift = getRangeValue(moveOptions.drift) * ratio;\n props.moveSpeed = getRangeValue(moveOptions.speed) * ratio;\n props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;\n const maxDistance = props.maxDistance;\n maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;\n maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;\n props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n }\n}\n","import { getLogger, isFunction } from \"../Utils/Utils\";\nimport { Canvas } from \"./Canvas\";\nimport { EventListeners } from \"./Utils/EventListeners\";\nimport { Options } from \"../Options/Classes/Options\";\nimport { Particles } from \"./Particles\";\nimport { Retina } from \"./Retina\";\nimport { errorPrefix } from \"./Utils/Constants\";\nimport { getRangeValue } from \"../Utils/NumberUtils\";\nimport { loadOptions } from \"../Utils/OptionsUtils\";\nfunction guardCheck(container) {\n return container && !container.destroyed;\n}\nfunction initDelta(value, fpsLimit = 60, smooth = false) {\n return {\n value,\n factor: smooth ? 60 / fpsLimit : (60 * value) / 1000,\n };\n}\nfunction loadContainerOptions(engine, container, ...sourceOptionsArr) {\n const options = new Options(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\nconst defaultPathGeneratorKey = \"default\", defaultPathGenerator = {\n generate: (p) => p.velocity,\n init: () => {\n },\n update: () => {\n },\n reset: () => {\n },\n};\nexport class Container {\n constructor(engine, id, sourceOptions) {\n this.id = id;\n this._intersectionManager = (entries) => {\n if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {\n return;\n }\n for (const entry of entries) {\n if (entry.target !== this.interactivity.element) {\n continue;\n }\n (entry.isIntersecting ? this.play : this.pause)();\n }\n };\n this._nextFrame = async (timestamp) => {\n try {\n if (!this.smooth &&\n this.lastFrameTime !== undefined &&\n timestamp < this.lastFrameTime + 1000 / this.fpsLimit) {\n this.draw(false);\n return;\n }\n this.lastFrameTime ??= timestamp;\n const delta = initDelta(timestamp - this.lastFrameTime, this.fpsLimit, this.smooth);\n this.addLifeTime(delta.value);\n this.lastFrameTime = timestamp;\n if (delta.value > 1000) {\n this.draw(false);\n return;\n }\n await this.particles.draw(delta);\n if (!this.alive()) {\n this.destroy();\n return;\n }\n if (this.getAnimationStatus()) {\n this.draw(false);\n }\n }\n catch (e) {\n getLogger().error(`${errorPrefix} in animation loop`, e);\n }\n };\n this._engine = engine;\n this.fpsLimit = 120;\n this.smooth = false;\n this._delay = 0;\n this._duration = 0;\n this._lifeTime = 0;\n this._firstStart = true;\n this.started = false;\n this.destroyed = false;\n this._paused = true;\n this.lastFrameTime = 0;\n this.zLayers = 100;\n this.pageHidden = false;\n this._sourceOptions = sourceOptions;\n this._initialSourceOptions = sourceOptions;\n this.retina = new Retina(this);\n this.canvas = new Canvas(this);\n this.particles = new Particles(this._engine, this);\n this.pathGenerators = new Map();\n this.interactivity = {\n mouse: {\n clicking: false,\n inside: false,\n },\n };\n this.plugins = new Map();\n this.drawers = new Map();\n this._options = loadContainerOptions(this._engine, this);\n this.actualOptions = loadContainerOptions(this._engine, this);\n this._eventListeners = new EventListeners(this);\n if (typeof IntersectionObserver !== \"undefined\" && IntersectionObserver) {\n this._intersectionObserver = new IntersectionObserver((entries) => this._intersectionManager(entries));\n }\n this._engine.dispatchEvent(\"containerBuilt\", { container: this });\n }\n get options() {\n return this._options;\n }\n get sourceOptions() {\n return this._sourceOptions;\n }\n addClickHandler(callback) {\n if (!guardCheck(this)) {\n return;\n }\n const el = this.interactivity.element;\n if (!el) {\n return;\n }\n const clickOrTouchHandler = (e, pos, radius) => {\n if (!guardCheck(this)) {\n return;\n }\n const pxRatio = this.retina.pixelRatio, posRetina = {\n x: pos.x * pxRatio,\n y: pos.y * pxRatio,\n }, particles = this.particles.quadTree.queryCircle(posRetina, radius * pxRatio);\n callback(e, particles);\n };\n const clickHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n const mouseEvent = e, pos = {\n x: mouseEvent.offsetX || mouseEvent.clientX,\n y: mouseEvent.offsetY || mouseEvent.clientY,\n };\n clickOrTouchHandler(e, pos, 1);\n };\n const touchStartHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = true;\n touchMoved = false;\n };\n const touchMoveHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touchMoved = true;\n };\n const touchEndHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n if (touched && !touchMoved) {\n const touchEvent = e;\n let lastTouch = touchEvent.touches[touchEvent.touches.length - 1];\n if (!lastTouch) {\n lastTouch = touchEvent.changedTouches[touchEvent.changedTouches.length - 1];\n if (!lastTouch) {\n return;\n }\n }\n const element = this.canvas.element, canvasRect = element ? element.getBoundingClientRect() : undefined, pos = {\n x: lastTouch.clientX - (canvasRect ? canvasRect.left : 0),\n y: lastTouch.clientY - (canvasRect ? canvasRect.top : 0),\n };\n clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));\n }\n touched = false;\n touchMoved = false;\n };\n const touchCancelHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = false;\n touchMoved = false;\n };\n let touched = false, touchMoved = false;\n el.addEventListener(\"click\", clickHandler);\n el.addEventListener(\"touchstart\", touchStartHandler);\n el.addEventListener(\"touchmove\", touchMoveHandler);\n el.addEventListener(\"touchend\", touchEndHandler);\n el.addEventListener(\"touchcancel\", touchCancelHandler);\n }\n addLifeTime(value) {\n this._lifeTime += value;\n }\n addPath(key, generator, override = false) {\n if (!guardCheck(this) || (!override && this.pathGenerators.has(key))) {\n return false;\n }\n this.pathGenerators.set(key, generator ?? defaultPathGenerator);\n return true;\n }\n alive() {\n return !this._duration || this._lifeTime <= this._duration;\n }\n destroy() {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n this.particles.destroy();\n this.canvas.destroy();\n for (const [, drawer] of this.drawers) {\n drawer.destroy && drawer.destroy(this);\n }\n for (const key of this.drawers.keys()) {\n this.drawers.delete(key);\n }\n this._engine.plugins.destroy(this);\n this.destroyed = true;\n const mainArr = this._engine.dom(), idx = mainArr.findIndex((t) => t === this);\n if (idx >= 0) {\n mainArr.splice(idx, 1);\n }\n this._engine.dispatchEvent(\"containerDestroyed\", { container: this });\n }\n draw(force) {\n if (!guardCheck(this)) {\n return;\n }\n let refreshTime = force;\n this._drawAnimationFrame = requestAnimationFrame(async (timestamp) => {\n if (refreshTime) {\n this.lastFrameTime = undefined;\n refreshTime = false;\n }\n await this._nextFrame(timestamp);\n });\n }\n async export(type, options = {}) {\n for (const [, plugin] of this.plugins) {\n if (!plugin.export) {\n continue;\n }\n const res = await plugin.export(type, options);\n if (!res.supported) {\n continue;\n }\n return res.blob;\n }\n getLogger().error(`${errorPrefix} - Export plugin with type ${type} not found`);\n }\n getAnimationStatus() {\n return !this._paused && !this.pageHidden && guardCheck(this);\n }\n handleClickMode(mode) {\n if (!guardCheck(this)) {\n return;\n }\n this.particles.handleClickMode(mode);\n for (const [, plugin] of this.plugins) {\n plugin.handleClickMode && plugin.handleClickMode(mode);\n }\n }\n async init() {\n if (!guardCheck(this)) {\n return;\n }\n const shapes = this._engine.plugins.getSupportedShapes();\n for (const type of shapes) {\n const drawer = this._engine.plugins.getShapeDrawer(type);\n if (drawer) {\n this.drawers.set(type, drawer);\n }\n }\n this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n const availablePlugins = this._engine.plugins.getAvailablePlugins(this);\n for (const [id, plugin] of availablePlugins) {\n this.plugins.set(id, plugin);\n }\n this.retina.init();\n await this.canvas.init();\n this.updateActualOptions();\n this.canvas.initBackground();\n this.canvas.resize();\n this.zLayers = this.actualOptions.zLayers;\n this._duration = getRangeValue(this.actualOptions.duration) * 1000;\n this._delay = getRangeValue(this.actualOptions.delay) * 1000;\n this._lifeTime = 0;\n this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;\n this.smooth = this.actualOptions.smooth;\n for (const [, drawer] of this.drawers) {\n drawer.init && (await drawer.init(this));\n }\n for (const [, plugin] of this.plugins) {\n plugin.init && (await plugin.init());\n }\n this._engine.dispatchEvent(\"containerInit\", { container: this });\n this.particles.init();\n this.particles.setDensity();\n for (const [, plugin] of this.plugins) {\n plugin.particlesSetup && plugin.particlesSetup();\n }\n this._engine.dispatchEvent(\"particlesSetup\", { container: this });\n }\n async loadTheme(name) {\n if (!guardCheck(this)) {\n return;\n }\n this._currentTheme = name;\n await this.refresh();\n }\n pause() {\n if (!guardCheck(this)) {\n return;\n }\n if (this._drawAnimationFrame !== undefined) {\n cancelAnimationFrame(this._drawAnimationFrame);\n delete this._drawAnimationFrame;\n }\n if (this._paused) {\n return;\n }\n for (const [, plugin] of this.plugins) {\n plugin.pause && plugin.pause();\n }\n if (!this.pageHidden) {\n this._paused = true;\n }\n this._engine.dispatchEvent(\"containerPaused\", { container: this });\n }\n play(force) {\n if (!guardCheck(this)) {\n return;\n }\n const needsUpdate = this._paused || force;\n if (this._firstStart && !this.actualOptions.autoPlay) {\n this._firstStart = false;\n return;\n }\n if (this._paused) {\n this._paused = false;\n }\n if (needsUpdate) {\n for (const [, plugin] of this.plugins) {\n if (plugin.play) {\n plugin.play();\n }\n }\n }\n this._engine.dispatchEvent(\"containerPlay\", { container: this });\n this.draw(needsUpdate || false);\n }\n async refresh() {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n return this.start();\n }\n async reset() {\n if (!guardCheck(this)) {\n return;\n }\n this._initialSourceOptions = undefined;\n this._options = loadContainerOptions(this._engine, this);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n return this.refresh();\n }\n setNoise(noiseOrGenerator, init, update) {\n if (!guardCheck(this)) {\n return;\n }\n this.setPath(noiseOrGenerator, init, update);\n }\n setPath(pathOrGenerator, init, update) {\n if (!pathOrGenerator || !guardCheck(this)) {\n return;\n }\n const pathGenerator = { ...defaultPathGenerator };\n if (isFunction(pathOrGenerator)) {\n pathGenerator.generate = pathOrGenerator;\n if (init) {\n pathGenerator.init = init;\n }\n if (update) {\n pathGenerator.update = update;\n }\n }\n else {\n const oldGenerator = pathGenerator;\n pathGenerator.generate = pathOrGenerator.generate || oldGenerator.generate;\n pathGenerator.init = pathOrGenerator.init || oldGenerator.init;\n pathGenerator.update = pathOrGenerator.update || oldGenerator.update;\n }\n this.addPath(defaultPathGeneratorKey, pathGenerator, true);\n }\n async start() {\n if (!guardCheck(this) || this.started) {\n return;\n }\n await this.init();\n this.started = true;\n await new Promise((resolve) => {\n this._delayTimeout = setTimeout(async () => {\n this._eventListeners.addListeners();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.observe(this.interactivity.element);\n }\n for (const [, plugin] of this.plugins) {\n plugin.start && (await plugin.start());\n }\n this._engine.dispatchEvent(\"containerStarted\", { container: this });\n this.play();\n resolve();\n }, this._delay);\n });\n }\n stop() {\n if (!guardCheck(this) || !this.started) {\n return;\n }\n if (this._delayTimeout) {\n clearTimeout(this._delayTimeout);\n delete this._delayTimeout;\n }\n this._firstStart = true;\n this.started = false;\n this._eventListeners.removeListeners();\n this.pause();\n this.particles.clear();\n this.canvas.stop();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.unobserve(this.interactivity.element);\n }\n for (const [, plugin] of this.plugins) {\n plugin.stop && plugin.stop();\n }\n for (const key of this.plugins.keys()) {\n this.plugins.delete(key);\n }\n this._sourceOptions = this._options;\n this._engine.dispatchEvent(\"containerStopped\", { container: this });\n }\n updateActualOptions() {\n this.actualOptions.responsive = [];\n const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);\n this.actualOptions.setTheme(this._currentTheme);\n if (this.responsiveMaxWidth === newMaxWidth) {\n return false;\n }\n this.responsiveMaxWidth = newMaxWidth;\n return true;\n }\n}\n","export class EventDispatcher {\n constructor() {\n this._listeners = new Map();\n }\n addEventListener(type, listener) {\n this.removeEventListener(type, listener);\n let arr = this._listeners.get(type);\n if (!arr) {\n arr = [];\n this._listeners.set(type, arr);\n }\n arr.push(listener);\n }\n dispatchEvent(type, args) {\n const listeners = this._listeners.get(type);\n listeners && listeners.forEach((handler) => handler(args));\n }\n hasEventListener(type) {\n return !!this._listeners.get(type);\n }\n removeAllEventListeners(type) {\n if (!type) {\n this._listeners = new Map();\n }\n else {\n this._listeners.delete(type);\n }\n }\n removeEventListener(type, listener) {\n const arr = this._listeners.get(type);\n if (!arr) {\n return;\n }\n const length = arr.length, idx = arr.indexOf(listener);\n if (idx < 0) {\n return;\n }\n if (length === 1) {\n this._listeners.delete(type);\n }\n else {\n arr.splice(idx, 1);\n }\n }\n}\n","import { executeOnSingleOrMultiple } from \"../../Utils/Utils\";\nfunction getItemsFromInitializer(container, map, initializers, force = false) {\n let res = map.get(container);\n if (!res || force) {\n res = [...initializers.values()].map((t) => t(container));\n map.set(container, res);\n }\n return res;\n}\nexport class Plugins {\n constructor(engine) {\n this._engine = engine;\n this.plugins = [];\n this._initializers = {\n interactors: new Map(),\n movers: new Map(),\n updaters: new Map(),\n };\n this.interactors = new Map();\n this.movers = new Map();\n this.updaters = new Map();\n this.presets = new Map();\n this.drawers = new Map();\n this.pathGenerators = new Map();\n }\n addInteractor(name, initInteractor) {\n this._initializers.interactors.set(name, initInteractor);\n }\n addParticleMover(name, initMover) {\n this._initializers.movers.set(name, initMover);\n }\n addParticleUpdater(name, initUpdater) {\n this._initializers.updaters.set(name, initUpdater);\n }\n addPathGenerator(type, pathGenerator) {\n !this.getPathGenerator(type) && this.pathGenerators.set(type, pathGenerator);\n }\n addPlugin(plugin) {\n !this.getPlugin(plugin.id) && this.plugins.push(plugin);\n }\n addPreset(presetKey, options, override = false) {\n (override || !this.getPreset(presetKey)) && this.presets.set(presetKey, options);\n }\n addShapeDrawer(types, drawer) {\n executeOnSingleOrMultiple(types, (type) => {\n !this.getShapeDrawer(type) && this.drawers.set(type, drawer);\n });\n }\n destroy(container) {\n this.updaters.delete(container);\n this.movers.delete(container);\n this.interactors.delete(container);\n }\n getAvailablePlugins(container) {\n const res = new Map();\n for (const plugin of this.plugins) {\n plugin.needsPlugin(container.actualOptions) && res.set(plugin.id, plugin.getPlugin(container));\n }\n return res;\n }\n getInteractors(container, force = false) {\n return getItemsFromInitializer(container, this.interactors, this._initializers.interactors, force);\n }\n getMovers(container, force = false) {\n return getItemsFromInitializer(container, this.movers, this._initializers.movers, force);\n }\n getPathGenerator(type) {\n return this.pathGenerators.get(type);\n }\n getPlugin(plugin) {\n return this.plugins.find((t) => t.id === plugin);\n }\n getPreset(preset) {\n return this.presets.get(preset);\n }\n getShapeDrawer(type) {\n return this.drawers.get(type);\n }\n getSupportedShapes() {\n return this.drawers.keys();\n }\n getUpdaters(container, force = false) {\n return getItemsFromInitializer(container, this.updaters, this._initializers.updaters, force);\n }\n loadOptions(options, sourceOptions) {\n for (const plugin of this.plugins) {\n plugin.loadOptions(options, sourceOptions);\n }\n }\n loadParticlesOptions(container, options, ...sourceOptions) {\n const updaters = this.updaters.get(container);\n if (!updaters) {\n return;\n }\n for (const updater of updaters) {\n updater.loadOptions && updater.loadOptions(options, ...sourceOptions);\n }\n }\n}\n","import { errorPrefix, generatedAttribute } from \"./Utils/Constants\";\nimport { getLogger, isBoolean, isFunction, isNumber, isString, itemFromSingleOrMultiple } from \"../Utils/Utils\";\nimport { Container } from \"./Container\";\nimport { EventDispatcher } from \"../Utils/EventDispatcher\";\nimport { Plugins } from \"./Utils/Plugins\";\nimport { getRandom } from \"../Utils/NumberUtils\";\nasync function getDataFromUrl(data) {\n const url = itemFromSingleOrMultiple(data.url, data.index);\n if (!url) {\n return data.fallback;\n }\n const response = await fetch(url);\n if (response.ok) {\n return response.json();\n }\n getLogger().error(`${errorPrefix} ${response.status} while retrieving config file`);\n return data.fallback;\n}\nfunction isParamsEmpty(params) {\n return !params.id && !params.element && !params.url && !params.options;\n}\nfunction isParams(obj) {\n return !isParamsEmpty(obj);\n}\nexport class Engine {\n constructor() {\n this._configs = new Map();\n this._domArray = [];\n this._eventDispatcher = new EventDispatcher();\n this._initialized = false;\n this.plugins = new Plugins(this);\n }\n get configs() {\n const res = {};\n for (const [name, config] of this._configs) {\n res[name] = config;\n }\n return res;\n }\n get version() {\n return \"2.12.0\";\n }\n addConfig(nameOrConfig, config) {\n if (isString(nameOrConfig)) {\n if (config) {\n config.name = nameOrConfig;\n this._configs.set(nameOrConfig, config);\n }\n }\n else {\n this._configs.set(nameOrConfig.name ?? \"default\", nameOrConfig);\n }\n }\n addEventListener(type, listener) {\n this._eventDispatcher.addEventListener(type, listener);\n }\n async addInteractor(name, interactorInitializer, refresh = true) {\n this.plugins.addInteractor(name, interactorInitializer);\n await this.refresh(refresh);\n }\n async addMover(name, moverInitializer, refresh = true) {\n this.plugins.addParticleMover(name, moverInitializer);\n await this.refresh(refresh);\n }\n async addParticleUpdater(name, updaterInitializer, refresh = true) {\n this.plugins.addParticleUpdater(name, updaterInitializer);\n await this.refresh(refresh);\n }\n async addPathGenerator(name, generator, refresh = true) {\n this.plugins.addPathGenerator(name, generator);\n await this.refresh(refresh);\n }\n async addPlugin(plugin, refresh = true) {\n this.plugins.addPlugin(plugin);\n await this.refresh(refresh);\n }\n async addPreset(preset, options, override = false, refresh = true) {\n this.plugins.addPreset(preset, options, override);\n await this.refresh(refresh);\n }\n async addShape(shape, drawer, initOrRefresh, afterEffectOrRefresh, destroyOrRefresh, refresh = true) {\n let customDrawer;\n let realRefresh = refresh, realInit, realAfterEffect, realDestroy;\n if (isBoolean(initOrRefresh)) {\n realRefresh = initOrRefresh;\n realInit = undefined;\n }\n else {\n realInit = initOrRefresh;\n }\n if (isBoolean(afterEffectOrRefresh)) {\n realRefresh = afterEffectOrRefresh;\n realAfterEffect = undefined;\n }\n else {\n realAfterEffect = afterEffectOrRefresh;\n }\n if (isBoolean(destroyOrRefresh)) {\n realRefresh = destroyOrRefresh;\n realDestroy = undefined;\n }\n else {\n realDestroy = destroyOrRefresh;\n }\n if (isFunction(drawer)) {\n customDrawer = {\n afterEffect: realAfterEffect,\n destroy: realDestroy,\n draw: drawer,\n init: realInit,\n };\n }\n else {\n customDrawer = drawer;\n }\n this.plugins.addShapeDrawer(shape, customDrawer);\n await this.refresh(realRefresh);\n }\n dispatchEvent(type, args) {\n this._eventDispatcher.dispatchEvent(type, args);\n }\n dom() {\n return this._domArray;\n }\n domItem(index) {\n const dom = this.dom(), item = dom[index];\n if (!item || item.destroyed) {\n dom.splice(index, 1);\n return;\n }\n return item;\n }\n init() {\n if (this._initialized) {\n return;\n }\n this._initialized = true;\n }\n async load(tagIdOrOptionsOrParams, options) {\n return this.loadFromArray(tagIdOrOptionsOrParams, options);\n }\n async loadFromArray(tagIdOrOptionsOrParams, optionsOrIndex, index) {\n let params;\n if (!isParams(tagIdOrOptionsOrParams)) {\n params = {};\n if (isString(tagIdOrOptionsOrParams)) {\n params.id = tagIdOrOptionsOrParams;\n }\n else {\n params.options = tagIdOrOptionsOrParams;\n }\n if (isNumber(optionsOrIndex)) {\n params.index = optionsOrIndex;\n }\n else {\n params.options = optionsOrIndex ?? params.options;\n }\n params.index = index ?? params.index;\n }\n else {\n params = tagIdOrOptionsOrParams;\n }\n return this._loadParams(params);\n }\n async loadJSON(tagId, pathConfigJson, index) {\n let url, id;\n if (isNumber(pathConfigJson) || pathConfigJson === undefined) {\n url = tagId;\n }\n else {\n id = tagId;\n url = pathConfigJson;\n }\n return this._loadParams({ id: id, url, index });\n }\n async refresh(refresh = true) {\n if (!refresh) {\n return;\n }\n this.dom().forEach((t) => t.refresh());\n }\n removeEventListener(type, listener) {\n this._eventDispatcher.removeEventListener(type, listener);\n }\n async set(id, element, options, index) {\n const params = { index };\n if (isString(id)) {\n params.id = id;\n }\n else {\n params.element = id;\n }\n if (element instanceof HTMLElement) {\n params.element = element;\n }\n else {\n params.options = element;\n }\n if (isNumber(options)) {\n params.index = options;\n }\n else {\n params.options = options ?? params.options;\n }\n return this._loadParams(params);\n }\n async setJSON(id, element, pathConfigJson, index) {\n const params = {};\n if (id instanceof HTMLElement) {\n params.element = id;\n params.url = element;\n params.index = pathConfigJson;\n }\n else {\n params.id = id;\n params.element = element;\n params.url = pathConfigJson;\n params.index = index;\n }\n return this._loadParams(params);\n }\n setOnClickHandler(callback) {\n const dom = this.dom();\n if (!dom.length) {\n throw new Error(`${errorPrefix} can only set click handlers after calling tsParticles.load()`);\n }\n for (const domItem of dom) {\n domItem.addClickHandler(callback);\n }\n }\n async _loadParams(params) {\n const id = params.id ?? `tsparticles${Math.floor(getRandom() * 10000)}`, { index, url } = params, options = url ? await getDataFromUrl({ fallback: params.options, url, index }) : params.options;\n let domContainer = params.element ?? document.getElementById(id);\n if (!domContainer) {\n domContainer = document.createElement(\"div\");\n domContainer.id = id;\n document.body.append(domContainer);\n }\n const currentOptions = itemFromSingleOrMultiple(options, index), dom = this.dom(), oldIndex = dom.findIndex((v) => v.id === id);\n if (oldIndex >= 0) {\n const old = this.domItem(oldIndex);\n if (old && !old.destroyed) {\n old.destroy();\n dom.splice(oldIndex, 1);\n }\n }\n let canvasEl;\n if (domContainer.tagName.toLowerCase() === \"canvas\") {\n canvasEl = domContainer;\n canvasEl.dataset[generatedAttribute] = \"false\";\n }\n else {\n const existingCanvases = domContainer.getElementsByTagName(\"canvas\");\n if (existingCanvases.length) {\n canvasEl = existingCanvases[0];\n canvasEl.dataset[generatedAttribute] = \"false\";\n }\n else {\n canvasEl = document.createElement(\"canvas\");\n canvasEl.dataset[generatedAttribute] = \"true\";\n domContainer.appendChild(canvasEl);\n }\n }\n if (!canvasEl.style.width) {\n canvasEl.style.width = \"100%\";\n }\n if (!canvasEl.style.height) {\n canvasEl.style.height = \"100%\";\n }\n const newItem = new Container(this, id, currentOptions);\n if (oldIndex >= 0) {\n dom.splice(oldIndex, 0, newItem);\n }\n else {\n dom.push(newItem);\n }\n newItem.canvas.loadCanvas(canvasEl);\n await newItem.start();\n return newItem;\n }\n}\n","import { getRangeValue, parseAlpha } from \"./NumberUtils\";\nimport { hslToRgb, hslaToRgba } from \"./ColorUtils\";\nexport class HslColorManager {\n constructor() {\n this.key = \"hsl\";\n this.stringPrefix = \"hsl\";\n }\n handleColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.s !== undefined && hslColor.l !== undefined) {\n return hslToRgb(hslColor);\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.l !== undefined) {\n return hslToRgb({\n h: getRangeValue(hslColor.h),\n l: getRangeValue(hslColor.l),\n s: getRangeValue(hslColor.s),\n });\n }\n }\n parseString(input) {\n if (!input.startsWith(\"hsl\")) {\n return;\n }\n const regex = /hsla?\\(\\s*(\\d+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*(,\\s*([\\d.%]+)\\s*)?\\)/i, result = regex.exec(input);\n return result\n ? hslaToRgba({\n a: result.length > 4 ? parseAlpha(result[5]) : 1,\n h: parseInt(result[1], 10),\n l: parseInt(result[3], 10),\n s: parseInt(result[2], 10),\n })\n : undefined;\n }\n}\n","import { getRangeValue, parseAlpha } from \"./NumberUtils\";\nexport class RgbColorManager {\n constructor() {\n this.key = \"rgb\";\n this.stringPrefix = \"rgb\";\n }\n handleColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return rgbColor;\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return {\n r: getRangeValue(rgbColor.r),\n g: getRangeValue(rgbColor.g),\n b: getRangeValue(rgbColor.b),\n };\n }\n }\n parseString(input) {\n if (!input.startsWith(this.stringPrefix)) {\n return;\n }\n const regex = /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([\\d.%]+)\\s*)?\\)/i, result = regex.exec(input);\n return result\n ? {\n a: result.length > 4 ? parseAlpha(result[5]) : 1,\n b: parseInt(result[3], 10),\n g: parseInt(result[2], 10),\n r: parseInt(result[1], 10),\n }\n : undefined;\n }\n}\n","import { init } from \"./init\";\nimport { isSsr } from \"./Utils/Utils\";\nconst tsParticles = init();\nif (!isSsr()) {\n window.tsParticles = tsParticles;\n}\nexport * from \"./exports\";\nexport * from \"./export-types\";\nexport { tsParticles };\n","import { Engine } from \"./Core/Engine\";\nimport { HslColorManager } from \"./Utils/HslColorManager\";\nimport { RgbColorManager } from \"./Utils/RgbColorManager\";\nimport { addColorManager } from \"./Utils/ColorUtils\";\nexport function init() {\n const rgbColorManager = new RgbColorManager(), hslColorManager = new HslColorManager();\n addColorManager(rgbColorManager);\n addColorManager(hslColorManager);\n const engine = new Engine();\n engine.init();\n return engine;\n}\n","const isObject = (val) => typeof val === \"object\" && val !== null;\nexport function deepCompare(obj1, obj2, excludeKeyFn = () => false) {\n if (!isObject(obj1) || !isObject(obj2)) {\n return obj1 === obj2;\n }\n const keys1 = Object.keys(obj1).filter(key => !excludeKeyFn(key)), keys2 = Object.keys(obj2).filter(key => !excludeKeyFn(key));\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const value1 = obj1[key], value2 = obj2[key];\n if (isObject(value1) && isObject(value2)) {\n if (value1 === obj2 && value2 === obj1) {\n continue;\n }\n if (!deepCompare(value1, value2, excludeKeyFn)) {\n return false;\n }\n }\n else if (Array.isArray(value1) && Array.isArray(value2)) {\n if (!deepCompareArrays(value1, value2, excludeKeyFn)) {\n return false;\n }\n }\n else if (value1 !== value2) {\n return false;\n }\n }\n return true;\n}\nfunction deepCompareArrays(arr1, arr2, excludeKeyFn) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0; i < arr1.length; i++) {\n const val1 = arr1[i], val2 = arr2[i];\n if (Array.isArray(val1) && Array.isArray(val2)) {\n if (!deepCompareArrays(val1, val2, excludeKeyFn)) {\n return false;\n }\n }\n else if (isObject(val1) && isObject(val2)) {\n if (!deepCompare(val1, val2, excludeKeyFn)) {\n return false;\n }\n }\n else if (val1 !== val2) {\n return false;\n }\n }\n return true;\n}\n","import React, { Component } from \"react\";\nimport { tsParticles } from \"tsparticles-engine\";\nimport { deepCompare } from \"./Utils\";\nconst defaultId = \"tsparticles\";\nclass Particles extends Component {\n constructor(props) {\n super(props);\n this.state = {\n init: false,\n library: undefined,\n };\n }\n destroy() {\n if (!this.state.library) {\n return;\n }\n this.state.library.destroy();\n this.setState({\n library: undefined,\n });\n }\n shouldComponentUpdate(nextProps) {\n const nextOptions = nextProps.options ?? nextProps.params, currentOptions = this.props.options ?? this.props.params;\n return (nextProps.url !== this.props.url ||\n nextProps.id !== this.props.id ||\n nextProps.canvasClassName !== this.props.canvasClassName ||\n nextProps.className !== this.props.className ||\n nextProps.height !== this.props.height ||\n nextProps.width !== this.props.width ||\n !deepCompare(nextProps.style, this.props.style) ||\n nextProps.init !== this.props.init ||\n nextProps.loaded !== this.props.loaded ||\n !deepCompare(nextOptions, currentOptions, key => key.startsWith(\"_\")));\n }\n componentDidUpdate() {\n this.refresh();\n }\n forceUpdate() {\n this.refresh().then(() => {\n super.forceUpdate();\n });\n }\n componentDidMount() {\n (async () => {\n if (this.props.init) {\n await this.props.init(tsParticles);\n }\n this.setState({\n init: true,\n }, async () => {\n await this.loadParticles();\n });\n })();\n }\n componentWillUnmount() {\n this.destroy();\n }\n render() {\n const { width, height, className, canvasClassName, id } = this.props;\n return (React.createElement(\"div\", { className: className, id: id },\n React.createElement(\"canvas\", { className: canvasClassName, style: {\n ...this.props.style,\n width,\n height,\n } })));\n }\n async refresh() {\n this.destroy();\n await this.loadParticles();\n }\n async loadParticles() {\n if (!this.state.init) {\n return;\n }\n const id = this.props.id ?? Particles.defaultProps.id ?? defaultId, container = await tsParticles.load({\n url: this.props.url,\n id,\n options: this.props.options ?? this.props.params,\n });\n if (this.props.container) {\n this.props.container.current = container;\n }\n this.setState({\n library: container,\n });\n if (this.props.loaded) {\n await this.props.loaded(container);\n }\n }\n}\nParticles.defaultProps = {\n width: \"100%\",\n height: \"100%\",\n options: {},\n style: {},\n url: undefined,\n id: defaultId,\n};\nexport default Particles;\n","import Particles from \"./Particles\";\nexport default Particles;\nexport { Particles };\n","import { tsParticles } from \"tsparticles-engine\";\nexport class Particles {\n static init(options) {\n const particles = new Particles(), selector = options.selector;\n if (!selector) {\n throw new Error(\"No selector provided\");\n }\n const el = document.querySelector(selector);\n if (!el) {\n throw new Error(\"No element found for selector\");\n }\n tsParticles\n .set(selector.replace(\".\", \"\").replace(\"!\", \"\"), el, {\n fullScreen: {\n enable: false,\n },\n particles: {\n color: {\n value: options.color ?? \"!000000\",\n },\n links: {\n color: \"random\",\n distance: options.minDistance ?? 120,\n enable: options.connectParticles ?? false,\n },\n move: {\n enable: true,\n speed: options.speed ?? 0.5,\n },\n number: {\n value: options.maxParticles ?? 100,\n },\n size: {\n value: { min: 1, max: options.sizeVariations ?? 3 },\n },\n },\n responsive: options.responsive?.map((responsive) => ({\n maxWidth: responsive.breakpoint,\n options: {\n particles: {\n color: {\n value: responsive.options?.color,\n },\n links: {\n distance: responsive.options?.minDistance,\n enable: responsive.options?.connectParticles,\n },\n number: {\n value: options.maxParticles,\n },\n move: {\n enable: true,\n speed: responsive.options?.speed,\n },\n size: {\n value: responsive.options?.sizeVariations,\n },\n },\n },\n })),\n })\n .then((container) => {\n particles._container = container;\n });\n return particles;\n }\n destroy() {\n const container = this._container;\n container && container.destroy();\n }\n pauseAnimation() {\n const container = this._container;\n container && container.pause();\n }\n resumeAnimation() {\n const container = this._container;\n container && container.play();\n }\n}\n","const initParticlesJS = (engine) => {\n const particlesJS = (tagId, options) => {\n return engine.load(tagId, options);\n };\n particlesJS.load = (tagId, pathConfigJson, callback) => {\n engine\n .loadJSON(tagId, pathConfigJson)\n .then((container) => {\n if (container) {\n callback(container);\n }\n })\n .catch(() => {\n callback(undefined);\n });\n };\n particlesJS.setOnClickHandler = (callback) => {\n engine.setOnClickHandler(callback);\n };\n const pJSDom = engine.dom();\n return { particlesJS, pJSDom };\n};\nexport { initParticlesJS };\n","import { Particles } from \"./marcbruederlin/Particles\";\nimport { initParticlesJS } from \"./VincentGarreau/particles\";\nconst initPjs = (engine) => {\n const { particlesJS, pJSDom } = initParticlesJS(engine);\n window.particlesJS = particlesJS;\n window.pJSDom = pJSDom;\n window.Particles = Particles;\n return { particlesJS, pJSDom, Particles };\n};\nexport { initPjs };\n","import { clamp, getDistances, getRandom, } from \"tsparticles-engine\";\nexport function applyDistance(particle) {\n const initialPosition = particle.initialPosition, { dx, dy } = getDistances(initialPosition, particle.position), dxFixed = Math.abs(dx), dyFixed = Math.abs(dy), { maxDistance } = particle.retina, hDistance = maxDistance.horizontal, vDistance = maxDistance.vertical;\n if (!hDistance && !vDistance) {\n return;\n }\n if (((hDistance && dxFixed >= hDistance) || (vDistance && dyFixed >= vDistance)) && !particle.misplaced) {\n particle.misplaced = (!!hDistance && dxFixed > hDistance) || (!!vDistance && dyFixed > vDistance);\n if (hDistance) {\n particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;\n }\n if (vDistance) {\n particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;\n }\n }\n else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {\n particle.misplaced = false;\n }\n else if (particle.misplaced) {\n const pos = particle.position, vel = particle.velocity;\n if (hDistance && ((pos.x < initialPosition.x && vel.x < 0) || (pos.x > initialPosition.x && vel.x > 0))) {\n vel.x *= -getRandom();\n }\n if (vDistance && ((pos.y < initialPosition.y && vel.y < 0) || (pos.y > initialPosition.y && vel.y > 0))) {\n vel.y *= -getRandom();\n }\n }\n}\nexport function move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta) {\n applyPath(particle, delta);\n const gravityOptions = particle.gravity, gravityFactor = gravityOptions?.enable && gravityOptions.inverse ? -1 : 1;\n if (moveDrift && moveSpeed) {\n particle.velocity.x += (moveDrift * delta.factor) / (60 * moveSpeed);\n }\n if (gravityOptions?.enable && moveSpeed) {\n particle.velocity.y += (gravityFactor * (gravityOptions.acceleration * delta.factor)) / (60 * moveSpeed);\n }\n const decay = particle.moveDecay;\n particle.velocity.multTo(decay);\n const velocity = particle.velocity.mult(moveSpeed);\n if (gravityOptions?.enable &&\n maxSpeed > 0 &&\n ((!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed) ||\n (gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed))) {\n velocity.y = gravityFactor * maxSpeed;\n if (moveSpeed) {\n particle.velocity.y = velocity.y / moveSpeed;\n }\n }\n const zIndexOptions = particle.options.zIndex, zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;\n velocity.multTo(zVelocityFactor);\n const { position } = particle;\n position.addTo(velocity);\n if (moveOptions.vibrate) {\n position.x += Math.sin(position.x * Math.cos(position.y));\n position.y += Math.cos(position.y * Math.sin(position.x));\n }\n}\nexport function spin(particle, moveSpeed) {\n const container = particle.container;\n if (!particle.spin) {\n return;\n }\n const updateFunc = {\n x: particle.spin.direction === \"clockwise\" ? Math.cos : Math.sin,\n y: particle.spin.direction === \"clockwise\" ? Math.sin : Math.cos,\n };\n particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);\n particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);\n particle.spin.radius += particle.spin.acceleration;\n const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);\n if (particle.spin.radius > maxCanvasSize / 2) {\n particle.spin.radius = maxCanvasSize / 2;\n particle.spin.acceleration *= -1;\n }\n else if (particle.spin.radius < 0) {\n particle.spin.radius = 0;\n particle.spin.acceleration *= -1;\n }\n particle.spin.angle += (moveSpeed / 100) * (1 - particle.spin.radius / maxCanvasSize);\n}\nexport function applyPath(particle, delta) {\n const particlesOptions = particle.options, pathOptions = particlesOptions.move.path, pathEnabled = pathOptions.enable;\n if (!pathEnabled) {\n return;\n }\n if (particle.lastPathTime <= particle.pathDelay) {\n particle.lastPathTime += delta.value;\n return;\n }\n const path = particle.pathGenerator?.generate(particle, delta);\n if (path) {\n particle.velocity.addTo(path);\n }\n if (pathOptions.clamp) {\n particle.velocity.x = clamp(particle.velocity.x, -1, 1);\n particle.velocity.y = clamp(particle.velocity.y, -1, 1);\n }\n particle.lastPathTime -= particle.pathDelay;\n}\nexport function getProximitySpeedFactor(particle) {\n return particle.slow.inRange ? particle.slow.factor : 1;\n}\n","import { getDistance, getRangeMax, getRangeValue, } from \"tsparticles-engine\";\nimport { applyDistance, getProximitySpeedFactor, move, spin } from \"./Utils\";\nconst diffFactor = 2;\nexport class BaseMover {\n constructor() {\n this._initSpin = (particle) => {\n const container = particle.container, options = particle.options, spinOptions = options.move.spin;\n if (!spinOptions.enable) {\n return;\n }\n const spinPos = spinOptions.position ?? { x: 50, y: 50 }, spinCenter = {\n x: (spinPos.x / 100) * container.canvas.size.width,\n y: (spinPos.y / 100) * container.canvas.size.height,\n }, pos = particle.getPosition(), distance = getDistance(pos, spinCenter), spinAcceleration = getRangeValue(spinOptions.acceleration);\n particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;\n particle.spin = {\n center: spinCenter,\n direction: particle.velocity.x >= 0 ? \"clockwise\" : \"counter-clockwise\",\n angle: particle.velocity.angle,\n radius: distance,\n acceleration: particle.retina.spinAcceleration,\n };\n };\n }\n init(particle) {\n const options = particle.options, gravityOptions = options.move.gravity;\n particle.gravity = {\n enable: gravityOptions.enable,\n acceleration: getRangeValue(gravityOptions.acceleration),\n inverse: gravityOptions.inverse,\n };\n this._initSpin(particle);\n }\n isEnabled(particle) {\n return !particle.destroyed && particle.options.move.enable;\n }\n move(particle, delta) {\n const particleOptions = particle.options, moveOptions = particleOptions.move;\n if (!moveOptions.enable) {\n return;\n }\n const container = particle.container, pxRatio = container.retina.pixelRatio, slowFactor = getProximitySpeedFactor(particle), baseSpeed = (particle.retina.moveSpeed ??= getRangeValue(moveOptions.speed) * pxRatio) *\n container.retina.reduceFactor, moveDrift = (particle.retina.moveDrift ??= getRangeValue(particle.options.move.drift) * pxRatio), maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, moveSpeed = (baseSpeed * sizeFactor * slowFactor * (delta.factor || 1)) / diffFactor, maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed;\n if (moveOptions.spin.enable) {\n spin(particle, moveSpeed);\n }\n else {\n move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta);\n }\n applyDistance(particle);\n }\n}\n","import { isObject } from \"tsparticles-engine\";\nexport class CircleDrawer {\n draw(context, particle, radius) {\n if (!particle.circleRange) {\n particle.circleRange = { min: 0, max: Math.PI * 2 };\n }\n const circleRange = particle.circleRange;\n context.arc(0, 0, radius, circleRange.min, circleRange.max, false);\n }\n getSidesCount() {\n return 12;\n }\n particleInit(container, particle) {\n const shapeData = particle.shapeData, angle = shapeData?.angle ?? {\n max: 360,\n min: 0,\n };\n particle.circleRange = !isObject(angle)\n ? {\n min: 0,\n max: (angle * Math.PI) / 180,\n }\n : { min: (angle.min * Math.PI) / 180, max: (angle.max * Math.PI) / 180 };\n }\n}\n","import { randomInRange, } from \"tsparticles-engine\";\nfunction updateColorValue(delta, colorValue, valueAnimation, max, decrease) {\n if (!colorValue ||\n !valueAnimation.enable ||\n ((colorValue.maxLoops ?? 0) > 0 && (colorValue.loops ?? 0) > (colorValue.maxLoops ?? 0))) {\n return;\n }\n if (!colorValue.time) {\n colorValue.time = 0;\n }\n if ((colorValue.delayTime ?? 0) > 0 && colorValue.time < (colorValue.delayTime ?? 0)) {\n colorValue.time += delta.value;\n }\n if ((colorValue.delayTime ?? 0) > 0 && colorValue.time < (colorValue.delayTime ?? 0)) {\n return;\n }\n const offset = randomInRange(valueAnimation.offset), velocity = (colorValue.velocity ?? 0) * delta.factor + offset * 3.6, decay = colorValue.decay ?? 1;\n if (!decrease || colorValue.status === \"increasing\") {\n colorValue.value += velocity;\n if (colorValue.value > max) {\n if (!colorValue.loops) {\n colorValue.loops = 0;\n }\n colorValue.loops++;\n if (decrease) {\n colorValue.status = \"decreasing\";\n colorValue.value -= colorValue.value % max;\n }\n }\n }\n else {\n colorValue.value -= velocity;\n if (colorValue.value < 0) {\n if (!colorValue.loops) {\n colorValue.loops = 0;\n }\n colorValue.loops++;\n colorValue.status = \"increasing\";\n colorValue.value += colorValue.value;\n }\n }\n if (colorValue.velocity && decay !== 1) {\n colorValue.velocity *= decay;\n }\n if (colorValue.value > max) {\n colorValue.value %= max;\n }\n}\nexport function updateColor(particle, delta) {\n const { h: hAnimation, s: sAnimation, l: lAnimation } = particle.options.color.animation, { color } = particle;\n if (!color) {\n return;\n }\n const { h, s, l } = color;\n if (h) {\n updateColorValue(delta, h, hAnimation, 360, false);\n }\n if (s) {\n updateColorValue(delta, s, sAnimation, 100, true);\n }\n if (l) {\n updateColorValue(delta, l, lAnimation, 100, true);\n }\n}\n","import { getHslAnimationFromHsl, rangeColorToHsl, } from \"tsparticles-engine\";\nimport { updateColor } from \"./Utils\";\nexport class ColorUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const hslColor = rangeColorToHsl(particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = getHslAnimationFromHsl(hslColor, particle.options.color.animation, this.container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const { h: hAnimation, s: sAnimation, l: lAnimation } = particle.options.color.animation, { color } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n ((color?.h.value !== undefined && hAnimation.enable) ||\n (color?.s.value !== undefined && sAnimation.enable) ||\n (color?.l.value !== undefined && lAnimation.enable)));\n }\n update(particle, delta) {\n updateColor(particle, delta);\n }\n}\n","import { getRandom, getRangeValue, initParticleNumericAnimationValue, } from \"tsparticles-engine\";\nimport { updateOpacity } from \"./Utils\";\nexport class OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const opacityOptions = particle.options.opacity;\n particle.opacity = initParticleNumericAnimationValue(opacityOptions, 1);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity =\n (getRangeValue(opacityAnimation.speed) / 100) * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n return (!particle.destroyed &&\n !particle.spawning &&\n !!particle.opacity &&\n particle.opacity.enable &&\n ((particle.opacity.maxLoops ?? 0) <= 0 ||\n ((particle.opacity.maxLoops ?? 0) > 0 &&\n (particle.opacity.loops ?? 0) < (particle.opacity.maxLoops ?? 0))));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateOpacity(particle, delta);\n }\n}\n","import { clamp } from \"tsparticles-engine\";\nfunction checkDestroy(particle, value, minValue, maxValue) {\n switch (particle.options.opacity.animation.destroy) {\n case \"max\":\n if (value >= maxValue) {\n particle.destroy();\n }\n break;\n case \"min\":\n if (value <= minValue) {\n particle.destroy();\n }\n break;\n }\n}\nexport function updateOpacity(particle, delta) {\n const data = particle.opacity;\n if (particle.destroyed || !data?.enable || ((data.maxLoops ?? 0) > 0 && (data.loops ?? 0) > (data.maxLoops ?? 0))) {\n return;\n }\n const minValue = data.min, maxValue = data.max, decay = data.decay ?? 1;\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? 0) > 0 && data.time < (data.delayTime ?? 0)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? 0) > 0 && data.time < (data.delayTime ?? 0)) {\n return;\n }\n switch (data.status) {\n case \"increasing\":\n if (data.value >= maxValue) {\n data.status = \"decreasing\";\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n }\n else {\n data.value += (data.velocity ?? 0) * delta.factor;\n }\n break;\n case \"decreasing\":\n if (data.value <= minValue) {\n data.status = \"increasing\";\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n }\n else {\n data.value -= (data.velocity ?? 0) * delta.factor;\n }\n break;\n }\n if (data.velocity && data.decay !== 1) {\n data.velocity *= decay;\n }\n checkDestroy(particle, data.value, minValue, maxValue);\n if (!particle.destroyed) {\n data.value = clamp(data.value, minValue, maxValue);\n }\n}\n","import { calculateBounds, } from \"tsparticles-engine\";\nimport { bounceHorizontal, bounceVertical } from \"./Utils\";\nexport class BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\n \"bounce\",\n \"bounce-vertical\",\n \"bounce-horizontal\",\n \"bounceVertical\",\n \"bounceHorizontal\",\n \"split\",\n ];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const [, plugin] of container.plugins) {\n if (plugin.particleBounce !== undefined) {\n handled = plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;\n bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });\n bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });\n }\n}\n","import { getValue } from \"tsparticles-engine\";\nexport function bounceHorizontal(data) {\n if ((data.outMode !== \"bounce\" &&\n data.outMode !== \"bounce-horizontal\" &&\n data.outMode !== \"bounceHorizontal\" &&\n data.outMode !== \"split\") ||\n (data.direction !== \"left\" && data.direction !== \"right\")) {\n return;\n }\n if (data.bounds.right < 0 && data.direction === \"left\") {\n data.particle.position.x = data.size + data.offset.x;\n }\n else if (data.bounds.left > data.canvasSize.width && data.direction === \"right\") {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if ((data.direction === \"right\" && data.bounds.right >= data.canvasSize.width && velocity > 0) ||\n (data.direction === \"left\" && data.bounds.left <= 0 && velocity < 0)) {\n const newVelocity = getValue(data.particle.options.bounce.horizontal);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === \"right\") {\n data.particle.position.x = data.canvasSize.width - minPos;\n }\n else if (data.bounds.left <= 0 && data.direction === \"left\") {\n data.particle.position.x = minPos;\n }\n if (data.outMode === \"split\") {\n data.particle.destroy();\n }\n}\nexport function bounceVertical(data) {\n if ((data.outMode !== \"bounce\" &&\n data.outMode !== \"bounce-vertical\" &&\n data.outMode !== \"bounceVertical\" &&\n data.outMode !== \"split\") ||\n (data.direction !== \"bottom\" && data.direction !== \"top\")) {\n return;\n }\n if (data.bounds.bottom < 0 && data.direction === \"top\") {\n data.particle.position.y = data.size + data.offset.y;\n }\n else if (data.bounds.top > data.canvasSize.height && data.direction === \"bottom\") {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if ((data.direction === \"bottom\" && data.bounds.bottom >= data.canvasSize.height && velocity > 0) ||\n (data.direction === \"top\" && data.bounds.top <= 0 && velocity < 0)) {\n const newVelocity = getValue(data.particle.options.bounce.vertical);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === \"bottom\") {\n data.particle.position.y = data.canvasSize.height - minPos;\n }\n else if (data.bounds.top <= 0 && data.direction === \"top\") {\n data.particle.position.y = minPos;\n }\n if (data.outMode === \"split\") {\n data.particle.destroy();\n }\n}\n","import { Vector, getDistances, isPointInside, } from \"tsparticles-engine\";\nexport class DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"destroy\"];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"normal\":\n case \"outside\":\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case \"inside\": {\n const { dx, dy } = getDistances(particle.position, particle.moveCenter);\n const { x: vx, y: vy } = particle.velocity;\n if ((vx < 0 && dx > particle.moveCenter.radius) ||\n (vy < 0 && dy > particle.moveCenter.radius) ||\n (vx >= 0 && dx < -particle.moveCenter.radius) ||\n (vy >= 0 && dy < -particle.moveCenter.radius)) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, undefined, true);\n }\n}\n","import { Vector, isPointInside, } from \"tsparticles-engine\";\nexport class NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"none\"];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal &&\n (direction === \"left\" || direction === \"right\")) ||\n (particle.options.move.distance.vertical &&\n (direction === \"top\" || direction === \"bottom\"))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity, container = this.container;\n const canvasSize = container.canvas.size;\n const pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if ((particle.velocity.y > 0 && particle.position.y <= canvasSize.height + pRadius) ||\n (particle.velocity.y < 0 && particle.position.y >= -pRadius) ||\n (particle.velocity.x > 0 && particle.position.x <= canvasSize.width + pRadius) ||\n (particle.velocity.x < 0 && particle.position.x >= -pRadius)) {\n return;\n }\n if (!isPointInside(particle.position, container.canvas.size, Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n }\n else {\n const position = particle.position;\n if ((!gravityOptions.inverse &&\n position.y > canvasSize.height + pRadius &&\n direction === \"bottom\") ||\n (gravityOptions.inverse && position.y < -pRadius && direction === \"top\")) {\n container.particles.remove(particle);\n }\n }\n }\n}\n","import { Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from \"tsparticles-engine\";\nexport class OutOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"out\"];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"inside\": {\n const { x: vx, y: vy } = particle.velocity;\n const circVec = Vector.origin;\n circVec.length = particle.moveCenter.radius;\n circVec.angle = particle.velocity.angle + Math.PI;\n circVec.addTo(Vector.create(particle.moveCenter));\n const { dx, dy } = getDistances(particle.position, circVec);\n if ((vx <= 0 && dx >= 0) || (vy <= 0 && dy >= 0) || (vx >= 0 && dx <= 0) || (vy >= 0 && dy <= 0)) {\n return;\n }\n particle.position.x = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.width,\n }));\n particle.position.y = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.height,\n }));\n const { dx: newDx, dy: newDy } = getDistances(particle.position, particle.moveCenter);\n particle.direction = Math.atan2(-newDy, -newDx);\n particle.velocity.angle = particle.direction;\n break;\n }\n default: {\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n switch (particle.outType) {\n case \"outside\": {\n particle.position.x =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.x;\n particle.position.y =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.y;\n const { dx, dy } = getDistances(particle.position, particle.moveCenter);\n if (particle.moveCenter.radius) {\n particle.direction = Math.atan2(dy, dx);\n particle.velocity.angle = particle.direction;\n }\n break;\n }\n case \"normal\": {\n const wrap = particle.options.move.warp, canvasSize = container.canvas.size, newPos = {\n bottom: canvasSize.height + particle.getRadius() + particle.offset.y,\n left: -particle.getRadius() - particle.offset.x,\n right: canvasSize.width + particle.getRadius() + particle.offset.x,\n top: -particle.getRadius() - particle.offset.y,\n }, sizeValue = particle.getRadius(), nextBounds = calculateBounds(particle.position, sizeValue);\n if (direction === \"right\" &&\n nextBounds.left > canvasSize.width + particle.offset.x) {\n particle.position.x = newPos.left;\n particle.initialPosition.x = particle.position.x;\n if (!wrap) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n else if (direction === \"left\" && nextBounds.right < -particle.offset.x) {\n particle.position.x = newPos.right;\n particle.initialPosition.x = particle.position.x;\n if (!wrap) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n if (direction === \"bottom\" &&\n nextBounds.top > canvasSize.height + particle.offset.y) {\n if (!wrap) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.top;\n particle.initialPosition.y = particle.position.y;\n }\n else if (direction === \"top\" && nextBounds.bottom < -particle.offset.y) {\n if (!wrap) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.bottom;\n particle.initialPosition.y = particle.position.y;\n }\n break;\n }\n }\n break;\n }\n }\n }\n}\n","import { BounceOutMode } from \"./BounceOutMode\";\nimport { DestroyOutMode } from \"./DestroyOutMode\";\nimport { NoneOutMode } from \"./NoneOutMode\";\nimport { OutOutMode } from \"./OutOutMode\";\nexport class OutOfCanvasUpdater {\n constructor(container) {\n this.container = container;\n this._updateOutMode = (particle, delta, outMode, direction) => {\n for (const updater of this.updaters) {\n updater.update(particle, direction, delta, outMode);\n }\n };\n this.updaters = [\n new BounceOutMode(container),\n new DestroyOutMode(container),\n new OutOutMode(container),\n new NoneOutMode(container),\n ];\n }\n init() {\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n update(particle, delta) {\n const outModes = particle.options.move.outModes;\n this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, \"bottom\");\n this._updateOutMode(particle, delta, outModes.left ?? outModes.default, \"left\");\n this._updateOutMode(particle, delta, outModes.right ?? outModes.default, \"right\");\n this._updateOutMode(particle, delta, outModes.top ?? outModes.default, \"top\");\n }\n}\n","import { getRandom } from \"tsparticles-engine\";\nimport { updateSize } from \"./Utils\";\nexport class SizeUpdater {\n init(particle) {\n const container = particle.container, sizeOptions = particle.options.size, sizeAnimation = sizeOptions.animation;\n if (sizeAnimation.enable) {\n particle.size.velocity =\n ((particle.retina.sizeAnimationSpeed ?? container.retina.sizeAnimationSpeed) / 100) *\n container.retina.reduceFactor;\n if (!sizeAnimation.sync) {\n particle.size.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n return (!particle.destroyed &&\n !particle.spawning &&\n particle.size.enable &&\n ((particle.size.maxLoops ?? 0) <= 0 ||\n ((particle.size.maxLoops ?? 0) > 0 && (particle.size.loops ?? 0) < (particle.size.maxLoops ?? 0))));\n }\n reset(particle) {\n particle.size.loops = 0;\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateSize(particle, delta);\n }\n}\n","import { clamp } from \"tsparticles-engine\";\nfunction checkDestroy(particle, value, minValue, maxValue) {\n switch (particle.options.size.animation.destroy) {\n case \"max\":\n if (value >= maxValue) {\n particle.destroy();\n }\n break;\n case \"min\":\n if (value <= minValue) {\n particle.destroy();\n }\n break;\n }\n}\nexport function updateSize(particle, delta) {\n const data = particle.size;\n if (particle.destroyed ||\n !data ||\n !data.enable ||\n ((data.maxLoops ?? 0) > 0 && (data.loops ?? 0) > (data.maxLoops ?? 0))) {\n return;\n }\n const sizeVelocity = (data.velocity ?? 0) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? 1;\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? 0) > 0 && data.time < (data.delayTime ?? 0)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? 0) > 0 && data.time < (data.delayTime ?? 0)) {\n return;\n }\n switch (data.status) {\n case \"increasing\":\n if (data.value >= maxValue) {\n data.status = \"decreasing\";\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n }\n else {\n data.value += sizeVelocity;\n }\n break;\n case \"decreasing\":\n if (data.value <= minValue) {\n data.status = \"increasing\";\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n }\n else {\n data.value -= sizeVelocity;\n }\n }\n if (data.velocity && decay !== 1) {\n data.velocity *= decay;\n }\n checkDestroy(particle, data.value, minValue, maxValue);\n if (!particle.destroyed) {\n data.value = clamp(data.value, minValue, maxValue);\n }\n}\n","import { loadBaseMover } from \"tsparticles-move-base\";\nimport { loadCircleShape } from \"tsparticles-shape-circle\";\nimport { loadColorUpdater } from \"tsparticles-updater-color\";\nimport { loadOpacityUpdater } from \"tsparticles-updater-opacity\";\nimport { loadOutModesUpdater } from \"tsparticles-updater-out-modes\";\nimport { loadSizeUpdater } from \"tsparticles-updater-size\";\nexport async function loadBasic(engine, refresh = true) {\n await loadBaseMover(engine, false);\n await loadCircleShape(engine, false);\n await loadColorUpdater(engine, false);\n await loadOpacityUpdater(engine, false);\n await loadOutModesUpdater(engine, false);\n await loadSizeUpdater(engine, false);\n await engine.refresh(refresh);\n}\n","import { BaseMover } from \"./BaseMover\";\nexport async function loadBaseMover(engine, refresh = true) {\n await engine.addMover(\"base\", () => new BaseMover(), refresh);\n}\n","import { CircleDrawer } from \"./CircleDrawer\";\nexport async function loadCircleShape(engine, refresh = true) {\n await engine.addShape(\"circle\", new CircleDrawer(), refresh);\n}\n","import { ColorUpdater } from \"./ColorUpdater\";\nexport async function loadColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"color\", (container) => new ColorUpdater(container), refresh);\n}\n","import { OpacityUpdater } from \"./OpacityUpdater\";\nexport async function loadOpacityUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"opacity\", (container) => new OpacityUpdater(container), refresh);\n}\n","import { OutOfCanvasUpdater } from \"./OutOfCanvasUpdater\";\nexport async function loadOutModesUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"outModes\", (container) => new OutOfCanvasUpdater(container), refresh);\n}\n","import { SizeUpdater } from \"./SizeUpdater\";\nexport async function loadSizeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"size\", () => new SizeUpdater(), refresh);\n}\n","export class ExternalInteractorBase {\n constructor(container) {\n this.container = container;\n this.type = \"external\";\n }\n}\n","export class Attract {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.easing = \"ease-out-quad\";\n this.factor = 1;\n this.maxSpeed = 50;\n this.speed = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","import { Circle, ExternalInteractorBase, Vector, clamp, getDistances, getEasing, isInArray, mouseMoveEvent, } from \"tsparticles-engine\";\nimport { Attract } from \"./Options/Classes/Attract\";\nexport class Attractor extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._clickAttract = () => {\n const container = this.container;\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n const { attract } = container;\n if (!attract.finish) {\n if (!attract.count) {\n attract.count = 0;\n }\n attract.count++;\n if (attract.count === container.particles.count) {\n attract.finish = true;\n }\n }\n if (attract.clicking) {\n const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < 0 || !mousePos) {\n return;\n }\n this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));\n }\n else if (attract.clicking === false) {\n attract.particles = [];\n }\n return;\n };\n this._hoverAttract = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < 0 || !mousePos) {\n return;\n }\n this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));\n };\n this._processAttract = (position, attractRadius, area) => {\n const container = this.container, attractOptions = container.actualOptions.interactivity.modes.attract;\n if (!attractOptions) {\n return;\n }\n const query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position);\n const velocity = attractOptions.speed * attractOptions.factor;\n const attractFactor = clamp(getEasing(attractOptions.easing)(1 - distance / attractRadius) * velocity, 0, attractOptions.maxSpeed);\n const normVec = Vector.create(distance === 0 ? velocity : (dx / distance) * attractFactor, distance === 0 ? velocity : (dy / distance) * attractFactor);\n particle.position.subFrom(normVec);\n }\n };\n this._engine = engine;\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, attract = options.interactivity.modes.attract;\n if (!attract || mode !== \"attract\") {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = true;\n container.attract.count = 0;\n for (const particle of container.attract.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n container.attract.particles = [];\n container.attract.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = false;\n }, attract.duration * 1000);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, attract = container.actualOptions.interactivity.modes.attract;\n if (!attract) {\n return;\n }\n container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, clickEnabled = events.onClick.enable, clickMode = events.onClick.mode;\n if (mouseMoveStatus && hoverEnabled && isInArray(\"attract\", hoverMode)) {\n this._hoverAttract();\n }\n else if (clickEnabled && isInArray(\"attract\", clickMode)) {\n this._clickAttract();\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;\n if ((!mouse.position || !events.onHover.enable) && (!mouse.clickPosition || !events.onClick.enable)) {\n return false;\n }\n const hoverMode = events.onHover.mode, clickMode = events.onClick.mode;\n return isInArray(\"attract\", hoverMode) || isInArray(\"attract\", clickMode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.attract) {\n options.attract = new Attract();\n }\n for (const source of sources) {\n options.attract.load(source?.attract);\n }\n }\n reset() {\n }\n}\n","export class Bounce {\n constructor() {\n this.distance = 200;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n }\n}\n","import { Circle, ExternalInteractorBase, Rectangle, Vector, calculateBounds, circleBounce, circleBounceDataFromParticle, divModeExecute, isDivModeEnabled, isInArray, mouseMoveEvent, rectBounce, } from \"tsparticles-engine\";\nimport { Bounce } from \"./Options/Classes/Bounce\";\nexport class Bouncer extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this._processBounce = (position, radius, area) => {\n const query = this.container.particles.quadTree.query(area, (p) => this.isEnabled(p));\n for (const particle of query) {\n if (area instanceof Circle) {\n circleBounce(circleBounceDataFromParticle(particle), {\n position,\n radius,\n mass: (radius ** 2 * Math.PI) / 2,\n velocity: Vector.origin,\n factor: Vector.origin,\n });\n }\n else if (area instanceof Rectangle) {\n rectBounce(particle, calculateBounds(position, radius));\n }\n }\n };\n this._processMouseBounce = () => {\n const container = this.container, pxRatio = container.retina.pixelRatio, tolerance = 10 * pxRatio, mousePos = container.interactivity.mouse.position, radius = container.retina.bounceModeDistance;\n if (!radius || radius < 0 || !mousePos) {\n return;\n }\n this._processBounce(mousePos, radius, new Circle(mousePos.x, mousePos.y, radius + tolerance));\n };\n this._singleSelectorBounce = (selector, div) => {\n const container = this.container, query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio,\n }, radius = (elem.offsetWidth / 2) * pxRatio, tolerance = 10 * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, radius + tolerance)\n : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * 2, elem.offsetHeight * pxRatio + tolerance * 2);\n this._processBounce(pos, radius, area);\n });\n };\n }\n clear() {\n }\n init() {\n const container = this.container, bounce = container.actualOptions.interactivity.modes.bounce;\n if (!bounce) {\n return;\n }\n container.retina.bounceModeDistance = bounce.distance * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container, options = container.actualOptions, events = options.interactivity.events, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(\"bounce\", hoverMode)) {\n this._processMouseBounce();\n }\n else {\n divModeExecute(\"bounce\", divs, (selector, div) => this._singleSelectorBounce(selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv;\n return ((mouse.position && events.onHover.enable && isInArray(\"bounce\", events.onHover.mode)) ||\n isDivModeEnabled(\"bounce\", divs));\n }\n loadModeOptions(options, ...sources) {\n if (!options.bounce) {\n options.bounce = new Bounce();\n }\n for (const source of sources) {\n options.bounce.load(source?.bounce);\n }\n }\n reset() {\n }\n}\n","import { OptionsColor, executeOnSingleOrMultiple, isArray, } from \"tsparticles-engine\";\nexport class BubbleBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.mix = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.mix !== undefined) {\n this.mix = data.mix;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n if (data.color !== undefined) {\n const sourceColor = isArray(this.color) ? undefined : this.color;\n this.color = executeOnSingleOrMultiple(data.color, (color) => {\n return OptionsColor.create(sourceColor, color);\n });\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"tsparticles-engine\";\nimport { BubbleBase } from \"./BubbleBase\";\nexport class BubbleDiv extends BubbleBase {\n constructor() {\n super();\n this.selectors = [];\n }\n get ids() {\n return executeOnSingleOrMultiple(this.selectors, (t) => t.replace(\"#\", \"\"));\n }\n set ids(value) {\n this.selectors = executeOnSingleOrMultiple(value, (t) => `#${t}`);\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.ids !== undefined) {\n this.ids = data.ids;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"tsparticles-engine\";\nimport { BubbleBase } from \"./BubbleBase\";\nimport { BubbleDiv } from \"./BubbleDiv\";\nexport class Bubble extends BubbleBase {\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, (div) => {\n const tmp = new BubbleDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","import { clamp } from \"tsparticles-engine\";\nexport function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {\n if (modeValue >= optionsValue) {\n const value = particleValue + (modeValue - optionsValue) * ratio;\n return clamp(value, particleValue, modeValue);\n }\n else if (modeValue < optionsValue) {\n const value = particleValue - (optionsValue - modeValue) * ratio;\n return clamp(value, modeValue, particleValue);\n }\n}\n","import { Circle, ExternalInteractorBase, Rectangle, colorMix, divMode, divModeExecute, getDistance, getRangeMax, isDivModeEnabled, isInArray, itemFromSingleOrMultiple, mouseLeaveEvent, mouseMoveEvent, rangeColorToHsl, rgbToHsl, } from \"tsparticles-engine\";\nimport { Bubble } from \"./Options/Classes/Bubble\";\nimport { calculateBubbleValue } from \"./Utils\";\nexport class Bubbler extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this._clickBubble = () => {\n const container = this.container, options = container.actualOptions, mouseClickPos = container.interactivity.mouse.clickPosition, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || !mouseClickPos) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n const distance = container.retina.bubbleModeDistance;\n if (!distance || distance < 0) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mouseClickPos, distance, (p) => this.isEnabled(p)), { bubble } = container;\n for (const particle of query) {\n if (!bubble.clicking) {\n continue;\n }\n particle.bubble.inRange = !bubble.durationEnd;\n const pos = particle.getPosition(), distMouse = getDistance(pos, mouseClickPos), timeSpent = (new Date().getTime() - (container.interactivity.mouse.clickTime || 0)) / 1000;\n if (timeSpent > bubbleOptions.duration) {\n bubble.durationEnd = true;\n }\n if (timeSpent > bubbleOptions.duration * 2) {\n bubble.clicking = false;\n bubble.durationEnd = false;\n }\n const sizeData = {\n bubbleObj: {\n optValue: container.retina.bubbleModeSize,\n value: particle.bubble.radius,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.size.value) * container.retina.pixelRatio,\n value: particle.size.value,\n },\n type: \"size\",\n };\n this._process(particle, distMouse, timeSpent, sizeData);\n const opacityData = {\n bubbleObj: {\n optValue: bubbleOptions.opacity,\n value: particle.bubble.opacity,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.opacity.value),\n value: particle.opacity?.value ?? 1,\n },\n type: \"opacity\",\n };\n this._process(particle, distMouse, timeSpent, opacityData);\n if (!bubble.durationEnd && distMouse <= distance) {\n this._hoverBubbleColor(particle, distMouse);\n }\n else {\n delete particle.bubble.color;\n }\n }\n };\n this._hoverBubble = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, distance = container.retina.bubbleModeDistance;\n if (!distance || distance < 0 || mousePos === undefined) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n for (const particle of query) {\n particle.bubble.inRange = true;\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos), ratio = 1 - pointDistance / distance;\n if (pointDistance <= distance) {\n if (ratio >= 0 && container.interactivity.status === mouseMoveEvent) {\n this._hoverBubbleSize(particle, ratio);\n this._hoverBubbleOpacity(particle, ratio);\n this._hoverBubbleColor(particle, ratio);\n }\n }\n else {\n this.reset(particle);\n }\n if (container.interactivity.status === mouseLeaveEvent) {\n this.reset(particle);\n }\n }\n };\n this._hoverBubbleColor = (particle, ratio, divBubble) => {\n const options = this.container.actualOptions, bubbleOptions = divBubble ?? options.interactivity.modes.bubble;\n if (!bubbleOptions) {\n return;\n }\n if (!particle.bubble.finalColor) {\n const modeColor = bubbleOptions.color;\n if (!modeColor) {\n return;\n }\n const bubbleColor = itemFromSingleOrMultiple(modeColor);\n particle.bubble.finalColor = rangeColorToHsl(bubbleColor);\n }\n if (!particle.bubble.finalColor) {\n return;\n }\n if (bubbleOptions.mix) {\n particle.bubble.color = undefined;\n const pColor = particle.getFillColor();\n particle.bubble.color = pColor\n ? rgbToHsl(colorMix(pColor, particle.bubble.finalColor, 1 - ratio, ratio))\n : particle.bubble.finalColor;\n }\n else {\n particle.bubble.color = particle.bubble.finalColor;\n }\n };\n this._hoverBubbleOpacity = (particle, ratio, divBubble) => {\n const container = this.container, options = container.actualOptions, modeOpacity = divBubble?.opacity ?? options.interactivity.modes.bubble?.opacity;\n if (!modeOpacity) {\n return;\n }\n const optOpacity = particle.options.opacity.value, pOpacity = particle.opacity?.value ?? 1, opacity = calculateBubbleValue(pOpacity, modeOpacity, getRangeMax(optOpacity), ratio);\n if (opacity !== undefined) {\n particle.bubble.opacity = opacity;\n }\n };\n this._hoverBubbleSize = (particle, ratio, divBubble) => {\n const container = this.container, modeSize = divBubble?.size ? divBubble.size * container.retina.pixelRatio : container.retina.bubbleModeSize;\n if (modeSize === undefined) {\n return;\n }\n const optSize = getRangeMax(particle.options.size.value) * container.retina.pixelRatio, pSize = particle.size.value, size = calculateBubbleValue(pSize, modeSize, optSize, ratio);\n if (size !== undefined) {\n particle.bubble.radius = size;\n }\n };\n this._process = (particle, distMouse, timeSpent, data) => {\n const container = this.container, bubbleParam = data.bubbleObj.optValue, options = container.actualOptions, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || bubbleParam === undefined) {\n return;\n }\n const bubbleDuration = bubbleOptions.duration, bubbleDistance = container.retina.bubbleModeDistance, particlesParam = data.particlesObj.optValue, pObjBubble = data.bubbleObj.value, pObj = data.particlesObj.value || 0, type = data.type;\n if (!bubbleDistance || bubbleDistance < 0 || bubbleParam === particlesParam) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n if (container.bubble.durationEnd) {\n if (pObjBubble) {\n if (type === \"size\") {\n delete particle.bubble.radius;\n }\n if (type === \"opacity\") {\n delete particle.bubble.opacity;\n }\n }\n }\n else {\n if (distMouse <= bubbleDistance) {\n const obj = pObjBubble ?? pObj;\n if (obj !== bubbleParam) {\n const value = pObj - (timeSpent * (pObj - bubbleParam)) / bubbleDuration;\n if (type === \"size\") {\n particle.bubble.radius = value;\n }\n if (type === \"opacity\") {\n particle.bubble.opacity = value;\n }\n }\n }\n else {\n if (type === \"size\") {\n delete particle.bubble.radius;\n }\n if (type === \"opacity\") {\n delete particle.bubble.opacity;\n }\n }\n }\n };\n this._singleSelectorHover = (delta, selector, div) => {\n const container = this.container, selectors = document.querySelectorAll(selector), bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble || !selectors.length) {\n return;\n }\n selectors.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio,\n }, repulseRadius = (elem.offsetWidth / 2) * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));\n for (const particle of query) {\n if (!area.contains(particle.getPosition())) {\n continue;\n }\n particle.bubble.inRange = true;\n const divs = bubble.divs, divBubble = divMode(divs, elem);\n if (!particle.bubble.div || particle.bubble.div !== elem) {\n this.clear(particle, delta, true);\n particle.bubble.div = elem;\n }\n this._hoverBubbleSize(particle, 1, divBubble);\n this._hoverBubbleOpacity(particle, 1, divBubble);\n this._hoverBubbleColor(particle, 1, divBubble);\n }\n });\n };\n if (!container.bubble) {\n container.bubble = {};\n }\n this.handleClickMode = (mode) => {\n if (mode !== \"bubble\") {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n container.bubble.clicking = true;\n };\n }\n clear(particle, delta, force) {\n if (particle.bubble.inRange && !force) {\n return;\n }\n delete particle.bubble.div;\n delete particle.bubble.opacity;\n delete particle.bubble.radius;\n delete particle.bubble.color;\n }\n init() {\n const container = this.container, bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble) {\n return;\n }\n container.retina.bubbleModeDistance = bubble.distance * container.retina.pixelRatio;\n if (bubble.size !== undefined) {\n container.retina.bubbleModeSize = bubble.size * container.retina.pixelRatio;\n }\n }\n async interact(delta) {\n const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;\n if (hoverEnabled && isInArray(\"bubble\", hoverMode)) {\n this._hoverBubble();\n }\n else if (clickEnabled && isInArray(\"bubble\", clickMode)) {\n this._clickBubble();\n }\n else {\n divModeExecute(\"bubble\", divs, (selector, div) => this._singleSelectorHover(delta, selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, { onClick, onDiv, onHover } = events, divBubble = isDivModeEnabled(\"bubble\", onDiv);\n if (!(divBubble || (onHover.enable && mouse.position) || (onClick.enable && mouse.clickPosition))) {\n return false;\n }\n return isInArray(\"bubble\", onHover.mode) || isInArray(\"bubble\", onClick.mode) || divBubble;\n }\n loadModeOptions(options, ...sources) {\n if (!options.bubble) {\n options.bubble = new Bubble();\n }\n for (const source of sources) {\n options.bubble.load(source?.bubble);\n }\n }\n reset(particle) {\n particle.bubble.inRange = false;\n }\n}\n","export class ConnectLinks {\n constructor() {\n this.opacity = 0.5;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { ConnectLinks } from \"./ConnectLinks\";\nexport class Connect {\n constructor() {\n this.distance = 80;\n this.links = new ConnectLinks();\n this.radius = 60;\n }\n get lineLinked() {\n return this.links;\n }\n set lineLinked(value) {\n this.links = value;\n }\n get line_linked() {\n return this.links;\n }\n set line_linked(value) {\n this.links = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links ?? data.lineLinked ?? data.line_linked);\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { colorMix, drawLine, getStyleFromHsl, getStyleFromRgb, } from \"tsparticles-engine\";\nexport function gradient(context, p1, p2, opacity) {\n const gradStop = Math.floor(p2.getRadius() / p1.getRadius()), color1 = p1.getFillColor(), color2 = p2.getFillColor();\n if (!color1 || !color2) {\n return;\n }\n const sourcePos = p1.getPosition(), destPos = p2.getPosition(), midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius()), grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);\n grad.addColorStop(0, getStyleFromHsl(color1, opacity));\n grad.addColorStop(gradStop > 1 ? 1 : gradStop, getStyleFromRgb(midRgb, opacity));\n grad.addColorStop(1, getStyleFromHsl(color2, opacity));\n return grad;\n}\nexport function drawConnectLine(context, width, lineStyle, begin, end) {\n drawLine(context, begin, end);\n context.lineWidth = width;\n context.strokeStyle = lineStyle;\n context.stroke();\n}\nexport function lineStyle(container, ctx, p1, p2) {\n const options = container.actualOptions, connectOptions = options.interactivity.modes.connect;\n if (!connectOptions) {\n return;\n }\n return gradient(ctx, p1, p2, connectOptions.links.opacity);\n}\nexport function drawConnection(container, p1, p2) {\n container.canvas.draw((ctx) => {\n const ls = lineStyle(container, ctx, p1, p2);\n if (!ls) {\n return;\n }\n const pos1 = p1.getPosition(), pos2 = p2.getPosition();\n drawConnectLine(ctx, p1.retina.linksWidth ?? 0, ls, pos1, pos2);\n });\n}\n","import { ExternalInteractorBase, isInArray, } from \"tsparticles-engine\";\nimport { Connect } from \"./Options/Classes/Connect\";\nimport { drawConnection } from \"./Utils\";\nexport class Connector extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, connect = container.actualOptions.interactivity.modes.connect;\n if (!connect) {\n return;\n }\n container.retina.connectModeDistance = connect.distance * container.retina.pixelRatio;\n container.retina.connectModeRadius = connect.radius * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container, options = container.actualOptions;\n if (options.interactivity.events.onHover.enable && container.interactivity.status === \"pointermove\") {\n const mousePos = container.interactivity.mouse.position;\n if (!container.retina.connectModeDistance ||\n container.retina.connectModeDistance < 0 ||\n !container.retina.connectModeRadius ||\n container.retina.connectModeRadius < 0 ||\n !mousePos) {\n return;\n }\n const distance = Math.abs(container.retina.connectModeRadius), query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n let i = 0;\n for (const p1 of query) {\n const pos1 = p1.getPosition();\n for (const p2 of query.slice(i + 1)) {\n const pos2 = p2.getPosition(), distMax = Math.abs(container.retina.connectModeDistance), xDiff = Math.abs(pos1.x - pos2.x), yDiff = Math.abs(pos1.y - pos2.y);\n if (xDiff < distMax && yDiff < distMax) {\n drawConnection(container, p1, p2);\n }\n }\n ++i;\n }\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n if (!(events.onHover.enable && mouse.position)) {\n return false;\n }\n return isInArray(\"connect\", events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.connect) {\n options.connect = new Connect();\n }\n for (const source of sources) {\n options.connect.load(source?.connect);\n }\n }\n reset() {\n }\n}\n","import { OptionsColor } from \"tsparticles-engine\";\nexport class GrabLinks {\n constructor() {\n this.blink = false;\n this.consent = false;\n this.opacity = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { GrabLinks } from \"./GrabLinks\";\nexport class Grab {\n constructor() {\n this.distance = 100;\n this.links = new GrabLinks();\n }\n get lineLinked() {\n return this.links;\n }\n set lineLinked(value) {\n this.links = value;\n }\n get line_linked() {\n return this.links;\n }\n set line_linked(value) {\n this.links = value;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links ?? data.lineLinked ?? data.line_linked);\n }\n}\n","import { drawLine, getStyleFromRgb } from \"tsparticles-engine\";\nexport function drawGrabLine(context, width, begin, end, colorLine, opacity) {\n drawLine(context, begin, end);\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n context.lineWidth = width;\n context.stroke();\n}\nexport function drawGrab(container, particle, lineColor, opacity, mousePos) {\n container.canvas.draw((ctx) => {\n const beginPos = particle.getPosition();\n drawGrabLine(ctx, particle.retina.linksWidth ?? 0, beginPos, mousePos, lineColor, opacity);\n });\n}\n","import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from \"tsparticles-engine\";\nimport { Grab } from \"./Options/Classes/Grab\";\nimport { drawGrab } from \"./Utils\";\nexport class Grabber extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, grab = container.actualOptions.interactivity.modes.grab;\n if (!grab) {\n return;\n }\n container.retina.grabModeDistance = grab.distance * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container, options = container.actualOptions, interactivity = options.interactivity;\n if (!interactivity.modes.grab ||\n !interactivity.events.onHover.enable ||\n container.interactivity.status !== mouseMoveEvent) {\n return;\n }\n const mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const distance = container.retina.grabModeDistance;\n if (!distance || distance < 0) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));\n for (const particle of query) {\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos);\n if (pointDistance > distance) {\n continue;\n }\n const grabLineOptions = interactivity.modes.grab.links, lineOpacity = grabLineOptions.opacity, opacityLine = lineOpacity - (pointDistance * lineOpacity) / distance;\n if (opacityLine <= 0) {\n continue;\n }\n const optColor = grabLineOptions.color ?? particle.options.links?.color;\n if (!container.particles.grabLineColor && optColor) {\n const linksOptions = interactivity.modes.grab.links;\n container.particles.grabLineColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);\n }\n const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);\n if (!colorLine) {\n continue;\n }\n drawGrab(container, particle, colorLine, opacityLine, mousePos);\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(\"grab\", events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.grab) {\n options.grab = new Grab();\n }\n for (const source of sources) {\n options.grab.load(source?.grab);\n }\n }\n reset() {\n }\n}\n","import { ExternalInteractorBase } from \"tsparticles-engine\";\nexport class Pauser extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== \"pause\") {\n return;\n }\n const container = this.container;\n if (container.getAnimationStatus()) {\n container.pause();\n }\n else {\n container.play();\n }\n };\n }\n clear() {\n }\n init() {\n }\n async interact() {\n }\n isEnabled() {\n return true;\n }\n reset() {\n }\n}\n","import { setRangeValue } from \"tsparticles-engine\";\nexport class Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n get particles_nb() {\n return this.quantity;\n }\n set particles_nb(value) {\n this.quantity = setRangeValue(value);\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map((t) => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity ?? data.particles_nb;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","import { ExternalInteractorBase, getRangeValue, itemFromArray, } from \"tsparticles-engine\";\nimport { Push } from \"./Options/Classes/Push\";\nexport class Pusher extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== \"push\") {\n return;\n }\n const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;\n if (!pushOptions) {\n return;\n }\n const quantity = getRangeValue(pushOptions.quantity);\n if (quantity <= 0) {\n return;\n }\n const group = itemFromArray([undefined, ...pushOptions.groups]), groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;\n container.particles.push(quantity, container.interactivity.mouse, groupOptions, group);\n };\n }\n clear() {\n }\n init() {\n }\n async interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.push) {\n options.push = new Push();\n }\n for (const source of sources) {\n options.push.load(source?.push);\n }\n }\n reset() {\n }\n}\n","import { setRangeValue } from \"tsparticles-engine\";\nexport class Remove {\n constructor() {\n this.quantity = 2;\n }\n get particles_nb() {\n return this.quantity;\n }\n set particles_nb(value) {\n this.quantity = setRangeValue(value);\n }\n load(data) {\n if (!data) {\n return;\n }\n const quantity = data.quantity ?? data.particles_nb;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","import { ExternalInteractorBase, getRangeValue, } from \"tsparticles-engine\";\nimport { Remove } from \"./Options/Classes/Remove\";\nexport class Remover extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n const container = this.container, options = container.actualOptions;\n if (!options.interactivity.modes.remove || mode !== \"remove\") {\n return;\n }\n const removeNb = getRangeValue(options.interactivity.modes.remove.quantity);\n container.particles.removeQuantity(removeNb);\n };\n }\n clear() {\n }\n init() {\n }\n async interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.remove) {\n options.remove = new Remove();\n }\n for (const source of sources) {\n options.remove.load(source?.remove);\n }\n }\n reset() {\n }\n}\n","export class RepulseBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.factor = 100;\n this.speed = 1;\n this.maxSpeed = 50;\n this.easing = \"ease-out-quad\";\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"tsparticles-engine\";\nimport { RepulseBase } from \"./RepulseBase\";\nexport class RepulseDiv extends RepulseBase {\n constructor() {\n super();\n this.selectors = [];\n }\n get ids() {\n return executeOnSingleOrMultiple(this.selectors, (t) => t.replace(\"#\", \"\"));\n }\n set ids(value) {\n this.selectors = executeOnSingleOrMultiple(value, (t) => `#${t}`);\n }\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n if (data.ids !== undefined) {\n this.ids = data.ids;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, } from \"tsparticles-engine\";\nimport { RepulseBase } from \"./RepulseBase\";\nimport { RepulseDiv } from \"./RepulseDiv\";\nexport class Repulse extends RepulseBase {\n load(data) {\n super.load(data);\n if (!data) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, (div) => {\n const tmp = new RepulseDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","import { Circle, ExternalInteractorBase, Rectangle, Vector, clamp, divMode, divModeExecute, getDistances, getEasing, isDivModeEnabled, isInArray, mouseMoveEvent, } from \"tsparticles-engine\";\nimport { Repulse } from \"./Options/Classes/Repulse\";\nexport class Repulser extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._clickRepulse = () => {\n const container = this.container, repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n const repulse = container.repulse || { particles: [] };\n if (!repulse.finish) {\n if (!repulse.count) {\n repulse.count = 0;\n }\n repulse.count++;\n if (repulse.count === container.particles.count) {\n repulse.finish = true;\n }\n }\n if (repulse.clicking) {\n const repulseDistance = container.retina.repulseModeDistance;\n if (!repulseDistance || repulseDistance < 0) {\n return;\n }\n const repulseRadius = Math.pow(repulseDistance / 6, 3), mouseClickPos = container.interactivity.mouse.clickPosition;\n if (mouseClickPos === undefined) {\n return;\n }\n const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range, (p) => this.isEnabled(p));\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(mouseClickPos, particle.position), d = distance ** 2, velocity = repulseOptions.speed, force = (-repulseRadius * velocity) / d;\n if (d <= repulseRadius) {\n repulse.particles.push(particle);\n const vect = Vector.create(dx, dy);\n vect.length = force;\n particle.velocity.setTo(vect);\n }\n }\n }\n else if (repulse.clicking === false) {\n for (const particle of repulse.particles) {\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n }\n };\n this._hoverRepulse = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, repulseRadius = container.retina.repulseModeDistance;\n if (!repulseRadius || repulseRadius < 0 || !mousePos) {\n return;\n }\n this._processRepulse(mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius));\n };\n this._processRepulse = (position, repulseRadius, area, divRepulse) => {\n const container = this.container, query = container.particles.quadTree.query(area, (p) => this.isEnabled(p)), repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position), velocity = (divRepulse?.speed ?? repulseOptions.speed) * repulseOptions.factor, repulseFactor = clamp(getEasing(repulseOptions.easing)(1 - distance / repulseRadius) * velocity, 0, repulseOptions.maxSpeed), normVec = Vector.create(distance === 0 ? velocity : (dx / distance) * repulseFactor, distance === 0 ? velocity : (dy / distance) * repulseFactor);\n particle.position.addTo(normVec);\n }\n };\n this._singleSelectorRepulse = (selector, div) => {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n const query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach((item) => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio,\n }, repulseRadius = (elem.offsetWidth / 2) * pxRatio, area = div.type === \"circle\"\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), divs = repulse.divs, divRepulse = divMode(divs, elem);\n this._processRepulse(pos, repulseRadius, area, divRepulse);\n });\n };\n this._engine = engine;\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, repulseOpts = options.interactivity.modes.repulse;\n if (!repulseOpts || mode !== \"repulse\") {\n return;\n }\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n const repulse = container.repulse;\n repulse.clicking = true;\n repulse.count = 0;\n for (const particle of container.repulse.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n repulse.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n repulse.clicking = false;\n }, repulseOpts.duration * 1000);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n container.retina.repulseModeDistance = repulse.distance * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, hover = events.onHover, hoverEnabled = hover.enable, hoverMode = hover.mode, click = events.onClick, clickEnabled = click.enable, clickMode = click.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(\"repulse\", hoverMode)) {\n this._hoverRepulse();\n }\n else if (clickEnabled && isInArray(\"repulse\", clickMode)) {\n this._clickRepulse();\n }\n else {\n divModeExecute(\"repulse\", divs, (selector, div) => this._singleSelectorRepulse(selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv, hover = events.onHover, click = events.onClick, divRepulse = isDivModeEnabled(\"repulse\", divs);\n if (!(divRepulse || (hover.enable && mouse.position) || (click.enable && mouse.clickPosition))) {\n return false;\n }\n const hoverMode = hover.mode, clickMode = click.mode;\n return isInArray(\"repulse\", hoverMode) || isInArray(\"repulse\", clickMode) || divRepulse;\n }\n loadModeOptions(options, ...sources) {\n if (!options.repulse) {\n options.repulse = new Repulse();\n }\n for (const source of sources) {\n options.repulse.load(source?.repulse);\n }\n }\n reset() {\n }\n}\n","export class Slow {\n constructor() {\n this.factor = 3;\n this.radius = 200;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { ExternalInteractorBase, getDistance, isInArray, } from \"tsparticles-engine\";\nimport { Slow } from \"./Options/Classes/Slow\";\nexport class Slower extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear(particle, delta, force) {\n if (particle.slow.inRange && !force) {\n return;\n }\n particle.slow.factor = 1;\n }\n init() {\n const container = this.container, slow = container.actualOptions.interactivity.modes.slow;\n if (!slow) {\n return;\n }\n container.retina.slowModeRadius = slow.radius * container.retina.pixelRatio;\n }\n async interact() {\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(\"slow\", events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.slow) {\n options.slow = new Slow();\n }\n for (const source of sources) {\n options.slow.load(source?.slow);\n }\n }\n reset(particle) {\n particle.slow.inRange = false;\n const container = this.container, options = container.actualOptions, mousePos = container.interactivity.mouse.position, radius = container.retina.slowModeRadius, slowOptions = options.interactivity.modes.slow;\n if (!slowOptions || !radius || radius < 0 || !mousePos) {\n return;\n }\n const particlePos = particle.getPosition(), dist = getDistance(mousePos, particlePos), proximityFactor = dist / radius, slowFactor = slowOptions.factor, { slow } = particle;\n if (dist > radius) {\n return;\n }\n slow.inRange = true;\n slow.factor = proximityFactor / slowFactor;\n }\n}\n","export const InterlaceOffsets = [0, 4, 2, 1];\nexport const InterlaceSteps = [8, 8, 4, 2];\n","export class ByteStream {\n constructor(bytes) {\n this.pos = 0;\n this.data = new Uint8ClampedArray(bytes);\n }\n getString(count) {\n const slice = this.data.slice(this.pos, this.pos + count);\n this.pos += slice.length;\n return slice.reduce((acc, curr) => acc + String.fromCharCode(curr), \"\");\n }\n nextByte() {\n return this.data[this.pos++];\n }\n nextTwoBytes() {\n this.pos += 2;\n return this.data[this.pos - 2] + (this.data[this.pos - 1] << 8);\n }\n readSubBlocks() {\n let blockString = \"\", size = 0;\n do {\n size = this.data[this.pos++];\n for (let count = size; --count >= 0; blockString += String.fromCharCode(this.data[this.pos++])) {\n }\n } while (size !== 0);\n return blockString;\n }\n readSubBlocksBin() {\n let size = 0, len = 0;\n for (let offset = 0; (size = this.data[this.pos + offset]) !== 0; offset += size + 1) {\n len += size;\n }\n const blockData = new Uint8Array(len);\n for (let i = 0; (size = this.data[this.pos++]) !== 0;) {\n for (let count = size; --count >= 0; blockData[i++] = this.data[this.pos++]) {\n }\n }\n return blockData;\n }\n skipSubBlocks() {\n for (; this.data[this.pos] !== 0; this.pos += this.data[this.pos] + 1) {\n }\n this.pos++;\n }\n}\n","import { InterlaceOffsets, InterlaceSteps } from \"./Constants\";\nimport { ByteStream } from \"./ByteStream\";\nfunction parseColorTable(byteStream, count) {\n const colors = [];\n for (let i = 0; i < count; i++) {\n colors.push({\n r: byteStream.data[byteStream.pos],\n g: byteStream.data[byteStream.pos + 1],\n b: byteStream.data[byteStream.pos + 2],\n });\n byteStream.pos += 3;\n }\n return colors;\n}\nasync function parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex) {\n switch (byteStream.nextByte()) {\n case 249: {\n const frame = gif.frames[getFrameIndex(false)];\n byteStream.pos++;\n const packedByte = byteStream.nextByte();\n frame.GCreserved = (packedByte & 0xe0) >>> 5;\n frame.disposalMethod = (packedByte & 0x1c) >>> 2;\n frame.userInputDelayFlag = (packedByte & 2) === 2;\n const transparencyFlag = (packedByte & 1) === 1;\n frame.delayTime = byteStream.nextTwoBytes() * 0xa;\n const transparencyIndex = byteStream.nextByte();\n if (transparencyFlag) {\n getTransparencyIndex(transparencyIndex);\n }\n byteStream.pos++;\n break;\n }\n case 255: {\n byteStream.pos++;\n const applicationExtension = {\n identifier: byteStream.getString(8),\n authenticationCode: byteStream.getString(3),\n data: byteStream.readSubBlocksBin(),\n };\n gif.applicationExtensions.push(applicationExtension);\n break;\n }\n case 254: {\n gif.comments.push([getFrameIndex(false), byteStream.readSubBlocks()]);\n break;\n }\n case 1: {\n if (gif.globalColorTable.length === 0) {\n throw new EvalError(\"plain text extension without global color table\");\n }\n byteStream.pos++;\n gif.frames[getFrameIndex(false)].plainTextData = {\n left: byteStream.nextTwoBytes(),\n top: byteStream.nextTwoBytes(),\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n charSize: {\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n },\n foregroundColor: byteStream.nextByte(),\n backgroundColor: byteStream.nextByte(),\n text: byteStream.readSubBlocks(),\n };\n break;\n }\n default:\n byteStream.skipSubBlocks();\n break;\n }\n}\nasync function parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n const frame = gif.frames[getFrameIndex(true)];\n frame.left = byteStream.nextTwoBytes();\n frame.top = byteStream.nextTwoBytes();\n frame.width = byteStream.nextTwoBytes();\n frame.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), localColorTableFlag = (packedByte & 0x80) === 0x80, interlacedFlag = (packedByte & 0x40) === 0x40;\n frame.sortFlag = (packedByte & 0x20) === 0x20;\n frame.reserved = (packedByte & 0x18) >>> 3;\n const localColorCount = 1 << ((packedByte & 7) + 1);\n if (localColorTableFlag) {\n frame.localColorTable = parseColorTable(byteStream, localColorCount);\n }\n const getColor = (index) => {\n const { r, g, b } = (localColorTableFlag ? frame.localColorTable : gif.globalColorTable)[index];\n return { r, g, b, a: index === getTransparencyIndex(null) ? (avgAlpha ? ~~((r + g + b) / 3) : 0) : 255 };\n };\n const image = (() => {\n try {\n return new ImageData(frame.width, frame.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (image == null) {\n throw new EvalError(\"GIF frame size is to large\");\n }\n const minCodeSize = byteStream.nextByte(), imageData = byteStream.readSubBlocksBin(), clearCode = 1 << minCodeSize;\n const readBits = (pos, len) => {\n const bytePos = pos >>> 3, bitPos = pos & 7;\n return (((imageData[bytePos] + (imageData[bytePos + 1] << 8) + (imageData[bytePos + 2] << 16)) &\n (((1 << len) - 1) << bitPos)) >>>\n bitPos);\n };\n if (interlacedFlag) {\n for (let code = 0, size = minCodeSize + 1, pos = 0, dic = [[0]], pass = 0; pass < 4; pass++) {\n if (InterlaceOffsets[pass] < frame.height) {\n for (let pixelPos = 0, lineIndex = 0;;) {\n const last = code;\n code = readBits(pos, size);\n pos += size + 1;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (let i = 0; i < dic[code].length; i++) {\n const { r, g, b, a } = getColor(dic[code][i]);\n image.data.set([r, g, b, a], InterlaceOffsets[pass] * frame.width +\n InterlaceSteps[pass] * lineIndex +\n (pixelPos % (frame.width * 4)));\n pixelPos += 4;\n }\n if (dic.length === 1 << size && size < 0xc) {\n size++;\n }\n }\n if (pixelPos === frame.width * 4 * (lineIndex + 1)) {\n lineIndex++;\n if (InterlaceOffsets[pass] + InterlaceSteps[pass] * lineIndex >= frame.height) {\n break;\n }\n }\n }\n }\n progressCallback?.(byteStream.pos / (byteStream.data.length - 1), getFrameIndex(false) + 1, image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n }\n else {\n for (let code = 0, size = minCodeSize + 1, pos = 0, dic = [[0]], pixelPos = -4;;) {\n const last = code;\n code = readBits(pos, size);\n pos += size;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code === clearCode + 1) {\n break;\n }\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (let i = 0; i < dic[code].length; i++) {\n const { r, g, b, a } = getColor(dic[code][i]);\n image.data.set([r, g, b, a], (pixelPos += 4));\n }\n if (dic.length >= 1 << size && size < 0xc) {\n size++;\n }\n }\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n progressCallback?.((byteStream.pos + 1) / byteStream.data.length, getFrameIndex(false) + 1, frame.image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n}\nasync function parseBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n switch (byteStream.nextByte()) {\n case 59:\n return true;\n case 44:\n await parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback);\n break;\n case 33:\n await parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex);\n break;\n default:\n throw new EvalError(\"undefined block found\");\n }\n return false;\n}\nexport function getGIFLoopAmount(gif) {\n for (const extension of gif.applicationExtensions) {\n if (extension.identifier + extension.authenticationCode !== \"NETSCAPE2.0\") {\n continue;\n }\n return extension.data[1] + (extension.data[2] << 8);\n }\n return NaN;\n}\nexport async function decodeGIF(gifURL, progressCallback, avgAlpha) {\n if (!avgAlpha)\n avgAlpha = false;\n const res = await fetch(gifURL);\n if (!res.ok && res.status === 404) {\n throw new EvalError(\"file not found\");\n }\n const buffer = await res.arrayBuffer();\n const gif = {\n width: 0,\n height: 0,\n totalTime: 0,\n colorRes: 0,\n pixelAspectRatio: 0,\n frames: [],\n sortFlag: false,\n globalColorTable: [],\n backgroundImage: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n comments: [],\n applicationExtensions: [],\n }, byteStream = new ByteStream(new Uint8ClampedArray(buffer));\n if (byteStream.getString(6) !== \"GIF89a\") {\n throw new Error(\"not a supported GIF file\");\n }\n gif.width = byteStream.nextTwoBytes();\n gif.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), globalColorTableFlag = (packedByte & 0x80) === 0x80;\n gif.colorRes = (packedByte & 0x70) >>> 4;\n gif.sortFlag = (packedByte & 8) === 8;\n const globalColorCount = 1 << ((packedByte & 7) + 1), backgroundColorIndex = byteStream.nextByte();\n gif.pixelAspectRatio = byteStream.nextByte();\n if (gif.pixelAspectRatio !== 0) {\n gif.pixelAspectRatio = (gif.pixelAspectRatio + 0xf) / 0x40;\n }\n if (globalColorTableFlag) {\n gif.globalColorTable = parseColorTable(byteStream, globalColorCount);\n }\n const backgroundImage = (() => {\n try {\n return new ImageData(gif.width, gif.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (backgroundImage == null) {\n throw new Error(\"GIF frame size is to large\");\n }\n const { r, g, b } = gif.globalColorTable[backgroundColorIndex];\n backgroundImage.data.set(globalColorTableFlag ? [r, g, b, 255] : [0, 0, 0, 0]);\n for (let i = 4; i < backgroundImage.data.length; i *= 2) {\n backgroundImage.data.copyWithin(i, 0, i);\n }\n gif.backgroundImage = backgroundImage;\n let frameIndex = -1, incrementFrameIndex = true, transparencyIndex = -1;\n const getframeIndex = (increment) => {\n if (increment) {\n incrementFrameIndex = true;\n }\n return frameIndex;\n };\n const getTransparencyIndex = (newValue) => {\n if (newValue != null) {\n transparencyIndex = newValue;\n }\n return transparencyIndex;\n };\n try {\n do {\n if (incrementFrameIndex) {\n gif.frames.push({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n disposalMethod: 0,\n image: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n plainTextData: null,\n userInputDelayFlag: false,\n delayTime: 0,\n sortFlag: false,\n localColorTable: [],\n reserved: 0,\n GCreserved: 0,\n });\n frameIndex++;\n transparencyIndex = -1;\n incrementFrameIndex = false;\n }\n } while (!(await parseBlock(byteStream, gif, avgAlpha, getframeIndex, getTransparencyIndex, progressCallback)));\n gif.frames.length--;\n for (const frame of gif.frames) {\n if (frame.userInputDelayFlag && frame.delayTime === 0) {\n gif.totalTime = Infinity;\n break;\n }\n gif.totalTime += frame.delayTime;\n }\n return gif;\n }\n catch (error) {\n if (error instanceof EvalError) {\n throw new Error(`error while parsing frame ${frameIndex} \"${error.message}\"`);\n }\n throw error;\n }\n}\n","import { errorPrefix, getLogger, getStyleFromHsl } from \"tsparticles-engine\";\nimport { decodeGIF, getGIFLoopAmount } from \"./GifUtils/Utils\";\nconst currentColorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d.]+%?\\))|currentcolor/gi;\nfunction replaceColorSvg(imageShape, color, opacity) {\n const { svgData } = imageShape;\n if (!svgData) {\n return \"\";\n }\n const colorStyle = getStyleFromHsl(color, opacity);\n if (svgData.includes(\"fill\")) {\n return svgData.replace(currentColorRegex, () => colorStyle);\n }\n const preFillIndex = svgData.indexOf(\">\");\n return `${svgData.substring(0, preFillIndex)} fill=\"${colorStyle}\"${svgData.substring(preFillIndex)}`;\n}\nexport async function loadImage(image) {\n return new Promise((resolve) => {\n image.loading = true;\n const img = new Image();\n image.element = img;\n img.addEventListener(\"load\", () => {\n image.loading = false;\n resolve();\n });\n img.addEventListener(\"error\", () => {\n image.element = undefined;\n image.error = true;\n image.loading = false;\n getLogger().error(`${errorPrefix} loading image: ${image.source}`);\n resolve();\n });\n img.src = image.source;\n });\n}\nexport async function loadGifImage(image) {\n if (image.type !== \"gif\") {\n await loadImage(image);\n return;\n }\n image.loading = true;\n try {\n image.gifData = await decodeGIF(image.source);\n image.gifLoopCount = getGIFLoopAmount(image.gifData) ?? 0;\n if (image.gifLoopCount === 0) {\n image.gifLoopCount = Infinity;\n }\n }\n catch {\n image.error = true;\n }\n image.loading = false;\n}\nexport async function downloadSvgImage(image) {\n if (image.type !== \"svg\") {\n await loadImage(image);\n return;\n }\n image.loading = true;\n const response = await fetch(image.source);\n if (!response.ok) {\n getLogger().error(`${errorPrefix} Image not found`);\n image.error = true;\n }\n else {\n image.svgData = await response.text();\n }\n image.loading = false;\n}\nexport function replaceImageColor(image, imageData, color, particle) {\n const svgColoredData = replaceColorSvg(image, color, particle.opacity?.value ?? 1), imageRes = {\n color,\n gif: imageData.gif,\n data: {\n ...image,\n svgData: svgColoredData,\n },\n loaded: false,\n ratio: imageData.width / imageData.height,\n replaceColor: imageData.replaceColor ?? imageData.replace_color,\n source: imageData.src,\n };\n return new Promise((resolve) => {\n const svg = new Blob([svgColoredData], { type: \"image/svg+xml\" }), domUrl = URL || window.URL || window.webkitURL || window, url = domUrl.createObjectURL(svg), img = new Image();\n img.addEventListener(\"load\", () => {\n imageRes.loaded = true;\n imageRes.element = img;\n resolve(imageRes);\n domUrl.revokeObjectURL(url);\n });\n img.addEventListener(\"error\", async () => {\n domUrl.revokeObjectURL(url);\n const img2 = {\n ...image,\n error: false,\n loading: true,\n };\n await loadImage(img2);\n imageRes.loaded = true;\n imageRes.element = img2.element;\n resolve(imageRes);\n });\n img.src = url;\n });\n}\n","import { errorPrefix } from \"tsparticles-engine\";\nimport { replaceImageColor } from \"./Utils\";\nexport class ImageDrawer {\n constructor(engine) {\n this.loadImageShape = async (imageShape) => {\n if (!this._engine.loadImage) {\n throw new Error(`${errorPrefix} image shape not initialized`);\n }\n await this._engine.loadImage({\n gif: imageShape.gif,\n name: imageShape.name,\n replaceColor: imageShape.replaceColor ?? imageShape.replace_color ?? false,\n src: imageShape.src,\n });\n };\n this._engine = engine;\n }\n addImage(image) {\n if (!this._engine.images) {\n this._engine.images = [];\n }\n this._engine.images.push(image);\n }\n draw(context, particle, radius, opacity, delta) {\n const image = particle.image, element = image?.element;\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n if (image.gif && image.gifData) {\n const offscreenCanvas = new OffscreenCanvas(image.gifData.width, image.gifData.height), offscreenContext = offscreenCanvas.getContext(\"2d\");\n if (!offscreenContext) {\n throw new Error(\"could not create offscreen canvas context\");\n }\n offscreenContext.imageSmoothingQuality = \"low\";\n offscreenContext.imageSmoothingEnabled = false;\n offscreenContext.clearRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n if (particle.gifLoopCount === undefined) {\n particle.gifLoopCount = image.gifLoopCount ?? 0;\n }\n let frameIndex = particle.gifFrame ?? 0;\n const pos = { x: -image.gifData.width * 0.5, y: -image.gifData.height * 0.5 }, frame = image.gifData.frames[frameIndex];\n if (particle.gifTime === undefined) {\n particle.gifTime = 0;\n }\n if (!frame.bitmap) {\n return;\n }\n context.scale(radius / image.gifData.width, radius / image.gifData.height);\n switch (frame.disposalMethod) {\n case 4:\n case 5:\n case 6:\n case 7:\n case 0:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n break;\n case 1:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n break;\n case 2:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n if (image.gifData.globalColorTable.length === 0) {\n offscreenContext.putImageData(image.gifData.frames[0].image, pos.x + frame.left, pos.y + frame.top);\n }\n else {\n offscreenContext.putImageData(image.gifData.backgroundImage, pos.x, pos.y);\n }\n break;\n case 3:\n {\n const previousImageData = offscreenContext.getImageData(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.putImageData(previousImageData, 0, 0);\n }\n break;\n }\n particle.gifTime += delta.value;\n if (particle.gifTime > frame.delayTime) {\n particle.gifTime -= frame.delayTime;\n if (++frameIndex >= image.gifData.frames.length) {\n if (--particle.gifLoopCount <= 0) {\n return;\n }\n frameIndex = 0;\n offscreenContext.clearRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);\n }\n particle.gifFrame = frameIndex;\n }\n context.scale(image.gifData.width / radius, image.gifData.height / radius);\n }\n else if (element) {\n const ratio = image.ratio, pos = {\n x: -radius,\n y: -radius,\n };\n context.drawImage(element, pos.x, pos.y, radius * 2, (radius * 2) / ratio);\n }\n context.globalAlpha = 1;\n }\n getSidesCount() {\n return 12;\n }\n async init(container) {\n const options = container.actualOptions;\n if (!options.preload || !this._engine.loadImage) {\n return;\n }\n for (const imageData of options.preload) {\n await this._engine.loadImage(imageData);\n }\n }\n loadShape(particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const imageData = particle.shapeData, image = this._engine.images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n this.loadImageShape(imageData).then(() => {\n this.loadShape(particle);\n });\n }\n }\n particleInit(container, particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const images = this._engine.images, imageData = particle.shapeData, color = particle.getFillColor(), image = images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n return;\n }\n const replaceColor = imageData.replaceColor ?? imageData.replace_color ?? image.replaceColor;\n if (image.loading) {\n setTimeout(() => {\n this.particleInit(container, particle);\n });\n return;\n }\n (async () => {\n let imageRes;\n if (image.svgData && color) {\n imageRes = await replaceImageColor(image, imageData, color, particle);\n }\n else {\n imageRes = {\n color,\n data: image,\n element: image.element,\n gif: image.gif,\n gifData: image.gifData,\n gifLoopCount: image.gifLoopCount,\n loaded: true,\n ratio: imageData.width && imageData.height ? imageData.width / imageData.height : image.ratio ?? 1,\n replaceColor: replaceColor,\n source: imageData.src,\n };\n }\n if (!imageRes.ratio) {\n imageRes.ratio = 1;\n }\n const fill = imageData.fill ?? particle.fill, close = imageData.close ?? particle.close, imageShape = {\n image: imageRes,\n fill,\n close,\n };\n particle.image = imageShape.image;\n particle.fill = imageShape.fill;\n particle.close = imageShape.close;\n })();\n }\n}\n","export class Preload {\n constructor() {\n this.src = \"\";\n this.gif = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.gif !== undefined) {\n this.gif = data.gif;\n }\n if (data.height !== undefined) {\n this.height = data.height;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n if (data.replaceColor !== undefined) {\n this.replaceColor = data.replaceColor;\n }\n if (data.src !== undefined) {\n this.src = data.src;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n","import { Preload } from \"./Options/Classes/Preload\";\nexport class ImagePreloaderPlugin {\n constructor(engine) {\n this.id = \"imagePreloader\";\n this._engine = engine;\n }\n getPlugin() {\n return {};\n }\n loadOptions(options, source) {\n if (!source || !source.preload) {\n return;\n }\n if (!options.preload) {\n options.preload = [];\n }\n const preloadOptions = options.preload;\n for (const item of source.preload) {\n const existing = preloadOptions.find((t) => t.name === item.name || t.src === item.src);\n if (existing) {\n existing.load(item);\n }\n else {\n const preload = new Preload();\n preload.load(item);\n preloadOptions.push(preload);\n }\n }\n }\n needsPlugin() {\n return true;\n }\n}\n","import { downloadSvgImage, loadGifImage, loadImage } from \"./Utils\";\nimport { ImageDrawer } from \"./ImageDrawer\";\nimport { ImagePreloaderPlugin } from \"./ImagePreloader\";\nimport { errorPrefix } from \"tsparticles-engine\";\nfunction addLoadImageToEngine(engine) {\n if (engine.loadImage) {\n return;\n }\n engine.loadImage = async (data) => {\n if (!data.name && !data.src) {\n throw new Error(`${errorPrefix} no image source provided`);\n }\n if (!engine.images) {\n engine.images = [];\n }\n if (engine.images.find((t) => t.name === data.name || t.source === data.src)) {\n return;\n }\n try {\n const image = {\n gif: data.gif ?? false,\n name: data.name ?? data.src,\n source: data.src,\n type: data.src.substring(data.src.length - 3),\n error: false,\n loading: true,\n replaceColor: data.replaceColor,\n ratio: data.width && data.height ? data.width / data.height : undefined,\n };\n engine.images.push(image);\n const imageFunc = data.gif ? loadGifImage : data.replaceColor ? downloadSvgImage : loadImage;\n await imageFunc(image);\n }\n catch {\n throw new Error(`${errorPrefix} ${data.name ?? data.src} not found`);\n }\n };\n}\nexport async function loadImageShape(engine, refresh = true) {\n addLoadImageToEngine(engine);\n const preloader = new ImagePreloaderPlugin(engine);\n await engine.addPlugin(preloader, refresh);\n await engine.addShape([\"image\", \"images\"], new ImageDrawer(engine), refresh);\n}\n","import { ValueWithRandom } from \"tsparticles-engine\";\nexport class LifeDelay extends ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ValueWithRandom } from \"tsparticles-engine\";\nexport class LifeDuration extends ValueWithRandom {\n constructor() {\n super();\n this.random.minimumValue = 0.0001;\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { LifeDelay } from \"./LifeDelay\";\nimport { LifeDuration } from \"./LifeDuration\";\nexport class Life {\n constructor() {\n this.count = 0;\n this.delay = new LifeDelay();\n this.duration = new LifeDuration();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n","import { getRandom, getRangeValue, randomInRange, setRangeValue, } from \"tsparticles-engine\";\nimport { Life } from \"./Options/Classes/Life\";\nexport class LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container, particlesOptions = particle.options, lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? 1 : getRandom())) /\n container.retina.reduceFactor) *\n 1000\n : 0,\n delayTime: 0,\n duration: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? 1 : getRandom())) /\n container.retina.reduceFactor) *\n 1000\n : 0,\n time: 0,\n count: lifeOptions.count,\n };\n if (particle.life.duration <= 0) {\n particle.life.duration = -1;\n }\n if (particle.life.count <= 0) {\n particle.life.count = -1;\n }\n if (particle.life) {\n particle.spawning = particle.life.delay > 0;\n }\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.life) {\n options.life = new Life();\n }\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = 0;\n life.time = 0;\n }\n else {\n return;\n }\n }\n if (life.duration === -1) {\n return;\n }\n if (particle.spawning) {\n return;\n }\n if (justSpawned) {\n life.time = 0;\n }\n else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = 0;\n if (particle.life.count > 0) {\n particle.life.count--;\n }\n if (particle.life.count === 0) {\n particle.destroy();\n return;\n }\n const canvasSize = this.container.canvas.size, widthRange = setRangeValue(0, canvasSize.width), heightRange = setRangeValue(0, canvasSize.width);\n particle.position.x = randomInRange(widthRange);\n particle.position.y = randomInRange(heightRange);\n particle.spawning = true;\n life.delayTime = 0;\n life.time = 0;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = getRangeValue(lifeOptions.delay.value) * 1000;\n life.duration = getRangeValue(lifeOptions.duration.value) * 1000;\n }\n }\n}\n","export class LineDrawer {\n draw(context, particle, radius) {\n const shapeData = particle.shapeData;\n context.moveTo(-radius / 2, 0);\n context.lineTo(radius / 2, 0);\n context.lineCap = shapeData?.cap ?? \"butt\";\n }\n getSidesCount() {\n return 1;\n }\n}\n","import { isSsr } from \"tsparticles-engine\";\nexport class ParallaxMover {\n init() {\n }\n isEnabled(particle) {\n return (!isSsr() &&\n !particle.destroyed &&\n particle.container.actualOptions.interactivity.events.onHover.parallax.enable);\n }\n move(particle) {\n const container = particle.container, options = container.actualOptions, parallaxOptions = options.interactivity.events.onHover.parallax;\n if (isSsr() || !parallaxOptions.enable) {\n return;\n }\n const parallaxForce = parallaxOptions.force, mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const canvasSize = container.canvas.size, canvasCenter = {\n x: canvasSize.width / 2,\n y: canvasSize.height / 2,\n }, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = {\n x: (mousePos.x - canvasCenter.x) * factor,\n y: (mousePos.y - canvasCenter.y) * factor,\n }, { offset } = particle;\n offset.x += (centerDistance.x - offset.x) / parallaxSmooth;\n offset.y += (centerDistance.y - offset.y) / parallaxSmooth;\n }\n}\n","export class ParticlesInteractorBase {\n constructor(container) {\n this.container = container;\n this.type = \"particles\";\n }\n}\n","import { ParticlesInteractorBase, getDistances, } from \"tsparticles-engine\";\nexport class Attractor extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n async interact(p1) {\n const container = this.container, distance = p1.retina.attractDistance ?? container.retina.attractDistance, pos1 = p1.getPosition(), query = container.particles.quadTree.queryCircle(pos1, distance);\n for (const p2 of query) {\n if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), { dx, dy } = getDistances(pos1, pos2), rotate = p1.options.move.attract.rotate, ax = dx / (rotate.x * 1000), ay = dy / (rotate.y * 1000), p1Factor = p2.size.value / p1.size.value, p2Factor = 1 / p1Factor;\n p1.velocity.x -= ax * p1Factor;\n p1.velocity.y -= ay * p1Factor;\n p2.velocity.x += ax * p2Factor;\n p2.velocity.y += ay * p2Factor;\n }\n }\n isEnabled(particle) {\n return particle.options.move.attract.enable;\n }\n reset() {\n }\n}\n","import { clamp } from \"tsparticles-engine\";\nfunction updateAbsorb(p1, r1, p2, r2, delta, pixelRatio) {\n const factor = clamp((p1.options.collisions.absorb.speed * delta.factor) / 10, 0, r2);\n p1.size.value += factor / 2;\n p2.size.value -= factor;\n if (r2 <= pixelRatio) {\n p2.size.value = 0;\n p2.destroy();\n }\n}\nexport function absorb(p1, p2, delta, pixelRatio) {\n const r1 = p1.getRadius(), r2 = p2.getRadius();\n if (r1 === undefined && r2 !== undefined) {\n p1.destroy();\n }\n else if (r1 !== undefined && r2 === undefined) {\n p2.destroy();\n }\n else if (r1 !== undefined && r2 !== undefined) {\n if (r1 >= r2) {\n updateAbsorb(p1, r1, p2, r2, delta, pixelRatio);\n }\n else {\n updateAbsorb(p2, r2, p1, r1, delta, pixelRatio);\n }\n }\n}\n","import { circleBounce, circleBounceDataFromParticle, getRangeValue } from \"tsparticles-engine\";\nconst fixBounceSpeed = (p) => {\n if (p.collisionMaxSpeed === undefined) {\n p.collisionMaxSpeed = getRangeValue(p.options.collisions.maxSpeed);\n }\n if (p.velocity.length > p.collisionMaxSpeed) {\n p.velocity.length = p.collisionMaxSpeed;\n }\n};\nexport function bounce(p1, p2) {\n circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));\n fixBounceSpeed(p1);\n fixBounceSpeed(p2);\n}\n","import { absorb } from \"./Absorb\";\nimport { bounce } from \"./Bounce\";\nimport { destroy } from \"./Destroy\";\nexport function resolveCollision(p1, p2, delta, pixelRatio) {\n switch (p1.options.collisions.mode) {\n case \"absorb\": {\n absorb(p1, p2, delta, pixelRatio);\n break;\n }\n case \"bounce\": {\n bounce(p1, p2);\n break;\n }\n case \"destroy\": {\n destroy(p1, p2);\n break;\n }\n }\n}\n","import { bounce } from \"./Bounce\";\nexport function destroy(p1, p2) {\n if (!p1.unbreakable && !p2.unbreakable) {\n bounce(p1, p2);\n }\n if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {\n p1.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {\n p2.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() !== undefined) {\n const deleteP = p1.getRadius() >= p2.getRadius() ? p2 : p1;\n deleteP.destroy();\n }\n}\n","import { ParticlesInteractorBase, getDistance } from \"tsparticles-engine\";\nimport { resolveCollision } from \"./ResolveCollision\";\nexport class Collider extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n async interact(p1, delta) {\n if (p1.destroyed || p1.spawning) {\n return;\n }\n const container = this.container, pos1 = p1.getPosition(), radius1 = p1.getRadius(), query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);\n for (const p2 of query) {\n if (p1 === p2 ||\n !p2.options.collisions.enable ||\n p1.options.collisions.mode !== p2.options.collisions.mode ||\n p2.destroyed ||\n p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), radius2 = p2.getRadius();\n if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {\n continue;\n }\n const dist = getDistance(pos1, pos2), distP = radius1 + radius2;\n if (dist > distP) {\n continue;\n }\n resolveCollision(p1, p2, delta, container.retina.pixelRatio);\n }\n }\n isEnabled(particle) {\n return particle.options.collisions.enable;\n }\n reset() {\n }\n}\n","import { Circle, Rectangle } from \"tsparticles-engine\";\nexport class CircleWarp extends Circle {\n constructor(x, y, radius, canvasSize) {\n super(x, y, radius);\n this.canvasSize = canvasSize;\n this.canvasSize = { ...canvasSize };\n }\n contains(point) {\n const { width, height } = this.canvasSize;\n const { x, y } = point;\n return (super.contains(point) ||\n super.contains({ x: x - width, y }) ||\n super.contains({ x: x - width, y: y - height }) ||\n super.contains({ x, y: y - height }));\n }\n intersects(range) {\n if (super.intersects(range)) {\n return true;\n }\n const rect = range, circle = range, newPos = {\n x: range.position.x - this.canvasSize.width,\n y: range.position.y - this.canvasSize.height,\n };\n if (circle.radius !== undefined) {\n const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * 2);\n return super.intersects(biggerCircle);\n }\n else if (rect.size !== undefined) {\n const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * 2, rect.size.height * 2);\n return super.intersects(rectSW);\n }\n return false;\n }\n}\n","import { OptionsColor } from \"tsparticles-engine\";\nexport class LinksShadow {\n constructor() {\n this.blur = 5;\n this.color = new OptionsColor();\n this.color.value = \"#000\";\n this.enable = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { OptionsColor } from \"tsparticles-engine\";\nexport class LinksTriangle {\n constructor() {\n this.enable = false;\n this.frequency = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor } from \"tsparticles-engine\";\nimport { LinksShadow } from \"./LinksShadow\";\nimport { LinksTriangle } from \"./LinksTriangle\";\nexport class Links {\n constructor() {\n this.blink = false;\n this.color = new OptionsColor();\n this.color.value = \"#fff\";\n this.consent = false;\n this.distance = 100;\n this.enable = false;\n this.frequency = 1;\n this.opacity = 1;\n this.shadow = new LinksShadow();\n this.triangles = new LinksTriangle();\n this.width = 1;\n this.warp = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.id !== undefined) {\n this.id = data.id;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n this.shadow.load(data.shadow);\n this.triangles.load(data.triangles);\n if (data.width !== undefined) {\n this.width = data.width;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","import { Circle, ParticlesInteractorBase, getDistances, getLinkRandomColor, } from \"tsparticles-engine\";\nimport { CircleWarp } from \"./CircleWarp\";\nimport { Links } from \"./Options/Classes/Links\";\nfunction getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {\n const { dx, dy, distance } = getDistances(pos1, pos2);\n if (!warp || distance <= optDistance) {\n return distance;\n }\n const absDiffs = {\n x: Math.abs(dx),\n y: Math.abs(dy),\n }, warpDistances = {\n x: Math.min(absDiffs.x, canvasSize.width - absDiffs.x),\n y: Math.min(absDiffs.y, canvasSize.height - absDiffs.y),\n };\n return Math.sqrt(warpDistances.x ** 2 + warpDistances.y ** 2);\n}\nexport class Linker extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n this._setColor = (p1) => {\n if (!p1.options.links) {\n return;\n }\n const container = this.linkContainer, linksOptions = p1.options.links;\n let linkColor = linksOptions.id === undefined\n ? container.particles.linksColor\n : container.particles.linksColors.get(linksOptions.id);\n if (linkColor) {\n return;\n }\n const optColor = linksOptions.color;\n linkColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);\n if (linksOptions.id === undefined) {\n container.particles.linksColor = linkColor;\n }\n else {\n container.particles.linksColors.set(linksOptions.id, linkColor);\n }\n };\n this.linkContainer = container;\n }\n clear() {\n }\n init() {\n this.linkContainer.particles.linksColor = undefined;\n this.linkContainer.particles.linksColors = new Map();\n }\n async interact(p1) {\n if (!p1.options.links) {\n return;\n }\n p1.links = [];\n const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;\n if (pos1.x < 0 || pos1.y < 0 || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {\n return;\n }\n const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? 0, warp = linkOpt1.warp, range = warp\n ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize)\n : new Circle(pos1.x, pos1.y, optDistance), query = container.particles.quadTree.query(range);\n for (const p2 of query) {\n const linkOpt2 = p2.options.links;\n if (p1 === p2 ||\n !linkOpt2?.enable ||\n linkOpt1.id !== linkOpt2.id ||\n p2.spawning ||\n p2.destroyed ||\n !p2.links ||\n p1.links.some((t) => t.destination === p2) ||\n p2.links.some((t) => t.destination === p1)) {\n continue;\n }\n const pos2 = p2.getPosition();\n if (pos2.x < 0 || pos2.y < 0 || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {\n continue;\n }\n const distance = getLinkDistance(pos1, pos2, optDistance, canvasSize, warp && linkOpt2.warp);\n if (distance > optDistance) {\n continue;\n }\n const opacityLine = (1 - distance / optDistance) * optOpacity;\n this._setColor(p1);\n p1.links.push({\n destination: p2,\n opacity: opacityLine,\n });\n }\n }\n isEnabled(particle) {\n return !!particle.options.links?.enable;\n }\n loadParticlesOptions(options, ...sources) {\n if (!options.links) {\n options.links = new Links();\n }\n for (const source of sources) {\n options.links.load(source?.links ?? source?.lineLinked ?? source?.line_linked);\n }\n }\n reset() {\n }\n}\n","import { drawLine, drawTriangle, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from \"tsparticles-engine\";\nexport function drawLinkLine(params) {\n let drawn = false;\n const { begin, end, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;\n if (getDistance(begin, end) <= maxDistance) {\n drawLine(context, begin, end);\n drawn = true;\n }\n else if (links.warp) {\n let pi1;\n let pi2;\n const endNE = {\n x: end.x - canvasSize.width,\n y: end.y,\n };\n const d1 = getDistances(begin, endNE);\n if (d1.distance <= maxDistance) {\n const yi = begin.y - (d1.dy / d1.dx) * begin.x;\n pi1 = { x: 0, y: yi };\n pi2 = { x: canvasSize.width, y: yi };\n }\n else {\n const endSW = {\n x: end.x,\n y: end.y - canvasSize.height,\n };\n const d2 = getDistances(begin, endSW);\n if (d2.distance <= maxDistance) {\n const yi = begin.y - (d2.dy / d2.dx) * begin.x;\n const xi = -yi / (d2.dy / d2.dx);\n pi1 = { x: xi, y: 0 };\n pi2 = { x: xi, y: canvasSize.height };\n }\n else {\n const endSE = {\n x: end.x - canvasSize.width,\n y: end.y - canvasSize.height,\n };\n const d3 = getDistances(begin, endSE);\n if (d3.distance <= maxDistance) {\n const yi = begin.y - (d3.dy / d3.dx) * begin.x;\n const xi = -yi / (d3.dy / d3.dx);\n pi1 = { x: xi, y: yi };\n pi2 = { x: pi1.x + canvasSize.width, y: pi1.y + canvasSize.height };\n }\n }\n }\n if (pi1 && pi2) {\n drawLine(context, begin, pi1);\n drawLine(context, end, pi2);\n drawn = true;\n }\n }\n if (!drawn) {\n return;\n }\n context.lineWidth = width;\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n const { shadow } = links;\n if (shadow.enable) {\n const shadowColor = rangeColorToRgb(shadow.color);\n if (shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n }\n }\n context.stroke();\n}\nexport function drawLinkTriangle(params) {\n const { context, pos1, pos2, pos3, backgroundMask, colorTriangle, opacityTriangle } = params;\n drawTriangle(context, pos1, pos2, pos3);\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.fillStyle = getStyleFromRgb(colorTriangle, opacityTriangle);\n context.fill();\n}\nexport function getLinkKey(ids) {\n ids.sort((a, b) => a - b);\n return ids.join(\"_\");\n}\nexport function setLinkFrequency(particles, dictionary) {\n const key = getLinkKey(particles.map((t) => t.id));\n let res = dictionary.get(key);\n if (res === undefined) {\n res = getRandom();\n dictionary.set(key, res);\n }\n return res;\n}\n","import { getDistance, getLinkColor, getRandom, getRangeValue, rangeColorToRgb, } from \"tsparticles-engine\";\nimport { drawLinkLine, drawLinkTriangle, setLinkFrequency } from \"./Utils\";\nexport class LinkInstance {\n constructor(container) {\n this.container = container;\n this._drawLinkLine = (p1, link) => {\n const p1LinksOptions = p1.options.links;\n if (!p1LinksOptions?.enable) {\n return;\n }\n const container = this.container, options = container.actualOptions, p2 = link.destination, pos1 = p1.getPosition(), pos2 = p2.getPosition();\n let opacity = link.opacity;\n container.canvas.draw((ctx) => {\n let colorLine;\n const twinkle = p1.options.twinkle?.lines;\n if (twinkle?.enable) {\n const twinkleFreq = twinkle.frequency, twinkleRgb = rangeColorToRgb(twinkle.color), twinkling = getRandom() < twinkleFreq;\n if (twinkling && twinkleRgb) {\n colorLine = twinkleRgb;\n opacity = getRangeValue(twinkle.opacity);\n }\n }\n if (!colorLine) {\n const linkColor = p1LinksOptions.id !== undefined\n ? container.particles.linksColors.get(p1LinksOptions.id)\n : container.particles.linksColor;\n colorLine = getLinkColor(p1, p2, linkColor);\n }\n if (!colorLine) {\n return;\n }\n const width = p1.retina.linksWidth ?? 0, maxDistance = p1.retina.linksDistance ?? 0, { backgroundMask } = options;\n drawLinkLine({\n context: ctx,\n width,\n begin: pos1,\n end: pos2,\n maxDistance,\n canvasSize: container.canvas.size,\n links: p1LinksOptions,\n backgroundMask: backgroundMask,\n colorLine,\n opacity,\n });\n });\n };\n this._drawLinkTriangle = (p1, link1, link2) => {\n const linksOptions = p1.options.links;\n if (!linksOptions?.enable) {\n return;\n }\n const triangleOptions = linksOptions.triangles;\n if (!triangleOptions.enable) {\n return;\n }\n const container = this.container, options = container.actualOptions, p2 = link1.destination, p3 = link2.destination, opacityTriangle = triangleOptions.opacity ?? (link1.opacity + link2.opacity) / 2;\n if (opacityTriangle <= 0) {\n return;\n }\n container.canvas.draw((ctx) => {\n const pos1 = p1.getPosition(), pos2 = p2.getPosition(), pos3 = p3.getPosition(), linksDistance = p1.retina.linksDistance ?? 0;\n if (getDistance(pos1, pos2) > linksDistance ||\n getDistance(pos3, pos2) > linksDistance ||\n getDistance(pos3, pos1) > linksDistance) {\n return;\n }\n let colorTriangle = rangeColorToRgb(triangleOptions.color);\n if (!colorTriangle) {\n const linkColor = linksOptions.id !== undefined\n ? container.particles.linksColors.get(linksOptions.id)\n : container.particles.linksColor;\n colorTriangle = getLinkColor(p1, p2, linkColor);\n }\n if (!colorTriangle) {\n return;\n }\n drawLinkTriangle({\n context: ctx,\n pos1,\n pos2,\n pos3,\n backgroundMask: options.backgroundMask,\n colorTriangle,\n opacityTriangle,\n });\n });\n };\n this._drawTriangles = (options, p1, link, p1Links) => {\n const p2 = link.destination;\n if (!(options.links?.triangles.enable && p2.options.links?.triangles.enable)) {\n return;\n }\n const vertices = p2.links?.filter((t) => {\n const linkFreq = this._getLinkFrequency(p2, t.destination);\n return (p2.options.links &&\n linkFreq <= p2.options.links.frequency &&\n p1Links.findIndex((l) => l.destination === t.destination) >= 0);\n });\n if (!vertices?.length) {\n return;\n }\n for (const vertex of vertices) {\n const p3 = vertex.destination, triangleFreq = this._getTriangleFrequency(p1, p2, p3);\n if (triangleFreq > options.links.triangles.frequency) {\n continue;\n }\n this._drawLinkTriangle(p1, link, vertex);\n }\n };\n this._getLinkFrequency = (p1, p2) => {\n return setLinkFrequency([p1, p2], this._freqs.links);\n };\n this._getTriangleFrequency = (p1, p2, p3) => {\n return setLinkFrequency([p1, p2, p3], this._freqs.triangles);\n };\n this._freqs = {\n links: new Map(),\n triangles: new Map(),\n };\n }\n drawParticle(context, particle) {\n const { links, options } = particle;\n if (!links || links.length <= 0) {\n return;\n }\n const p1Links = links.filter((l) => options.links && this._getLinkFrequency(particle, l.destination) <= options.links.frequency);\n for (const link of p1Links) {\n this._drawTriangles(options, particle, link, p1Links);\n if (link.opacity > 0 && (particle.retina.linksWidth ?? 0) > 0) {\n this._drawLinkLine(particle, link);\n }\n }\n }\n async init() {\n this._freqs.links = new Map();\n this._freqs.triangles = new Map();\n }\n particleCreated(particle) {\n particle.links = [];\n if (!particle.options.links) {\n return;\n }\n const ratio = this.container.retina.pixelRatio, { retina } = particle, { distance, width } = particle.options.links;\n retina.linksDistance = distance * ratio;\n retina.linksWidth = width * ratio;\n }\n particleDestroyed(particle) {\n particle.links = [];\n }\n}\n","import { LinkInstance } from \"./LinkInstance\";\nclass LinksPlugin {\n constructor() {\n this.id = \"links\";\n }\n getPlugin(container) {\n return new LinkInstance(container);\n }\n loadOptions() {\n }\n needsPlugin() {\n return true;\n }\n}\nexport async function loadLinksPlugin(engine, refresh = true) {\n const plugin = new LinksPlugin();\n await engine.addPlugin(plugin, refresh);\n}\n","import { loadLinksInteraction } from \"./interaction\";\nimport { loadLinksPlugin } from \"./plugin\";\nexport async function loadParticlesLinksInteraction(engine, refresh = true) {\n await loadLinksInteraction(engine, refresh);\n await loadLinksPlugin(engine, refresh);\n}\nexport * from \"./Options/Classes/Links\";\nexport * from \"./Options/Classes/LinksShadow\";\nexport * from \"./Options/Classes/LinksTriangle\";\nexport * from \"./Options/Interfaces/ILinks\";\nexport * from \"./Options/Interfaces/ILinksShadow\";\nexport * from \"./Options/Interfaces/ILinksTriangle\";\n","import { Linker } from \"./Linker\";\nexport async function loadLinksInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesLinks\", (container) => new Linker(container), refresh);\n}\n","import { getRangeValue } from \"tsparticles-engine\";\nexport class PolygonDrawerBase {\n draw(context, particle, radius) {\n const start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;\n if (!context) {\n return;\n }\n context.beginPath();\n context.translate(start.x, start.y);\n context.moveTo(0, 0);\n for (let i = 0; i < sideCount; i++) {\n context.lineTo(side.length, 0);\n context.translate(side.length, 0);\n context.rotate(interiorAngle);\n }\n }\n getSidesCount(particle) {\n const polygon = particle.shapeData;\n return Math.round(getRangeValue(polygon?.sides ?? polygon?.nb_sides ?? 5));\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase\";\nexport class PolygonDrawer extends PolygonDrawerBase {\n getCenter(particle, radius) {\n return {\n x: -radius / (particle.sides / 3.5),\n y: -radius / (2.66 / 3.5),\n };\n }\n getSidesData(particle, radius) {\n const sides = particle.sides;\n return {\n count: {\n denominator: 1,\n numerator: sides,\n },\n length: (radius * 2.66) / (sides / 3),\n };\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase\";\nexport class TriangleDrawer extends PolygonDrawerBase {\n getCenter(particle, radius) {\n return {\n x: -radius,\n y: radius / 1.66,\n };\n }\n getSidesCount() {\n return 3;\n }\n getSidesData(particle, radius) {\n return {\n count: {\n denominator: 2,\n numerator: 3,\n },\n length: radius * 2,\n };\n }\n}\n","import { PolygonDrawer } from \"./PolygonDrawer\";\nimport { TriangleDrawer } from \"./TriangleDrawer\";\nexport async function loadGenericPolygonShape(engine, refresh = true) {\n await engine.addShape(\"polygon\", new PolygonDrawer(), refresh);\n}\nexport async function loadTriangleShape(engine, refresh = true) {\n await engine.addShape(\"triangle\", new TriangleDrawer(), refresh);\n}\nexport async function loadPolygonShape(engine, refresh = true) {\n await loadGenericPolygonShape(engine, refresh);\n await loadTriangleShape(engine, refresh);\n}\n","import { setRangeValue } from \"tsparticles-engine\";\nexport class RotateAnimation {\n constructor() {\n this.enable = false;\n this.speed = 0;\n this.decay = 0;\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ValueWithRandom, } from \"tsparticles-engine\";\nimport { RotateAnimation } from \"./RotateAnimation\";\nexport class Rotate extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new RotateAnimation();\n this.direction = \"clockwise\";\n this.path = false;\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n this.animation.load(data.animation);\n if (data.path !== undefined) {\n this.path = data.path;\n }\n }\n}\n","import { getRandom, getRangeValue, } from \"tsparticles-engine\";\nimport { Rotate } from \"./Options/Classes/Rotate\";\nfunction updateRotate(particle, delta) {\n const rotate = particle.rotate, rotateOptions = particle.options.rotate;\n if (!rotate || !rotateOptions) {\n return;\n }\n const rotateAnimation = rotateOptions.animation, speed = (rotate.velocity ?? 0) * delta.factor, max = 2 * Math.PI, decay = rotate.decay ?? 1;\n if (!rotateAnimation.enable) {\n return;\n }\n switch (rotate.status) {\n case \"increasing\":\n rotate.value += speed;\n if (rotate.value > max) {\n rotate.value -= max;\n }\n break;\n case \"decreasing\":\n default:\n rotate.value -= speed;\n if (rotate.value < 0) {\n rotate.value += max;\n }\n break;\n }\n if (rotate.velocity && decay !== 1) {\n rotate.velocity *= decay;\n }\n}\nexport class RotateUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const rotateOptions = particle.options.rotate;\n if (!rotateOptions) {\n return;\n }\n particle.rotate = {\n enable: rotateOptions.animation.enable,\n value: (getRangeValue(rotateOptions.value) * Math.PI) / 180,\n };\n particle.pathRotation = rotateOptions.path;\n let rotateDirection = rotateOptions.direction;\n if (rotateDirection === \"random\") {\n const index = Math.floor(getRandom() * 2);\n rotateDirection = index > 0 ? \"counter-clockwise\" : \"clockwise\";\n }\n switch (rotateDirection) {\n case \"counter-clockwise\":\n case \"counterClockwise\":\n particle.rotate.status = \"decreasing\";\n break;\n case \"clockwise\":\n particle.rotate.status = \"increasing\";\n break;\n }\n const rotateAnimation = rotateOptions.animation;\n if (rotateAnimation.enable) {\n particle.rotate.decay = 1 - getRangeValue(rotateAnimation.decay);\n particle.rotate.velocity =\n (getRangeValue(rotateAnimation.speed) / 360) * this.container.retina.reduceFactor;\n if (!rotateAnimation.sync) {\n particle.rotate.velocity *= getRandom();\n }\n }\n particle.rotation = particle.rotate.value;\n }\n isEnabled(particle) {\n const rotate = particle.options.rotate;\n if (!rotate) {\n return false;\n }\n return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;\n }\n loadOptions(options, ...sources) {\n if (!options.rotate) {\n options.rotate = new Rotate();\n }\n for (const source of sources) {\n options.rotate.load(source?.rotate);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateRotate(particle, delta);\n particle.rotation = particle.rotate?.value ?? 0;\n }\n}\n","const fixFactor = Math.sqrt(2);\nexport class SquareDrawer {\n draw(context, particle, radius) {\n const fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2;\n context.rect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter);\n }\n getSidesCount() {\n return 4;\n }\n}\n","import { getRangeValue } from \"tsparticles-engine\";\nexport class StarDrawer {\n draw(context, particle, radius) {\n const sides = particle.sides, inset = particle.starInset ?? 2;\n context.moveTo(0, 0 - radius);\n for (let i = 0; i < sides; i++) {\n context.rotate(Math.PI / sides);\n context.lineTo(0, 0 - radius * inset);\n context.rotate(Math.PI / sides);\n context.lineTo(0, 0 - radius);\n }\n }\n getSidesCount(particle) {\n const star = particle.shapeData;\n return Math.round(getRangeValue(star?.sides ?? star?.nb_sides ?? 5));\n }\n particleInit(container, particle) {\n const star = particle.shapeData, inset = getRangeValue(star?.inset ?? 2);\n particle.starInset = inset;\n }\n}\n","import { randomInRange, } from \"tsparticles-engine\";\nfunction updateColorValue(delta, colorValue, valueAnimation, max, decrease) {\n if (!colorValue ||\n !valueAnimation.enable ||\n ((colorValue.maxLoops ?? 0) > 0 && (colorValue.loops ?? 0) > (colorValue.maxLoops ?? 0))) {\n return;\n }\n if (!colorValue.time) {\n colorValue.time = 0;\n }\n if ((colorValue.delayTime ?? 0) > 0 && colorValue.time < (colorValue.delayTime ?? 0)) {\n colorValue.time += delta.value;\n }\n if ((colorValue.delayTime ?? 0) > 0 && colorValue.time < (colorValue.delayTime ?? 0)) {\n return;\n }\n const offset = randomInRange(valueAnimation.offset), velocity = (colorValue.velocity ?? 0) * delta.factor + offset * 3.6, decay = colorValue.decay ?? 1;\n if (!decrease || colorValue.status === \"increasing\") {\n colorValue.value += velocity;\n if (colorValue.value > max) {\n if (!colorValue.loops) {\n colorValue.loops = 0;\n }\n colorValue.loops++;\n if (decrease) {\n colorValue.status = \"decreasing\";\n colorValue.value -= colorValue.value % max;\n }\n }\n }\n else {\n colorValue.value -= velocity;\n if (colorValue.value < 0) {\n if (!colorValue.loops) {\n colorValue.loops = 0;\n }\n colorValue.loops++;\n colorValue.status = \"increasing\";\n colorValue.value += colorValue.value;\n }\n }\n if (colorValue.velocity && decay !== 1) {\n colorValue.velocity *= decay;\n }\n if (colorValue.value > max) {\n colorValue.value %= max;\n }\n}\nexport function updateStrokeColor(particle, delta) {\n if (!particle.strokeColor || !particle.strokeAnimation) {\n return;\n }\n const { h, s, l } = particle.strokeColor, { h: hAnimation, s: sAnimation, l: lAnimation } = particle.strokeAnimation;\n if (h) {\n updateColorValue(delta, h, hAnimation, 360, false);\n }\n if (s) {\n updateColorValue(delta, s, sAnimation, 100, true);\n }\n if (l) {\n updateColorValue(delta, l, lAnimation, 100, true);\n }\n}\n","import { getHslAnimationFromHsl, getRangeValue, itemFromSingleOrMultiple, rangeColorToHsl, } from \"tsparticles-engine\";\nimport { updateStrokeColor } from \"./Utils\";\nexport class StrokeColorUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container, options = particle.options;\n const stroke = itemFromSingleOrMultiple(options.stroke, particle.id, options.reduceDuplicates);\n particle.strokeWidth = getRangeValue(stroke.width) * container.retina.pixelRatio;\n particle.strokeOpacity = getRangeValue(stroke.opacity ?? 1);\n particle.strokeAnimation = stroke.color?.animation;\n const strokeHslColor = rangeColorToHsl(stroke.color) ?? particle.getFillColor();\n if (strokeHslColor) {\n particle.strokeColor = getHslAnimationFromHsl(strokeHslColor, particle.strokeAnimation, container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const color = particle.strokeAnimation, { strokeColor } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n !!color &&\n ((strokeColor?.h.value !== undefined && strokeColor.h.enable) ||\n (strokeColor?.s.value !== undefined && strokeColor.s.enable) ||\n (strokeColor?.l.value !== undefined && strokeColor.l.enable)));\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateStrokeColor(particle, delta);\n }\n}\n","import { executeOnSingleOrMultiple, isInArray, itemFromSingleOrMultiple, loadFont, } from \"tsparticles-engine\";\nexport const validTypes = [\"text\", \"character\", \"char\"];\nexport class TextDrawer {\n draw(context, particle, radius, opacity) {\n const character = particle.shapeData;\n if (character === undefined) {\n return;\n }\n const textData = character.value;\n if (textData === undefined) {\n return;\n }\n if (particle.text === undefined) {\n particle.text = itemFromSingleOrMultiple(textData, particle.randomIndexData);\n }\n const text = particle.text, style = character.style ?? \"\", weight = character.weight ?? \"400\", size = Math.round(radius) * 2, font = character.font ?? \"Verdana\", fill = particle.fill, offsetX = (text.length * radius) / 2;\n context.font = `${style} ${weight} ${size}px \"${font}\"`;\n const pos = {\n x: -offsetX,\n y: radius / 2,\n };\n context.globalAlpha = opacity;\n if (fill) {\n context.fillText(text, pos.x, pos.y);\n }\n else {\n context.strokeText(text, pos.x, pos.y);\n }\n context.globalAlpha = 1;\n }\n getSidesCount() {\n return 12;\n }\n async init(container) {\n const options = container.actualOptions;\n if (validTypes.find((t) => isInArray(t, options.particles.shape.type))) {\n const shapeOptions = validTypes\n .map((t) => options.particles.shape.options[t])\n .find((t) => !!t), promises = [];\n executeOnSingleOrMultiple(shapeOptions, (shape) => {\n promises.push(loadFont(shape.font, shape.weight));\n });\n await Promise.all(promises);\n }\n }\n particleInit(container, particle) {\n if (!particle.shape || !validTypes.includes(particle.shape)) {\n return;\n }\n const character = particle.shapeData;\n if (character === undefined) {\n return;\n }\n const textData = character.value;\n if (textData === undefined) {\n return;\n }\n particle.text = itemFromSingleOrMultiple(textData, particle.randomIndexData);\n }\n}\n","import { initPjs } from \"tsparticles-particles.js\";\nimport { loadBasic } from \"tsparticles-basic\";\nimport { loadEasingQuadPlugin } from \"tsparticles-plugin-easing-quad\";\nimport { loadExternalAttractInteraction } from \"tsparticles-interaction-external-attract\";\nimport { loadExternalBounceInteraction } from \"tsparticles-interaction-external-bounce\";\nimport { loadExternalBubbleInteraction } from \"tsparticles-interaction-external-bubble\";\nimport { loadExternalConnectInteraction } from \"tsparticles-interaction-external-connect\";\nimport { loadExternalGrabInteraction } from \"tsparticles-interaction-external-grab\";\nimport { loadExternalPauseInteraction } from \"tsparticles-interaction-external-pause\";\nimport { loadExternalPushInteraction } from \"tsparticles-interaction-external-push\";\nimport { loadExternalRemoveInteraction } from \"tsparticles-interaction-external-remove\";\nimport { loadExternalRepulseInteraction } from \"tsparticles-interaction-external-repulse\";\nimport { loadExternalSlowInteraction } from \"tsparticles-interaction-external-slow\";\nimport { loadImageShape } from \"tsparticles-shape-image\";\nimport { loadLifeUpdater } from \"tsparticles-updater-life\";\nimport { loadLineShape } from \"tsparticles-shape-line\";\nimport { loadParallaxMover } from \"tsparticles-move-parallax\";\nimport { loadParticlesAttractInteraction } from \"tsparticles-interaction-particles-attract\";\nimport { loadParticlesCollisionsInteraction } from \"tsparticles-interaction-particles-collisions\";\nimport { loadParticlesLinksInteraction } from \"tsparticles-interaction-particles-links\";\nimport { loadPolygonShape } from \"tsparticles-shape-polygon\";\nimport { loadRotateUpdater } from \"tsparticles-updater-rotate\";\nimport { loadSquareShape } from \"tsparticles-shape-square\";\nimport { loadStarShape } from \"tsparticles-shape-star\";\nimport { loadStrokeColorUpdater } from \"tsparticles-updater-stroke-color\";\nimport { loadTextShape } from \"tsparticles-shape-text\";\nexport async function loadSlim(engine, refresh = true) {\n initPjs(engine);\n await loadParallaxMover(engine, false);\n await loadExternalAttractInteraction(engine, false);\n await loadExternalBounceInteraction(engine, false);\n await loadExternalBubbleInteraction(engine, false);\n await loadExternalConnectInteraction(engine, false);\n await loadExternalGrabInteraction(engine, false);\n await loadExternalPauseInteraction(engine, false);\n await loadExternalPushInteraction(engine, false);\n await loadExternalRemoveInteraction(engine, false);\n await loadExternalRepulseInteraction(engine, false);\n await loadExternalSlowInteraction(engine, false);\n await loadParticlesAttractInteraction(engine, false);\n await loadParticlesCollisionsInteraction(engine, false);\n await loadParticlesLinksInteraction(engine, false);\n await loadEasingQuadPlugin();\n await loadImageShape(engine, false);\n await loadLineShape(engine, false);\n await loadPolygonShape(engine, false);\n await loadSquareShape(engine, false);\n await loadStarShape(engine, false);\n await loadTextShape(engine, false);\n await loadLifeUpdater(engine, false);\n await loadRotateUpdater(engine, false);\n await loadStrokeColorUpdater(engine, false);\n await loadBasic(engine, refresh);\n}\n","import { ParallaxMover } from \"./ParallaxMover\";\nexport async function loadParallaxMover(engine, refresh = true) {\n await engine.addMover(\"parallax\", () => new ParallaxMover(), refresh);\n}\n","import { Attractor } from \"./Attractor\";\nexport async function loadExternalAttractInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalAttract\", (container) => new Attractor(engine, container), refresh);\n}\nexport * from \"./Options/Classes/Attract\";\nexport * from \"./Options/Interfaces/IAttract\";\n","import { Bouncer } from \"./Bouncer\";\nexport async function loadExternalBounceInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalBounce\", (container) => new Bouncer(container), refresh);\n}\nexport * from \"./Options/Classes/Bounce\";\nexport * from \"./Options/Interfaces/IBounce\";\n","import { Bubbler } from \"./Bubbler\";\nexport async function loadExternalBubbleInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalBubble\", (container) => new Bubbler(container), refresh);\n}\nexport * from \"./Options/Classes/BubbleBase\";\nexport * from \"./Options/Classes/BubbleDiv\";\nexport * from \"./Options/Classes/Bubble\";\nexport * from \"./Options/Interfaces/IBubbleBase\";\nexport * from \"./Options/Interfaces/IBubbleDiv\";\nexport * from \"./Options/Interfaces/IBubble\";\n","import { Connector } from \"./Connector\";\nexport async function loadExternalConnectInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalConnect\", (container) => new Connector(container), refresh);\n}\nexport * from \"./Options/Classes/Connect\";\nexport * from \"./Options/Classes/ConnectLinks\";\nexport * from \"./Options/Interfaces/IConnect\";\nexport * from \"./Options/Interfaces/IConnectLinks\";\n","import { Grabber } from \"./Grabber\";\nexport async function loadExternalGrabInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalGrab\", (container) => new Grabber(container), refresh);\n}\nexport * from \"./Options/Classes/Grab\";\nexport * from \"./Options/Classes/GrabLinks\";\nexport * from \"./Options/Interfaces/IGrab\";\nexport * from \"./Options/Interfaces/IGrabLinks\";\n","import { Pauser } from \"./Pauser\";\nexport async function loadExternalPauseInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalPause\", (container) => new Pauser(container), refresh);\n}\n","import { Pusher } from \"./Pusher\";\nexport async function loadExternalPushInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalPush\", (container) => new Pusher(container), refresh);\n}\nexport * from \"./Options/Classes/Push\";\nexport * from \"./Options/Interfaces/IPush\";\n","import { Remover } from \"./Remover\";\nexport async function loadExternalRemoveInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalRemove\", (container) => new Remover(container), refresh);\n}\nexport * from \"./Options/Classes/Remove\";\nexport * from \"./Options/Interfaces/IRemove\";\n","import { Repulser } from \"./Repulser\";\nexport async function loadExternalRepulseInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalRepulse\", (container) => new Repulser(engine, container), refresh);\n}\nexport * from \"./Options/Classes/RepulseBase\";\nexport * from \"./Options/Classes/RepulseDiv\";\nexport * from \"./Options/Classes/Repulse\";\nexport * from \"./Options/Interfaces/IRepulseBase\";\nexport * from \"./Options/Interfaces/IRepulseDiv\";\nexport * from \"./Options/Interfaces/IRepulse\";\n","import { Slower } from \"./Slower\";\nexport async function loadExternalSlowInteraction(engine, refresh = true) {\n await engine.addInteractor(\"externalSlow\", (container) => new Slower(container), refresh);\n}\nexport * from \"./Options/Classes/Slow\";\nexport * from \"./Options/Interfaces/ISlow\";\n","import { Attractor } from \"./Attractor\";\nexport async function loadParticlesAttractInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesAttract\", (container) => new Attractor(container), refresh);\n}\n","import { Collider } from \"./Collider\";\nexport async function loadParticlesCollisionsInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesCollisions\", (container) => new Collider(container), refresh);\n}\n","import { addEasing } from \"tsparticles-engine\";\nexport async function loadEasingQuadPlugin() {\n addEasing(\"ease-in-quad\", (value) => value ** 2);\n addEasing(\"ease-out-quad\", (value) => 1 - (1 - value) ** 2);\n addEasing(\"ease-in-out-quad\", (value) => (value < 0.5 ? 2 * value ** 2 : 1 - (-2 * value + 2) ** 2 / 2));\n}\n","import { LineDrawer } from \"./LineDrawer\";\nexport async function loadLineShape(engine, refresh = true) {\n await engine.addShape(\"line\", new LineDrawer(), refresh);\n}\n","import { SquareDrawer } from \"./SquareDrawer\";\nexport async function loadSquareShape(engine, refresh = true) {\n await engine.addShape([\"edge\", \"square\"], new SquareDrawer(), refresh);\n}\n","import { StarDrawer } from \"./StarDrawer\";\nexport async function loadStarShape(engine, refresh = true) {\n await engine.addShape(\"star\", new StarDrawer(), refresh);\n}\n","import { TextDrawer, validTypes } from \"./TextDrawer\";\nexport async function loadTextShape(engine, refresh = true) {\n await engine.addShape(validTypes, new TextDrawer(), refresh);\n}\n","import { LifeUpdater } from \"./LifeUpdater\";\nexport async function loadLifeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"life\", (container) => new LifeUpdater(container), refresh);\n}\n","import { RotateUpdater } from \"./RotateUpdater\";\nexport async function loadRotateUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"rotate\", (container) => new RotateUpdater(container), refresh);\n}\n","import { StrokeColorUpdater } from \"./StrokeColorUpdater\";\nexport async function loadStrokeColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"strokeColor\", (container) => new StrokeColorUpdater(container), refresh);\n}\n","import { useCallback } from \"react\";\nimport Particles from \"react-tsparticles\";\n// import \"pathseg\";\n//import { loadFull } from \"tsparticles\"; // if you are going to use `loadFull`, install the \"tsparticles\" package too.\nimport { loadSlim } from \"tsparticles-slim\"; // if you are going to use `loadSlim`, install the \"tsparticles-slim\" package too.\n\nfunction Particle() {\n const particlesInit = useCallback(async (engine) => {\n console.log(engine);\n\n await loadSlim(engine);\n }, []);\n\n const particlesLoaded = useCallback(async (container) => {\n console.log(container);\n }, []);\n\n return (\n \n );\n}\nexport default Particle;\n","import React, { useState, useEffect } from \"react\";\nimport axios from \"axios\";\nimport \"./App.css\";\n\nimport { tsParticles } from \"tsparticles-engine\";\nimport Particle from \"./content/particle/Particle\";\nconst API_URL = \"https://worldtimeapi.org/api/ip\";\nconst targetTime = new Date(\"January 29, 2024 20:30:00\").getTime();\n\nfunction App() {\n const [currentTime, setCurrentTime] = useState(null);\n const fetchCurrentTime = async () => {\n try {\n const response = await axios.get(API_URL);\n setCurrentTime(response.data.unixtime * 1000);\n } catch (error) {\n console.error(\"Error fetching current time:\", error);\n }\n };\n useEffect(() => {\n const generateRandomConfetti = () => {\n const confettiElements = document.getElementsByClassName(\"confetti\");\n for (let i = 0; i < confettiElements.length; i++) {\n const randomX = Math.random();\n const randomDelay = Math.random();\n confettiElements[i].style.setProperty(\"--random-x\", randomX);\n confettiElements[i].style.setProperty(\"--random-delay\", randomDelay);\n }\n };\n\n generateRandomConfetti();\n\n const timer = setInterval(fetchCurrentTime, 1000);\n return () => clearInterval(timer);\n }, []);\n\n const formatTime = (time) => {\n if (time === 0) {\n return \"00 : 00 : 00\";\n }\n \n const seconds = Math.floor((time / 1000) % 60);\n const minutes = Math.floor((time / 1000 / 60) % 60);\n const hours = Math.floor((time / (1000 * 60 * 60)));\n \n return `${hours.toString().padStart(2, '0')} : ${minutes.toString().padStart(2, '0')} : ${seconds.toString().padStart(2, '0')}`;\n };\n\n const calculateTimeRemaining = () => {\n const now = currentTime || Date.now();\n const remainingTime = targetTime - now;\n \n if (remainingTime <= 0) {\n return 0;\n }\n \n return remainingTime;\n };\n\n useEffect(() => {\n const handleMouseMove = (event) => {\n const text = document.querySelector(\".moving-text\");\n text.style.left = event.pageX + \"px\";\n text.style.top = event.pageY + \"px\";\n };\n\n document.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }, []);\n\n const letters = \"01\";\n\n let interval = 0;\n function handleMouse(event) {\n let iteration = 0;\n\n clearInterval(interval);\n\n interval = setInterval(() => {\n if (event.target) {\n event.target.innerText = event.target.innerText\n .split(\"\")\n .map((_, index) => {\n if (index < iteration) {\n return event.target?.dataset?.value?.[index] ?? \"\";\n }\n\n return letters[Math.floor(Math.random() * 2)];\n })\n .join(\"\");\n }\n\n if (\n event.target &&\n event.target.dataset.value &&\n iteration >= (event.target?.dataset?.value?.length ?? 0)\n ) {\n clearInterval(interval);\n }\n\n iteration += 1 / 3;\n }, 50);\n }\n\n return (\n \n
\n
\n
\n
\n
PASSWORD
\n \n {currentTime ? (\n
{formatTime(calculateTimeRemaining())}
\n ) : (\n
Loading...
\n )}\n\n
\n {[...Array(25)].map((_, index) => (\n
\n ))}\n
\n {/* Centered logo container */}\n \n
attack.defend.survive
\n\n {/*
\n 010101101010\n
*/}\n
\n );\n}\n\nexport default App;\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render(\n \n \n \n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals(console.log);\n"],"names":["aa","require","ca","p","a","b","c","arguments","length","encodeURIComponent","da","Set","ea","fa","ha","add","ia","window","document","createElement","ja","Object","prototype","hasOwnProperty","ka","la","ma","v","d","e","f","g","this","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","type","sanitizeURL","removeEmptyString","z","split","forEach","toLowerCase","ra","sa","toUpperCase","ta","slice","pa","isNaN","qa","call","test","oa","removeAttribute","setAttribute","setAttributeNS","replace","xlinkHref","ua","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","Symbol","for","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","iterator","Ka","La","A","assign","Ma","Error","stack","trim","match","Na","Oa","prepareStackTrace","defineProperty","set","Reflect","construct","l","h","k","displayName","includes","name","Pa","tag","render","Qa","$$typeof","_context","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","getOwnPropertyDescriptor","constructor","get","configurable","enumerable","getValue","setValue","stopTracking","Ua","Wa","checked","value","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","initialValue","controlled","ab","bb","cb","db","ownerDocument","eb","Array","isArray","fb","options","selected","defaultSelected","disabled","gb","dangerouslySetInnerHTML","children","hb","ib","jb","textContent","kb","lb","mb","nb","namespaceURI","innerHTML","valueOf","toString","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","ob","lastChild","nodeType","nodeValue","pb","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","qb","rb","sb","style","indexOf","setProperty","keys","charAt","substring","tb","menuitem","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","ub","vb","is","wb","xb","target","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","push","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","addEventListener","removeEventListener","Nb","apply","m","onError","Ob","Pb","Qb","Rb","Sb","Tb","Vb","alternate","return","flags","Wb","memoizedState","dehydrated","Xb","Zb","child","sibling","current","Yb","$b","ac","unstable_scheduleCallback","bc","unstable_cancelCallback","cc","unstable_shouldYield","dc","unstable_requestPaint","B","unstable_now","ec","unstable_getCurrentPriorityLevel","fc","unstable_ImmediatePriority","gc","unstable_UserBlockingPriority","hc","unstable_NormalPriority","ic","unstable_LowPriority","jc","unstable_IdlePriority","kc","lc","oc","Math","clz32","pc","qc","log","LN2","rc","sc","tc","uc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","xc","yc","zc","Ac","eventTimes","Cc","C","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Map","Pc","Qc","Rc","Sc","delete","pointerId","Tc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Vc","Wc","priority","isDehydrated","containerInfo","Xc","Yc","dispatchEvent","shift","Zc","$c","ad","bd","cd","ReactCurrentBatchConfig","dd","ed","transition","fd","gd","hd","id","Uc","stopPropagation","jd","kd","ld","md","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","Date","now","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","data","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","key","String","fromCharCode","code","location","repeat","locale","which","Rd","Td","width","height","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","number","password","range","search","tel","text","time","url","week","me","ne","oe","event","listeners","pe","qe","re","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","node","offset","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","start","end","selectionStart","selectionEnd","min","defaultView","getSelection","extend","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","element","left","scrollLeft","top","scrollTop","focus","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","concat","nf","Ub","instance","listener","D","of","has","pf","qf","rf","random","sf","bind","capture","passive","n","t","J","x","u","w","F","tf","uf","parentWindow","vf","wf","na","xa","$a","ba","je","char","ke","unshift","xf","yf","zf","Af","Bf","Cf","Df","Ef","__html","Ff","setTimeout","Gf","clearTimeout","Hf","Promise","Jf","queueMicrotask","resolve","then","catch","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","E","G","Vf","H","Wf","Xf","Yf","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","childContextTypes","$f","ag","bg","getChildContext","cg","__reactInternalMemoizedMergedChildContext","dg","eg","fg","gg","hg","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","I","zg","Ag","Bg","elementType","deletions","Cg","pendingProps","overflow","treeContext","retryLane","Dg","mode","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","defaultProps","Mg","Ng","Og","Pg","Qg","Rg","_currentValue","Sg","childLanes","Tg","dependencies","firstContext","lanes","Ug","Vg","context","memoizedValue","next","Wg","Xg","Yg","interleaved","Zg","$g","ah","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","bh","ch","eventTime","lane","payload","callback","dh","K","eh","fh","gh","q","r","y","hh","ih","jh","Component","refs","kh","nh","isMounted","_reactInternals","enqueueSetState","L","lh","mh","enqueueReplaceState","enqueueForceUpdate","oh","shouldComponentUpdate","isPureReactComponent","ph","contextType","state","updater","qh","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","rh","props","getDerivedStateFromProps","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","sh","ref","_owner","_stringRef","th","join","uh","vh","index","wh","xh","yh","implementation","zh","Ah","done","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","tagName","Jh","Kh","Lh","M","Mh","revealOrder","Nh","Oh","_workInProgressVersionPrimary","Ph","ReactCurrentDispatcher","Qh","Rh","N","O","P","Sh","Th","Uh","Vh","Q","Wh","Xh","Yh","Zh","$h","ai","bi","ci","baseQueue","queue","di","ei","fi","lastRenderedReducer","action","hasEagerState","eagerState","lastRenderedState","dispatch","gi","hi","ii","ji","ki","getSnapshot","li","mi","R","ni","lastEffect","stores","oi","pi","qi","ri","create","destroy","deps","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Ki","message","digest","Li","Mi","console","error","Ni","WeakMap","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","compare","cj","dj","ej","baseLanes","cachePool","transitions","fj","gj","hj","ij","jj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","kj","lj","pendingContext","mj","Aj","Bj","Cj","Dj","nj","oj","pj","fallback","qj","rj","tj","dataset","dgst","uj","vj","_reactRetry","sj","subtreeFlags","wj","xj","isBackwards","rendering","renderingStartTime","last","tail","tailMode","yj","Ej","S","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","size","createElementNS","autoFocus","createTextNode","T","Hj","Ij","Jj","Kj","U","Lj","WeakSet","V","Mj","W","Nj","Oj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","insertBefore","_reactRootContainer","Xj","X","Yj","Zj","ak","onCommitFiberUnmount","componentWillUnmount","bk","ck","dk","ek","fk","isHidden","gk","hk","display","ik","jk","kk","lk","__reactInternalSnapshotBeforeUpdate","src","Wk","mk","ceil","nk","ok","pk","Y","Z","qk","rk","sk","tk","uk","Infinity","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","callbackNode","expirationTimes","expiredLanes","wc","callbackPriority","ig","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","finishedWork","finishedLanes","Qk","timeoutHandle","Rk","Sk","Tk","Uk","Vk","mutableReadLanes","Bc","Pj","onCommitFiberRoot","mc","onRecoverableError","Xk","onPostCommitFiberRoot","Yk","Zk","al","isReactComponent","pendingChildren","bl","mutableSourceEagerHydrationData","cl","cache","pendingSuspenseBoundaries","el","fl","gl","hl","il","jl","zj","$k","ll","reportError","ml","_internalRoot","nl","ol","pl","ql","sl","rl","unmount","unstable_scheduleHydration","splice","querySelectorAll","JSON","stringify","form","tl","usingClientEntryPoint","Events","ul","findFiberByHostInstance","bundleType","version","rendererPackageName","vl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","wl","isDisabled","supportsFiber","inject","exports","createPortal","dl","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","err","module","__self","__source","jsx","jsxs","setState","forceUpdate","escape","_status","_result","default","Children","map","count","toArray","only","Fragment","Profiler","PureComponent","StrictMode","Suspense","cloneElement","createContext","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","createFactory","createRef","forwardRef","isValidElement","lazy","memo","startTransition","unstable_act","pop","sortIndex","performance","setImmediate","startTime","expirationTime","priorityLevel","navigator","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","floor","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","chunkId","all","reduce","promises","miniCssF","obj","prop","inProgress","dataWebpackPrefix","script","needAttach","scripts","getElementsByTagName","i","s","getAttribute","charset","timeout","nc","onScriptComplete","prev","onerror","onload","doneFns","fn","head","toStringTag","installedChunks","j","installedChunkData","promise","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","thisArg","getPrototypeOf","kindOf","thing","str","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","globalThis","global","isContextDefined","isTypedArray","TypedArray","Uint8Array","isHTMLForm","_ref","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","stripBOM","content","charCodeAt","inherits","superConstructor","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","lastIndex","arr","forEachEntry","pair","matchAll","regExp","matches","exec","hasOwnProp","freezeMethods","writable","toObjectSet","arrayOrString","delimiter","define","toCamelCase","p1","p2","noop","toFiniteNumber","Number","isFinite","generateString","alphabet","isSpecCompliantForm","toJSONObject","visit","reducedValue","isThenable","AxiosError","config","response","captureStackTrace","utils","toJSON","description","fileName","lineNumber","columnNumber","status","from","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","token","predicates","formData","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","isFlatArray","exposedHelpers","build","encode","charMap","AxiosURLSearchParams","params","_pairs","toFormData","encoder","_encode","buildURL","serializeFn","serialize","serializedParams","hashmarkIndex","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","clear","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","transitionalDefaults","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","formDataToJSON","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","method","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","parseHeaders","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","normalize","format","normalized","formatHeader","_len","targets","asStrings","first","computed","_len2","_key2","accessor","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","_ref2","mapped","headerValue","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","write","expires","domain","secure","cookie","toGMTString","read","RegExp","decodeURIComponent","remove","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","msie","userAgent","urlParsingNode","originURL","resolveURL","protocol","host","hash","hostname","port","pathname","requestURL","samplesCount","bytes","timestamps","firstSampleTS","chunkLength","startedAt","bytesCount","passed","round","progressEventReducer","isDownloadStream","bytesNotified","_speedometer","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","signal","Boolean","auth","username","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","ECONNABORTED","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","isURLSameOrigin","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","cancel","abort","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","VERSION","validators","deprecatedWarnings","validator","formatMessage","opt","desc","opts","ERR_DEPRECATED","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","InterceptorManager","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","axios","createInstance","defaultConfig","Cancel","spread","isAxiosError","formToJSON","getAdapter","generatedAttribute","mouseLeaveEvent","mouseMoveEvent","touchEndEvent","errorPrefix","Vector3d","xOrCoords","_updateFromAngle","angle","cos","sin","coords3d","origin","atan2","sqrt","getLengthSq","clone","addTo","copy","distanceTo","sub","distanceToSq","div","divTo","mult","multTo","rotate","setTo","v3d","subFrom","Vector","super","_random","easings","addEasing","easing","getEasing","getRandom","clamp","num","max","mix","comp1","comp2","weight1","weight2","randomInRange","getRangeMax","getRangeMin","getRangeValue","setRangeValue","enable","minimumValue","getDistances","pointA","pointB","dx","dy","distance","getDistance","collisionVelocity","v1","v2","m1","m2","calcExactPositionOrRandomFromSize","_data$position$x2","_data$position5","_data$position$y2","_data$position6","parseAlpha","parseFloat","_logger","debug","info","verbose","warning","getLogger","rectSideBounce","res","bounced","pSide","pOtherSide","rectSide","rectOtherSide","velocity","factor","isSsr","safeMatchMedia","query","matchMedia","isInArray","array","itemFromArray","arrayRandomIndex","isPointInside","point","radius","direction","bounds","inside","right","bottom","areBoundsInside","calculateBounds","deepExtend","destination","sources","sourceIsArray","destDict","isDivModeEnabled","divs","findItemFromSingleOrMultiple","divModeExecute","executeOnSingleOrMultiple","divMode","selectors","selector","singleDivModeExecute","checkSelector","circleBounceDataFromParticle","getPosition","getRadius","mass","getMass","bounce","horizontal","vertical","circleBounce","xVelocityDiff","yVelocityDiff","pos1","pos2","xDist","yDist","u1","u2","vFinal1","vFinal2","rectBounce","particle","divBounds","resH","resV","item","itemFromSingleOrMultiple","useIndex","find","initParticleNumericAnimationValue","pxRatio","valueRange","animationOptions","delayTime","loops","maxLoops","decay","autoStatus","startValue","getPositionOrSize","positionOrSize","canvasSize","_","rest","arg","randomColorValue","midColorValue","colorManagers","addColorManager","manager","hue2rgb","stringToRgba","startsWith","stringPrefix","parseString","hexFixed","parseInt","rangeColorToRgb","colorToRgb","handleRangeColor","getRandomRgbColor","stringToRgb","handleColor","rangeColorToHsl","rgb","rgbToHsl","r1","g1","b1","hslToRgb","hsl","hslPercent","fixedMin","getStyleFromRgb","getStyleFromHsl","colorMix","color1","color2","size1","size2","rgb1","rgb2","getLinkColor","linkColor","_p1$getFillColor","_p2$getFillColor","sourceColor","getFillColor","getStrokeColor","destColor","hslColor","getLinkRandomColor","optColor","blink","consent","getHslFromAnimation","getHslAnimationFromHsl","reduceFactor","resColor","setColorAnimation","colorValue","colorAnimation","speed","sync","drawLine","begin","beginPath","moveTo","lineTo","closePath","dimension","clearRect","setTransformValue","newFactor","newValue","_factor$key","Canvas","container","_applyPostDrawUpdaters","_postDrawUpdaters","afterDraw","_applyPreDrawUpdaters","ctx","zOpacity","colorStyles","transform","_preDrawUpdaters","getColorStyles","fill","stroke","getTransformValues","updaterTransform","beforeDraw","_applyResizePlugins","plugin","_resizePlugins","resize","_getPluginParticleColors","fColor","sColor","_colorPlugins","particleFillColor","particleStrokeColor","_initCover","cover","actualOptions","backgroundMask","coverRgb","coverColor","_coverColorStyle","_initStyle","_fullScreen","_originalStyle","_setFullScreenStyle","_resetOriginalStyle","_initTrail","async","trail","particles","move","trailFill","fillColor","_trailFill","image","evt","_paintBase","baseColor","draw","fillStyle","fillRect","paintBase","_paintImage","globalAlpha","drawImage","paintImage","_repairStyle","_safeMutationObserver","observer","disconnect","initBackground","observe","attributes","originalStyle","_mutationObserver","fullScreen","_generated","paint","stop","drawParticle","delta","_particle$getStrokeCo","spawning","destroyed","pfColor","psColor","_particle$bubble$opac","_particle$opacity","_particle$strokeOpaci","zIndexOptions","zOpacityFactor","zIndexFactor","opacityRate","bubble","zStrokeOpacity","_transform$a","_transform$b","_transform$c","_transform$d","_particle$strokeWidth","composite","shadow","pos","rotation","pathRotation","rotateData","setTransform","globalCompositeOperation","shadowColor","shadowBlur","blur","shadowOffsetX","shadowOffsetY","lineWidth","strokeStyle","shape","drawer","drawers","retina","pixelRatio","drawShape","close","afterEffect","drawShapeAfterEffect","sizeRate","drawParticlePlugin","drawPlugin","init","obs","MutationObserver","safeMutationObserver","records","record","initUpdaters","initPlugins","background","elementStyle","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","backgroundSize","plugins","updaters","loadCanvas","canvas","ariaHidden","offsetHeight","offsetWidth","getContext","newSize","oldSize","started","resizeFactor","windowResize","needsRefresh","updateActualOptions","setDensity","refresh","manageListener","handler","addOptions","removeOptions","EventListeners","_doMouseTouchClick","_canPush","mouseInteractivity","interactivity","mouse","mousePos","clickPosition","clickTime","getTime","events","handleClickMode","_mouseTouchFinish","_handleThemeChange","mediaEvent","defaultThemes","themeName","dark","light","theme","themes","auto","loadTheme","_handleVisibilityChange","pauseOnBlur","hidden","pageHidden","pause","getAnimationStatus","play","_handleWindowResize","_resizeTimeout","_manageInteractivityListeners","mouseLeaveTmpEvent","_handlers","interactivityEl","html","canvasEl","pointerEvents","onHover","mouseMove","touchStart","touchMove","touchEndClick","mouseUp","mouseDown","touchEnd","mouseLeave","touchCancel","_manageListeners","detectType","detectsOn","_canvasEl$parentEleme","parentElement","_manageMediaMatch","_manageResize","visibilityChange","mediaMatch","addListener","oldThemeChange","removeListener","themeChange","ResizeObserver","_resizeObserver","unobserve","_mouseDown","clicking","downPosition","_mouseTouchClick","handled","mousePosition","clickPositionValid","_mouseTouchMove","mouseEvent","clientRect","getBoundingClientRect","sourceRect","targetRect","canvasRect","offsetX","offsetY","_mouseEvent$offsetX","_mouseEvent$offsetY","_mouseEvent$offsetX2","_mouseEvent$offsetY2","_canvasRect$left","_canvasRect$top","touchEvent","lastTouch","_touchEnd","touch","_touches","identifier","_touchEndClick","_touchStart","addListeners","removeListeners","OptionsColor","load","Background","BackgroundMaskCover","BackgroundMask","FullScreen","ClickEvent","DivEvent","elementId","ids","_data$ids","Parallax","force","smooth","HoverEvent","parallax","ResizeEvent","onDiv","ondiv","onhover","_data$onClick","_data$onDiv","_data$onHover","tmp","Modes","engine","_engine","_container","interactors","interactor","loadModeOptions","Interactivity","modes","detect_on","_data$detectsOn","ManualParticle","_data$position$x","_data$position$y","_data$position$mode","Responsive","maxWidth","ThemeDefault","Theme","ColorAnimation","HslAnimation","AnimatableColor","CollisionsAbsorb","CollisionsOverlap","retries","AnimationOptions","RangedAnimationOptions","Random","ValueWithRandom","ParticlesBounceFactor","ParticlesBounce","Collisions","absorb","maxSpeed","overlap","MoveAngle","MoveAttract","rotateX","rotateY","_data$rotate$x","_data$rotate","_data$rotate$y","_data$rotate2","MoveCenter","MoveGravity","acceleration","inverse","MovePath","generator","MoveTrailFill","MoveTrail","OutModes","_data$bottom","_data$left","_data$right","_data$top","Spin","Move","attract","center","drift","gravity","outModes","spin","straight","vibrate","warp","collisions","noise","outMode","out_mode","_data$outModes","_data$path","OpacityAnimation","opacity_min","Opacity","anim","_data$animation","ParticlesDensity","value_area","_data$width","_data$height","ParticlesNumber","density","limit","_data$limit","Shadow","charKey","charAltKey","imageKey","imageAltKey","polygonKey","polygonAltKey","Shape","loadShape","mainKey","altOverride","_this$options$mainKey","itemIsArray","emptyValue","mainDifferentValues","altDifferentValues","_this$options$altKey","character","_this$options$charKey","custom","_this$options$imageKe","images","polygon","_this$options$polygon","_data$options","_data$image","_this$options$shape","SizeAnimation","size_min","Size","Stroke","ZIndex","velocityRate","ParticlesOptions","groups","reduceDuplicates","_data$move$collisions","_data$move","_data$move2","_data$stroke","_data$shape","group","_this$groups$group","strokeToLoad","loadOptions","loadParticlesOptions","sourceOptionsArr","sourceOptions","Options","_findDefaultTheme","_this$themes$find","_importPreset","preset","getPreset","autoPlay","detectRetina","duration","fpsLimit","manualParticles","pauseOnOutsideViewport","responsive","zLayers","backgroundMode","fps_limit","retina_detect","_data$detectRetina","_data$fpsLimit","_data$fullScreen","_this$_findDefaultThe","_this$_findDefaultThe2","optResponsive","sort","existingTheme","optTheme","setResponsive","defaultOptions","responsiveOptions","screen","availWidth","setTheme","chosenTheme","clientDarkMode","defaultTheme","InteractionManager","_interactors","getInteractors","_externalInteractors","_particleInteractors","externalInteract","isEnabled","interact","particlesInteract","reset","fixOutMode","checkModes","diameter","coord","maxCoord","setCb","Particle","overrideOptions","_this","_calcPosition","_outModes$left","_outModes$right","_outModes$top","_outModes$bottom","tryCount","pluginPos","particlePosition","exactPosition","fixHorizontal","fixVertical","_checkOverlap","_calculateVelocity","baseVelocity","getParticleBaseVelocity","moveOptions","rad","PI","radOffset","collisionsOptions","overlapOptions","_getRollColor","_this$roll$angle","roll","backColor","alter","backFactor","backSum","alterHsl","_initPosition","_this$options$move$ce","_this$options$move$ce2","zIndexValue","initialPosition","moveCenter","getParticleDirectionAngle","outType","_loadShapeData","shapeOptions","shapeData","override","unbreakable","inRange","slow","pathGenerator","particleDestroyed","_this$bubble$color","_this$bubble$radius","_this$bubble$color2","strokeColor","_shapeData$fill","_shapeData$close","_drawer","lastPathTime","misplaced","maxDistance","ignoresResizeRatio","mainOptions","particlesOptions","shapeType","pathOptions","pathDelay","getPathGenerator","addPath","initParticle","initialVelocity","moveDecay","needsSort","lastZIndex","sides","getShapeDrawer","sideCountFunc","getSidesCount","mover","movers","particleInit","particleCreated","isInsideCanvas","isVisible","Point","Range","Rectangle","intersects","Circle","w2","h2","distPos","abs","pow","QuadTree","rectangle","capacity","_subdivide","_subs","_divided","_points","insert","check","found","queryCircle","queryRectangle","qTreeRectangle","Particles","_applyDensity","manualCount","_options$number$densi","numberOptions","densityFactor","_initDensityFactor","optParticlesNumber","optParticlesLimit","particlesNumber","particlesCount","removeQuantity","densityOptions","_pushParticle","initializer","pool","_nextId","canAdd","_array","_zArray","_removeParticle","zIdx","_interactionManager","quadTree","getMovers","getUpdaters","addManualParticles","addParticle","countToRemove","update","condition","particlesInitialization","pathGenerators","groupOptions","_groupOptions$number","pushing","redraw","removeAt","quantity","particlesToDelete","particleUpdate","checkDelete","zArray","Retina","devicePixelRatio","ratio","attractDistance","sizeAnimationSpeed","moveDistance","moveDrift","moveSpeed","guardCheck","loadContainerOptions","defaultPathGenerator","generate","Container","_intersectionManager","entry","isIntersecting","_nextFrame","_this$lastFrameTime","lastFrameTime","timestamp","initDelta","addLifeTime","alive","_delay","_duration","_lifeTime","_firstStart","_paused","_sourceOptions","_initialSourceOptions","_options","_eventListeners","IntersectionObserver","_intersectionObserver","addClickHandler","clickOrTouchHandler","posRetina","touched","touchMoved","touchStartHandler","touchMoveHandler","radiusX","radiusY","touchCancelHandler","mainArr","dom","idx","findIndex","refreshTime","_drawAnimationFrame","requestAnimationFrame","export","supported","blob","shapes","getSupportedShapes","availablePlugins","getAvailablePlugins","particlesSetup","_currentTheme","cancelAnimationFrame","needsUpdate","setNoise","noiseOrGenerator","setPath","pathOrGenerator","oldGenerator","_delayTimeout","HTMLElement","newMaxWidth","responsiveMaxWidth","EventDispatcher","args","hasEventListener","removeAllEventListeners","getItemsFromInitializer","initializers","values","Plugins","_initializers","presets","addInteractor","initInteractor","addParticleMover","initMover","addParticleUpdater","initUpdater","addPathGenerator","addPlugin","getPlugin","addPreset","presetKey","addShapeDrawer","types","needsPlugin","Engine","_configs","_domArray","_eventDispatcher","_initialized","configs","addConfig","nameOrConfig","_nameOrConfig$name","interactorInitializer","addMover","moverInitializer","updaterInitializer","addShape","initOrRefresh","afterEffectOrRefresh","destroyOrRefresh","customDrawer","realInit","realAfterEffect","realDestroy","realRefresh","domItem","tagIdOrOptionsOrParams","loadFromArray","optionsOrIndex","isParams","_loadParams","loadJSON","tagId","pathConfigJson","setJSON","setOnClickHandler","_params$id","_params$element","fetch","json","getDataFromUrl","domContainer","getElementById","currentOptions","oldIndex","old","existingCanvases","newItem","HslColorManager","_colorValue$hsl","_colorValue$hsl2","hsla","rgbResult","hslaToRgba","RgbColorManager","_colorValue$rgb","rgbColor","_colorValue$rgb2","tsParticles","rgbColorManager","hslColorManager","deepCompare","obj1","obj2","excludeKeyFn","keys1","keys2","value1","value2","deepCompareArrays","arr1","arr2","val1","val2","defaultId","library","nextProps","_nextProps$options","_this$props$options","nextOptions","canvasClassName","className","loadParticles","React","_this$props$id","_this$props$options2","_options$color","_options$minDistance","_options$connectParti","_options$speed","_options$maxParticles","_options$sizeVariatio","_options$responsive","querySelector","links","minDistance","connectParticles","maxParticles","sizeVariations","_responsive$options","_responsive$options2","_responsive$options3","_responsive$options4","_responsive$options5","breakpoint","pauseAnimation","resumeAnimation","initPjs","particlesJS","pJSDom","initParticlesJS","_particle$pathGenerat","applyPath","gravityOptions","gravityFactor","zVelocityFactor","BaseMover","_initSpin","_spinOptions$position","spinOptions","spinPos","spinCenter","spinAcceleration","_particle$retina","_particle$retina$move","_particle$retina2","_particle$retina2$mov","_particle$retina$maxS","particleOptions","slowFactor","getProximitySpeedFactor","baseSpeed","maxSize","updateFunc","maxCanvasSize","dxFixed","dyFixed","hDistance","vDistance","vel","applyDistance","CircleDrawer","circleRange","arc","_shapeData$angle","updateColorValue","valueAnimation","decrease","_colorValue$maxLoops","_colorValue$loops","_colorValue$maxLoops2","_colorValue$delayTime","_colorValue$delayTime2","_colorValue$delayTime3","_colorValue$delayTime4","_colorValue$velocity","_colorValue$decay","ColorUpdater","hAnimation","sAnimation","lAnimation","updateColor","OpacityUpdater","opacityOptions","opacityAnimation","_particle$opacity$max","_particle$opacity$max2","_particle$opacity$loo","_particle$opacity$max3","_data$maxLoops","_data$loops","_data$maxLoops2","_data$decay","_data$delayTime","_data$delayTime2","_data$delayTime3","_data$delayTime4","minValue","maxValue","_data$velocity","_data$velocity2","checkDestroy","updateOpacity","BounceOutMode","particleBounce","newVelocity","minPos","bounceHorizontal","bounceVertical","DestroyOutMode","_delta","vx","vy","NoneOutMode","pRadius","OutOutMode","circVec","newDx","newDy","wrap","newPos","sizeValue","nextBounds","OutOfCanvasUpdater","_updateOutMode","SizeUpdater","sizeAnimation","_particle$retina$size","_particle$size$maxLoo","_particle$size$maxLoo2","_particle$size$loops","_particle$size$maxLoo3","sizeVelocity","updateSize","loadBasic","loadBaseMover","loadCircleShape","loadColorUpdater","loadOpacityUpdater","loadOutModesUpdater","loadSizeUpdater","ExternalInteractorBase","Attract","Attractor","_clickAttract","finish","attractRadius","attractModeDistance","_processAttract","_hoverAttract","attractOptions","attractFactor","normVec","mouseMoveStatus","hoverEnabled","hoverMode","clickEnabled","clickMode","_particle$interactivi","Bounce","Bouncer","_processBounce","_processMouseBounce","tolerance","bounceModeDistance","_singleSelectorBounce","elem","offsetLeft","offsetTop","BubbleBase","BubbleDiv","Bubble","calculateBubbleValue","particleValue","modeValue","optionsValue","Bubbler","_clickBubble","mouseClickPos","bubbleOptions","bubbleModeDistance","_particle$opacity$val","durationEnd","distMouse","timeSpent","sizeData","bubbleObj","optValue","bubbleModeSize","particlesObj","_process","opacityData","_hoverBubbleColor","_hoverBubble","pointDistance","_hoverBubbleSize","_hoverBubbleOpacity","divBubble","finalColor","modeColor","bubbleColor","pColor","_divBubble$opacity","_options$interactivit","_particle$opacity$val2","_particle$opacity2","modeOpacity","optOpacity","modeSize","optSize","bubbleParam","bubbleDuration","bubbleDistance","particlesParam","pObjBubble","pObj","_singleSelectorHover","repulseRadius","ConnectLinks","Connect","lineLinked","line_linked","_data$links","lineStyle","connectOptions","connect","gradStop","sourcePos","destPos","midRgb","grad","createLinearGradient","addColorStop","gradient","drawConnection","_p1$retina$linksWidth","ls","drawConnectLine","linksWidth","Connector","connectModeDistance","connectModeRadius","distMax","xDiff","yDiff","GrabLinks","Grab","drawGrab","lineColor","_particle$retina$link","beginPos","colorLine","drawGrabLine","Grabber","grab","grabModeDistance","_grabLineOptions$colo","_particle$options$lin","grabLineOptions","lineOpacity","opacityLine","grabLineColor","linksOptions","Pauser","Push","particles_nb","_data$quantity","Pusher","pushOptions","Remove","Remover","removeNb","RepulseBase","RepulseDiv","Repulse","Repulser","_clickRepulse","repulseOptions","repulse","repulseDistance","repulseModeDistance","vect","_hoverRepulse","_processRepulse","divRepulse","_divRepulse$speed","repulseFactor","_singleSelectorRepulse","repulseOpts","hover","click","Slow","Slower","slowModeRadius","slowOptions","dist","proximityFactor","InterlaceOffsets","InterlaceSteps","ByteStream","Uint8ClampedArray","getString","acc","curr","nextByte","nextTwoBytes","readSubBlocks","blockString","readSubBlocksBin","blockData","skipSubBlocks","parseColorTable","byteStream","colors","parseBlock","gif","avgAlpha","getFrameIndex","getTransparencyIndex","progressCallback","frame","frames","packedByte","localColorTableFlag","interlacedFlag","sortFlag","reserved","localColorCount","localColorTable","getColor","globalColorTable","ImageData","colorSpace","DOMException","EvalError","minCodeSize","imageData","clearCode","readBits","bytePos","bitPos","dic","pass","pixelPos","lineIndex","bitmap","createImageBitmap","parseImageBlock","GCreserved","disposalMethod","userInputDelayFlag","transparencyFlag","transparencyIndex","applicationExtension","authenticationCode","applicationExtensions","comments","plainTextData","charSize","foregroundColor","parseExtensionBlock","currentColorRegex","loadImage","loading","Image","loadGifImage","_getGIFLoopAmount","gifData","gifURL","arrayBuffer","totalTime","colorRes","pixelAspectRatio","globalColorTableFlag","globalColorCount","backgroundColorIndex","copyWithin","frameIndex","incrementFrameIndex","getframeIndex","increment","decodeGIF","gifLoopCount","extension","NaN","getGIFLoopAmount","downloadSvgImage","svgData","replaceImageColor","_imageData$replaceCol","svgColoredData","imageShape","colorStyle","preFillIndex","replaceColorSvg","imageRes","replaceColor","replace_color","svg","domUrl","URL","webkitURL","createObjectURL","revokeObjectURL","img2","ImageDrawer","loadImageShape","_imageShape$replaceCo","addImage","_particle$gifFrame","offscreenCanvas","OffscreenCanvas","offscreenContext","_image$gifLoopCount","imageSmoothingQuality","imageSmoothingEnabled","gifFrame","gifTime","scale","putImageData","previousImageData","getImageData","preload","_imageData$fill","_imageData$close","_image$ratio","Preload","ImagePreloaderPlugin","preloadOptions","existing","_data$gif","_data$name","imageFunc","_data$name2","addLoadImageToEngine","preloader","LifeDelay","LifeDuration","Life","LifeUpdater","lifeOptions","life","justSpawned","widthRange","heightRange","LineDrawer","_shapeData$cap","lineCap","cap","ParallaxMover","parallaxOptions","parallaxForce","canvasCenter","parallaxSmooth","centerDistance","ParticlesInteractorBase","_p1$retina$attractDis","ax","ay","p1Factor","p2Factor","updateAbsorb","r2","fixBounceSpeed","collisionMaxSpeed","resolveCollision","Collider","radius1","radius2","CircleWarp","rect","circle","biggerCircle","rectSW","LinksShadow","LinksTriangle","frequency","Links","triangles","getLinkDistance","optDistance","absDiffs","warpDistances","Linker","_setColor","linkContainer","linksColor","linksColors","_p1$retina$linksDista","linkOpt1","linksDistance","linkOpt2","_source$links","setLinkFrequency","dictionary","LinkInstance","_drawLinkLine","p1LinksOptions","_p1$options$twinkle","twinkle","lines","twinkleFreq","twinkleRgb","drawn","pi1","pi2","d1","d2","d3","drawLinkLine","_drawLinkTriangle","link1","link2","_triangleOptions$opac","triangleOptions","p3","opacityTriangle","_p1$retina$linksDista2","pos3","colorTriangle","drawTriangle","drawLinkTriangle","_drawTriangles","p1Links","_options$links","_p2$options$links","_p2$links","vertices","linkFreq","_getLinkFrequency","vertex","_getTriangleFrequency","_freqs","LinksPlugin","loadParticlesLinksInteraction","loadLinksInteraction","loadLinksPlugin","PolygonDrawerBase","getCenter","side","getSidesData","sideCount","numerator","denominator","decimalSides","interiorAngleDegrees","interiorAngle","translate","_polygon$sides","nb_sides","PolygonDrawer","TriangleDrawer","loadPolygonShape","loadGenericPolygonShape","loadTriangleShape","RotateAnimation","Rotate","RotateUpdater","rotateOptions","rotateDirection","rotateAnimation","_particle$rotate$valu","_particle$rotate","_rotate$velocity","_rotate$decay","updateRotate","fixFactor","SquareDrawer","fixedRadius","fixedDiameter","StarDrawer","_particle$starInset","inset","starInset","_star$sides","star","_star$inset","StrokeColorUpdater","_stroke$opacity","_stroke$color","_rangeColorToHsl","strokeAnimation","strokeHslColor","updateStrokeColor","validTypes","TextDrawer","_character$style","_character$weight","_character$font","textData","randomIndexData","weight","font","fillText","strokeText","fonts","loadFont","loadSlim","loadParallaxMover","loadExternalAttractInteraction","loadExternalBounceInteraction","loadExternalBubbleInteraction","loadExternalConnectInteraction","loadExternalGrabInteraction","loadExternalPauseInteraction","loadExternalPushInteraction","loadExternalRemoveInteraction","loadExternalRepulseInteraction","loadExternalSlowInteraction","loadParticlesAttractInteraction","loadParticlesCollisionsInteraction","loadEasingQuadPlugin","loadLineShape","loadSquareShape","loadStarShape","loadTextShape","loadLifeUpdater","loadRotateUpdater","loadStrokeColorUpdater","particlesInit","particlesLoaded","_jsx","targetTime","currentTime","setCurrentTime","fetchCurrentTime","unixtime","generateRandomConfetti","confettiElements","getElementsByClassName","randomX","randomDelay","timer","setInterval","clearInterval","handleMouseMove","_jsxs","alt","seconds","minutes","hours","padStart","formatTime","calculateTimeRemaining","remainingTime","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","App","reportWebVitals"],"sourceRoot":""}
\ No newline at end of file