@lizardbyte/shared-web 2024.901.195233 → 2024.921.24756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (()=>{var e={836:e=>{e.exports=function(e,t){var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){t&&t(null,o)},o.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}}},t={};(function o(n){var r=t[n];if(void 0!==r)return r.exports;var d=t[n]={exports:{}};return e[n](d,d.exports,o),d.exports})(836)("https://crowdin.com/js/crowdjet/crowdjet.js",(function(){var e=document.getElementsByTagName("body")[0],t=document.createElement("div");t.id="crowdjet-container",t.dataset.projectId="606145",t.style.bottom="90px",t.style.left="5px",e.appendChild(t);var o=document.createElement("div");o.id="crowdjet-expand-container",o.style.bottom="0px",o.style.left="120px",e.appendChild(o)}))})();
1
+ (()=>{var e={836:e=>{function t(e,t){var o=document.createElement("script");o.src=e,o.async=!0,o.onload=function(){t&&t(null,o)},o.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(o)}"undefined"!=typeof window&&(window.loadScript=t),e.exports=t}},t={};(function o(n){var r=t[n];if(void 0!==r)return r.exports;var d=t[n]={exports:{}};return e[n](d,d.exports,o),d.exports})(836)("https://crowdin.com/js/crowdjet/crowdjet.js",(function(){var e=document.getElementsByTagName("body")[0],t=document.createElement("div");t.id="crowdjet-container",t.dataset.projectId="606145",t.style.bottom="90px",t.style.left="5px",e.appendChild(t);var o=document.createElement("div");o.id="crowdjet-expand-container",o.style.bottom="0px",o.style.left="120px",e.appendChild(o)}))})();
2
2
  //# sourceMappingURL=crowdin-web-widget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin-web-widget.js","mappings":"qBAqBAA,EAAOC,QAhBP,SAAoBC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,C,GClBIW,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAajB,QAGrB,IAAID,EAASe,EAAyBE,GAAY,CAGjDhB,QAAS,CAAC,GAOX,OAHAmB,EAAoBH,GAAUjB,EAAQA,EAAOC,QAASe,GAG/ChB,EAAOC,OACf,ECtBmBoB,CAAQ,IAE3BC,CAAW,+CAA+C,WAGtD,IAAIC,EAAOlB,SAASmB,qBAAqB,QAAQ,GAG7CC,EAAYpB,SAASC,cAAc,OACvCmB,EAAUC,GAAK,qBACfD,EAAUE,QAAQC,UAAY,SAC9BH,EAAUI,MAAMC,OAAS,OACzBL,EAAUI,MAAME,KAAO,MACvBR,EAAKT,YAAYW,GAGjB,IAAIO,EAAkB3B,SAASC,cAAc,OAC7C0B,EAAgBN,GAAK,4BACrBM,EAAgBH,MAAMC,OAAS,MAC/BE,EAAgBH,MAAME,KAAO,QAC7BR,EAAKT,YAAYkB,EACrB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/./src/js/crowdin-web-widget.js"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\nmodule.exports = loadScript;\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","const loadScript = require('./load-script');\n\nloadScript('https://crowdin.com/js/crowdjet/crowdjet.js', function() {\n // crowdin web widget: https://crowdin.com/project/lizardbyte/tools/web-widget\n // get body\n let body = document.getElementsByTagName('body')[0]\n\n // create container (popup)\n let container = document.createElement('div')\n container.id = 'crowdjet-container'\n container.dataset.projectId = '606145'\n container.style.bottom = '90px'\n container.style.left = '5px'\n body.appendChild(container)\n\n // create expand container (button)\n let expandContainer = document.createElement('div')\n expandContainer.id = 'crowdjet-expand-container'\n expandContainer.style.bottom = '0px'\n expandContainer.style.left = '120px'\n body.appendChild(expandContainer)\n});\n"],"names":["module","exports","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","require","loadScript","body","getElementsByTagName","container","id","dataset","projectId","style","bottom","left","expandContainer"],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin-web-widget.js","mappings":"qBAKA,SAASA,EAAWC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,CAGsB,oBAAXW,SACPA,OAAOd,WAAaA,GAGxBe,EAAOC,QAAUhB,C,GCzBbiB,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,ECtBmBO,CAAQ,IAE3BvB,CAAW,+CAA+C,WAGtD,IAAIwB,EAAOpB,SAASqB,qBAAqB,QAAQ,GAG7CC,EAAYtB,SAASC,cAAc,OACvCqB,EAAUC,GAAK,qBACfD,EAAUE,QAAQC,UAAY,SAC9BH,EAAUI,MAAMC,OAAS,OACzBL,EAAUI,MAAME,KAAO,MACvBR,EAAKX,YAAYa,GAGjB,IAAIO,EAAkB7B,SAASC,cAAc,OAC7C4B,EAAgBN,GAAK,4BACrBM,EAAgBH,MAAMC,OAAS,MAC/BE,EAAgBH,MAAME,KAAO,QAC7BR,EAAKX,YAAYoB,EACrB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/./src/js/crowdin-web-widget.js"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\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","const loadScript = require('./load-script');\n\nloadScript('https://crowdin.com/js/crowdjet/crowdjet.js', function() {\n // crowdin web widget: https://crowdin.com/project/lizardbyte/tools/web-widget\n // get body\n let body = document.getElementsByTagName('body')[0]\n\n // create container (popup)\n let container = document.createElement('div')\n container.id = 'crowdjet-container'\n container.dataset.projectId = '606145'\n container.style.bottom = '90px'\n container.style.left = '5px'\n body.appendChild(container)\n\n // create expand container (button)\n let expandContainer = document.createElement('div')\n expandContainer.id = 'crowdjet-expand-container'\n expandContainer.style.bottom = '0px'\n expandContainer.style.left = '120px'\n body.appendChild(expandContainer)\n});\n"],"names":["loadScript","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","require","body","getElementsByTagName","container","id","dataset","projectId","style","bottom","left","expandContainer"],"sourceRoot":""}
package/dist/crowdin.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={836:e=>{e.exports=function(e,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){t&&t(null,s)},s.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(s)}}},t={};(function s(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,s),o.exports})(836)("https://proxy-translator.app.crowdin.net/assets/proxy-translator.js",(function(){window.proxyTranslator.init({baseUrl:"https://app.lizardbyte.dev",appUrl:"https://proxy-translator.app.crowdin.net",valuesParams:"U2FsdGVkX19ClOT7gAzJBnfQPMcvqkPxFWxyPrnN7UEMztYDAOA+/W4kvMqRz2gDLv2/K3hTEtwbcq5imv5k5MUAykz0uklBcdH49kqeo1AhYpNKXdwXZNYBPXmNUm5F",distributionBaseUrl:"https://distributions.crowdin.net",filePath:"/app.lizardbyte.dev.json",distribution:"0913bb75b61f0b26247ffa91bw4",languagesData:{fr:{code:"fr",name:"French",twoLettersCode:"fr"},"es-ES":{code:"es-ES",name:"Spanish",twoLettersCode:"es"},de:{code:"de",name:"German",twoLettersCode:"de"},it:{code:"it",name:"Italian",twoLettersCode:"it"},ja:{code:"ja",name:"Japanese",twoLettersCode:"ja"},"pt-PT":{code:"pt-PT",name:"Portuguese",twoLettersCode:"pt"},ru:{code:"ru",name:"Russian",twoLettersCode:"ru"},"sv-SE":{code:"sv-SE",name:"Swedish",twoLettersCode:"sv"},tr:{code:"tr",name:"Turkish",twoLettersCode:"tr"},"zh-CN":{code:"zh-CN",name:"Chinese Simplified",twoLettersCode:"zh"},en:{code:"en",name:"English",twoLettersCode:"en"},"en-US":{code:"en-US",name:"English, United States",twoLettersCode:"en"},"en-GB":{code:"en-GB",name:"English, United Kingdom",twoLettersCode:"en"}},defaultLanguage:"en",defaultLanguageTitle:"English",languageDetectType:"default",poweredBy:!1,position:"bottom-left",submenuPosition:"top-left"});var e=document.getElementsByClassName("cr-picker-button")[0];e.classList.add("border-white"),e.classList.add("btn"),e.classList.add("btn-outline-light"),e.classList.add("bg-dark"),e.classList.add("text-white"),e.classList.add("rounded-0");var t=document.getElementsByClassName("cr-picker-submenu")[0];t.classList.add("border-white"),t.classList.add("bg-dark"),t.classList.add("text-white"),t.classList.add("rounded-0"),document.getElementsByClassName("cr-selected")[0].classList.add("text-white")}))})();
1
+ (()=>{var e={836:e=>{function t(e,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){t&&t(null,s)},s.onerror=function(){t&&t(new Error("Failed to load script: ".concat(e)))},document.head.appendChild(s)}"undefined"!=typeof window&&(window.loadScript=t),e.exports=t}},t={};(function s(a){var n=t[a];if(void 0!==n)return n.exports;var d=t[a]={exports:{}};return e[a](d,d.exports,s),d.exports})(836)("https://proxy-translator.app.crowdin.net/assets/proxy-translator.js",(function(){window.proxyTranslator.init({baseUrl:"https://app.lizardbyte.dev",appUrl:"https://proxy-translator.app.crowdin.net",valuesParams:"U2FsdGVkX19ClOT7gAzJBnfQPMcvqkPxFWxyPrnN7UEMztYDAOA+/W4kvMqRz2gDLv2/K3hTEtwbcq5imv5k5MUAykz0uklBcdH49kqeo1AhYpNKXdwXZNYBPXmNUm5F",distributionBaseUrl:"https://distributions.crowdin.net",filePath:"/app.lizardbyte.dev.json",distribution:"0913bb75b61f0b26247ffa91bw4",languagesData:{fr:{code:"fr",name:"French",twoLettersCode:"fr"},"es-ES":{code:"es-ES",name:"Spanish",twoLettersCode:"es"},de:{code:"de",name:"German",twoLettersCode:"de"},it:{code:"it",name:"Italian",twoLettersCode:"it"},ja:{code:"ja",name:"Japanese",twoLettersCode:"ja"},"pt-PT":{code:"pt-PT",name:"Portuguese",twoLettersCode:"pt"},ru:{code:"ru",name:"Russian",twoLettersCode:"ru"},"sv-SE":{code:"sv-SE",name:"Swedish",twoLettersCode:"sv"},tr:{code:"tr",name:"Turkish",twoLettersCode:"tr"},"zh-CN":{code:"zh-CN",name:"Chinese Simplified",twoLettersCode:"zh"},en:{code:"en",name:"English",twoLettersCode:"en"},"en-US":{code:"en-US",name:"English, United States",twoLettersCode:"en"},"en-GB":{code:"en-GB",name:"English, United Kingdom",twoLettersCode:"en"}},defaultLanguage:"en",defaultLanguageTitle:"English",languageDetectType:"default",poweredBy:!1,position:"bottom-left",submenuPosition:"top-left"});var e=document.getElementsByClassName("cr-picker-button")[0];e.classList.add("border-white"),e.classList.add("btn"),e.classList.add("btn-outline-light"),e.classList.add("bg-dark"),e.classList.add("text-white"),e.classList.add("rounded-0");var t=document.getElementsByClassName("cr-picker-submenu")[0];t.classList.add("border-white"),t.classList.add("bg-dark"),t.classList.add("text-white"),t.classList.add("rounded-0"),document.getElementsByClassName("cr-selected")[0].classList.add("text-white")}))})();
2
2
  //# sourceMappingURL=crowdin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"crowdin.js","mappings":"qBAqBAA,EAAOC,QAhBP,SAAoBC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,C,GClBIW,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAajB,QAGrB,IAAID,EAASe,EAAyBE,GAAY,CAGjDhB,QAAS,CAAC,GAOX,OAHAmB,EAAoBH,GAAUjB,EAAQA,EAAOC,QAASe,GAG/ChB,EAAOC,OACf,ECtBmBoB,CAAQ,IAE3BC,CAAW,uEAAuE,WAC9EC,OAAOC,gBAAgBC,KAAK,CACxBC,QAAS,6BACTC,OAAQ,2CACRC,aAAc,mIACdC,oBAAqB,oCACrBC,SAAU,2BACVC,aAAc,8BACdC,cAAe,CACX,GAAM,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACpD,QAAS,CAAC,KAAO,QAAQ,KAAO,UAAU,eAAiB,MAC3D,GAAM,CAAC,KAAO,KAAK,KAAO,SAAS,eAAiB,MACpD,GAAM,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACrD,GAAK,CAAC,KAAO,KAAK,KAAO,WAAW,eAAiB,MACrD,QAAQ,CAAC,KAAO,QAAQ,KAAO,aAAa,eAAiB,MAC7D,GAAM,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACrD,QAAQ,CAAC,KAAO,QAAQ,KAAO,UAAU,eAAiB,MAC1D,GAAK,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACpD,QAAQ,CAAC,KAAO,QAAQ,KAAO,qBAAqB,eAAiB,MACrE,GAAM,CAAC,KAAO,KAAK,KAAO,UAAU,eAAiB,MACrD,QAAS,CAAC,KAAO,QAAQ,KAAO,yBAAyB,eAAiB,MAC1E,QAAS,CAAC,KAAO,QAAQ,KAAO,0BAA0B,eAAiB,OAE/EC,gBAAiB,KACjBC,qBAAsB,UACtBC,mBAAoB,UACpBC,WAAW,EACXC,SAAU,cACVC,gBAAiB,aAIrB,IAAIC,EAASlC,SAASmC,uBAAuB,oBAAoB,GACjED,EAAOE,UAAUC,IAAI,gBACrBH,EAAOE,UAAUC,IAAI,OACrBH,EAAOE,UAAUC,IAAI,qBACrBH,EAAOE,UAAUC,IAAI,WACrBH,EAAOE,UAAUC,IAAI,cACrBH,EAAOE,UAAUC,IAAI,aAGrB,IAAIC,EAAOtC,SAASmC,uBAAuB,qBAAqB,GAChEG,EAAKF,UAAUC,IAAI,gBACnBC,EAAKF,UAAUC,IAAI,WACnBC,EAAKF,UAAUC,IAAI,cACnBC,EAAKF,UAAUC,IAAI,aAGJrC,SAASmC,uBAAuB,eAAe,GACrDC,UAAUC,IAAI,aAC3B,G","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/./src/js/crowdin.js"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\nmodule.exports = loadScript;\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","const loadScript = require('./load-script');\n\nloadScript('https://proxy-translator.app.crowdin.net/assets/proxy-translator.js', function() {\n window.proxyTranslator.init({\n baseUrl: \"https://app.lizardbyte.dev\",\n appUrl: \"https://proxy-translator.app.crowdin.net\",\n valuesParams: \"U2FsdGVkX19ClOT7gAzJBnfQPMcvqkPxFWxyPrnN7UEMztYDAOA+/W4kvMqRz2gDLv2/K3hTEtwbcq5imv5k5MUAykz0uklBcdH49kqeo1AhYpNKXdwXZNYBPXmNUm5F\",\n distributionBaseUrl: \"https://distributions.crowdin.net\",\n filePath: \"/app.lizardbyte.dev.json\",\n distribution: \"0913bb75b61f0b26247ffa91bw4\",\n languagesData: {\n \"fr\": {\"code\":\"fr\",\"name\":\"French\",\"twoLettersCode\":\"fr\"},\n \"es-ES\": {\"code\":\"es-ES\",\"name\":\"Spanish\",\"twoLettersCode\":\"es\"},\n \"de\": {\"code\":\"de\",\"name\":\"German\",\"twoLettersCode\":\"de\"},\n \"it\": {\"code\":\"it\",\"name\":\"Italian\",\"twoLettersCode\":\"it\"},\n \"ja\":{\"code\":\"ja\",\"name\":\"Japanese\",\"twoLettersCode\":\"ja\"},\n \"pt-PT\":{\"code\":\"pt-PT\",\"name\":\"Portuguese\",\"twoLettersCode\":\"pt\"},\n \"ru\": {\"code\":\"ru\",\"name\":\"Russian\",\"twoLettersCode\":\"ru\"},\n \"sv-SE\":{\"code\":\"sv-SE\",\"name\":\"Swedish\",\"twoLettersCode\":\"sv\"},\n \"tr\":{\"code\":\"tr\",\"name\":\"Turkish\",\"twoLettersCode\":\"tr\"},\n \"zh-CN\":{\"code\":\"zh-CN\",\"name\":\"Chinese Simplified\",\"twoLettersCode\":\"zh\"},\n \"en\": {\"code\":\"en\",\"name\":\"English\",\"twoLettersCode\":\"en\"},\n \"en-US\": {\"code\":\"en-US\",\"name\":\"English, United States\",\"twoLettersCode\":\"en\"},\n \"en-GB\": {\"code\":\"en-GB\",\"name\":\"English, United Kingdom\",\"twoLettersCode\":\"en\"}\n },\n defaultLanguage: \"en\",\n defaultLanguageTitle: \"English\",\n languageDetectType: \"default\",\n poweredBy: false,\n position: \"bottom-left\",\n submenuPosition: \"top-left\",\n });\n\n // change styling of language selector button\n let button = document.getElementsByClassName('cr-picker-button')[0]\n button.classList.add('border-white')\n button.classList.add('btn')\n button.classList.add('btn-outline-light')\n button.classList.add('bg-dark')\n button.classList.add('text-white')\n button.classList.add('rounded-0')\n\n // change styling of language selector menu\n let menu = document.getElementsByClassName('cr-picker-submenu')[0]\n menu.classList.add('border-white')\n menu.classList.add('bg-dark')\n menu.classList.add('text-white')\n menu.classList.add('rounded-0')\n\n // change styling of selected language in menu\n let selected = document.getElementsByClassName('cr-selected')[0]\n selected.classList.add('text-white')\n});\n"],"names":["module","exports","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","require","loadScript","window","proxyTranslator","init","baseUrl","appUrl","valuesParams","distributionBaseUrl","filePath","distribution","languagesData","defaultLanguage","defaultLanguageTitle","languageDetectType","poweredBy","position","submenuPosition","button","getElementsByClassName","classList","add","menu"],"sourceRoot":""}
1
+ {"version":3,"file":"crowdin.js","mappings":"qBAKA,SAASA,EAAWC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,G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C,gBAAiB,KACjBC,qBAAsB,UACtBC,mBAAoB,UACpBC,WAAW,EACXC,SAAU,cACVC,gBAAiB,aAIrB,IAAIC,EAASnC,SAASoC,uBAAuB,oBAAoB,GACjED,EAAOE,UAAUC,IAAI,gBACrBH,EAAOE,UAAUC,IAAI,OACrBH,EAAOE,UAAUC,IAAI,qBACrBH,EAAOE,UAAUC,IAAI,WACrBH,EAAOE,UAAUC,IAAI,cACrBH,EAAOE,UAAUC,IAAI,aAGrB,IAAIC,EAAOvC,SAASoC,uBAAuB,qBAAqB,GAChEG,EAAKF,UAAUC,IAAI,gBACnBC,EAAKF,UAAUC,IAAI,WACnBC,EAAKF,UAAUC,IAAI,cACnBC,EAAKF,UAAUC,IAAI,aAGJtC,SAASoC,uBAAuB,eAAe,GACrDC,UAAUC,IAAI,aAC3B,G","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/./src/js/crowdin.js"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\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","const loadScript = require('./load-script');\n\nloadScript('https://proxy-translator.app.crowdin.net/assets/proxy-translator.js', function() {\n window.proxyTranslator.init({\n baseUrl: \"https://app.lizardbyte.dev\",\n appUrl: \"https://proxy-translator.app.crowdin.net\",\n valuesParams: \"U2FsdGVkX19ClOT7gAzJBnfQPMcvqkPxFWxyPrnN7UEMztYDAOA+/W4kvMqRz2gDLv2/K3hTEtwbcq5imv5k5MUAykz0uklBcdH49kqeo1AhYpNKXdwXZNYBPXmNUm5F\",\n distributionBaseUrl: \"https://distributions.crowdin.net\",\n filePath: \"/app.lizardbyte.dev.json\",\n distribution: \"0913bb75b61f0b26247ffa91bw4\",\n languagesData: {\n \"fr\": {\"code\":\"fr\",\"name\":\"French\",\"twoLettersCode\":\"fr\"},\n \"es-ES\": {\"code\":\"es-ES\",\"name\":\"Spanish\",\"twoLettersCode\":\"es\"},\n \"de\": {\"code\":\"de\",\"name\":\"German\",\"twoLettersCode\":\"de\"},\n \"it\": {\"code\":\"it\",\"name\":\"Italian\",\"twoLettersCode\":\"it\"},\n \"ja\":{\"code\":\"ja\",\"name\":\"Japanese\",\"twoLettersCode\":\"ja\"},\n \"pt-PT\":{\"code\":\"pt-PT\",\"name\":\"Portuguese\",\"twoLettersCode\":\"pt\"},\n \"ru\": {\"code\":\"ru\",\"name\":\"Russian\",\"twoLettersCode\":\"ru\"},\n \"sv-SE\":{\"code\":\"sv-SE\",\"name\":\"Swedish\",\"twoLettersCode\":\"sv\"},\n \"tr\":{\"code\":\"tr\",\"name\":\"Turkish\",\"twoLettersCode\":\"tr\"},\n \"zh-CN\":{\"code\":\"zh-CN\",\"name\":\"Chinese Simplified\",\"twoLettersCode\":\"zh\"},\n \"en\": {\"code\":\"en\",\"name\":\"English\",\"twoLettersCode\":\"en\"},\n \"en-US\": {\"code\":\"en-US\",\"name\":\"English, United States\",\"twoLettersCode\":\"en\"},\n \"en-GB\": {\"code\":\"en-GB\",\"name\":\"English, United Kingdom\",\"twoLettersCode\":\"en\"}\n },\n defaultLanguage: \"en\",\n defaultLanguageTitle: \"English\",\n languageDetectType: \"default\",\n poweredBy: false,\n position: \"bottom-left\",\n submenuPosition: \"top-left\",\n });\n\n // change styling of language selector button\n let button = document.getElementsByClassName('cr-picker-button')[0]\n button.classList.add('border-white')\n button.classList.add('btn')\n button.classList.add('btn-outline-light')\n button.classList.add('bg-dark')\n button.classList.add('text-white')\n button.classList.add('rounded-0')\n\n // change styling of language selector menu\n let menu = document.getElementsByClassName('cr-picker-submenu')[0]\n menu.classList.add('border-white')\n menu.classList.add('bg-dark')\n menu.classList.add('text-white')\n menu.classList.add('rounded-0')\n\n // change styling of selected language in menu\n let selected = document.getElementsByClassName('cr-selected')[0]\n selected.classList.add('text-white')\n});\n"],"names":["loadScript","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","require","proxyTranslator","init","baseUrl","appUrl","valuesParams","distributionBaseUrl","filePath","distribution","languagesData","defaultLanguage","defaultLanguageTitle","languageDetectType","poweredBy","position","submenuPosition","button","getElementsByClassName","classList","add","menu"],"sourceRoot":""}
package/dist/discord.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see discord.js.LICENSE.txt */
2
- (()=>{var t={300:(t,r,e)=>{var n=e(836),o=e(748).fetchRandomQuote;function i(t,r){var e=t.quote_safe||t.quote;r.notify(e)}t.exports={initDiscord:function(){n("https://cdn.jsdelivr.net/npm/@widgetbot/crate@3",(function(){var t=new Crate({server:"804382334370578482",channel:"804383092822900797",defer:!1});o().then((function(r){setTimeout((function(){t&&i(r,t)}),42e4)}))}))},randomQuote:i}},836:t=>{t.exports=function(t,r){var e=document.createElement("script");e.src=t,e.async=!0,e.onload=function(){r&&r(null,e)},e.onerror=function(){r&&r(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(e)}},748:t=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function e(){"use strict";e=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),c=new T(n||[]);return a(i,"_invoke",{value:k(t,e,c)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};l(L,u,(function(){return this}));var E=Object.getPrototypeOf,j=E&&E(E(F([])));j&&j!==o&&i.call(j,u)&&(L=j);var _=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function S(t,e){function n(o,a,c,u){var f=p(t[o],t,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==r(l)&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function k(r,e,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,P(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function F(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,f,(function(){return this})),n.AsyncIterator=S,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,s,"Generator"),l(_,u,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=F,T.prototype={constructor:T,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:F(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),g}},n}function n(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}var o=null;function i(){var t;return t=e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o){t.next=7;break}return t.next=3,fetch("https://app.lizardbyte.dev/uno/random-quotes/games.json");case 3:return r=t.sent,t.next=6,r.json();case 6:o=t.sent;case 7:return t.abrupt("return",o[Math.floor(Math.random()*o.length)]);case 8:case"end":return t.stop()}}),t)})),i=function(){var r=this,e=arguments;return new Promise((function(o,i){var a=t.apply(r,e);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))},i.apply(this,arguments)}t.exports={fetchRandomQuote:function(){return i.apply(this,arguments)},resetQuoteCache:function(){o=null}}}},r={};!function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n](i,i.exports,e),i.exports}(300)})();
2
+ (()=>{var t={300:(t,r,e)=>{var n=e(836),o=e(748).fetchRandomQuote;function i(t,r){var e=t.quote_safe||t.quote;r.notify(e)}function a(){n("https://cdn.jsdelivr.net/npm/@widgetbot/crate@3",(function(){var t=new Crate({server:"804382334370578482",channel:"804383092822900797",defer:!1});o().then((function(r){setTimeout((function(){t&&i(r,t)}),42e4)}))}))}"undefined"!=typeof window&&(window.initDiscord=a),t.exports={initDiscord:a,randomQuote:i}},836:t=>{function r(t,r){var e=document.createElement("script");e.src=t,e.async=!0,e.onload=function(){r&&r(null,e)},e.onerror=function(){r&&r(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(e)}"undefined"!=typeof window&&(window.loadScript=r),t.exports=r},748:t=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function e(){"use strict";e=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),c=new T(n||[]);return a(i,"_invoke",{value:k(t,e,c)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};l(L,u,(function(){return this}));var E=Object.getPrototypeOf,j=E&&E(E(F([])));j&&j!==o&&i.call(j,u)&&(L=j);var _=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function S(t,e){function n(o,a,c,u){var f=p(t[o],t,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==r(l)&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function k(r,e,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,P(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function F(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,f,(function(){return this})),n.AsyncIterator=S,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,s,"Generator"),l(_,u,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=F,T.prototype={constructor:T,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:F(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),g}},n}function n(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}var o=null;function i(){var t;return t=e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o){t.next=7;break}return t.next=3,fetch("https://app.lizardbyte.dev/uno/random-quotes/games.json");case 3:return r=t.sent,t.next=6,r.json();case 6:o=t.sent;case 7:return t.abrupt("return",o[Math.floor(Math.random()*o.length)]);case 8:case"end":return t.stop()}}),t)})),i=function(){var r=this,e=arguments;return new Promise((function(o,i){var a=t.apply(r,e);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))},i.apply(this,arguments)}t.exports={fetchRandomQuote:function(){return i.apply(this,arguments)},resetQuoteCache:function(){o=null}}}},r={};!function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n](i,i.exports,e),i.exports}(300)})();
3
3
  //# sourceMappingURL=discord.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discord.js","mappings":";2BAIA,IAAMA,EAAaC,EAAQ,KACnBC,EAAqBD,EAAQ,KAA7BC,iBAER,SAASC,EAAYC,EAAOC,GACxB,IAAIC,EAAYF,EAAkB,YAAKA,EAAa,MACpDC,EAAME,OAAOD,EACjB,CAqBAE,EAAOC,QAAU,CACbC,YApBJ,WACIV,EAAW,mDAAmD,WAC1D,IAAIW,EAAY,IAAIC,MAAM,CACtBC,OAAQ,qBACRC,QAAS,qBACTC,OAAO,IAIXb,IAAmBc,MAAK,SAAAZ,GACpBa,YAAW,WACHN,GACAR,EAAYC,EAAOO,EAE3B,GAAG,KACP,GACJ,GACJ,EAIIR,YAAAA,YCZJK,EAAOC,QAhBP,SAAoBS,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,2QClBAW,EAAA,kBAAAC,CAAA,MAAAC,EAAAD,EAAA,GAAAE,EAAAC,OAAAC,UAAAC,EAAAH,EAAAI,eAAAC,EAAAJ,OAAAK,gBAAA,SAAAP,EAAAD,EAAAE,GAAAD,EAAAD,GAAAE,EAAAO,KAAA,EAAAC,EAAA,mBAAAC,OAAAA,OAAA,GAA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AAA,UAAA2G,EAAA3G,GAAA6F,EAAAtF,EAAAV,EAAAK,EAAAwG,EAAAC,EAAA,QAAA3G,EAAA,CAAA0G,OAAA,OAWCX,EAAAU,MAAA,KAAAD,UAAA,CASDrI,EAAOC,QAAU,CACbP,iBApBJ,WAI+B,OAAAkI,EAAAU,MAAC,KAADD,UAAA,EAiB3BI,gBANJ,WACId,EAAa,IACjB,KClBIe,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa5I,QAGrB,IAAID,EAAS0I,EAAyBE,GAAY,CAGjD3I,QAAS,CAAC,GAOX,OAHA8I,EAAoBH,GAAU5I,EAAQA,EAAOC,QAAS0I,GAG/C3I,EAAOC,OACf,CCnB0B0I,CAAoB","sources":["webpack://@lizardbyte/shared-web/./src/js/discord.js","webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/./src/js/random-quote.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/* global Crate */\n// Crate is not defined... can we use npm version?\n// https://github.com/widgetbot-io/crate/issues/26\n\nconst loadScript = require('./load-script');\nconst { fetchRandomQuote } = require('./random-quote');\n\nfunction randomQuote(quote, crate) {\n let the_quote = quote['quote_safe'] || quote['quote'];\n crate.notify(the_quote);\n}\n\nfunction initDiscord() {\n loadScript('https://cdn.jsdelivr.net/npm/@widgetbot/crate@3', function() {\n let widgetbot = new Crate({\n server: '804382334370578482',\n channel: '804383092822900797',\n defer: false,\n });\n\n // get random video game quotes and notify the user on Widgetbot after 7 minutes\n fetchRandomQuote().then(quote => {\n setTimeout(() => {\n if (widgetbot) {\n randomQuote(quote, widgetbot);\n }\n }, 7 * 60 * 1000);\n });\n });\n}\n\nmodule.exports = {\n initDiscord,\n randomQuote,\n};\n","/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\nmodule.exports = loadScript;\n","let quoteCache = null;\n\n/**\n * Fetch a random quote from our API.\n * @returns {Promise<*>} A promise that resolves with a random quote\n */\nasync function fetchRandomQuote() {\n if (!quoteCache) {\n const response = await fetch('https://app.lizardbyte.dev/uno/random-quotes/games.json');\n quoteCache = await response.json();\n }\n return quoteCache[Math.floor(Math.random() * quoteCache.length)];\n}\n\n/**\n * Reset the quote cache.\n */\nfunction resetQuoteCache() {\n quoteCache = null;\n}\n\nmodule.exports = {\n fetchRandomQuote,\n resetQuoteCache,\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(300);\n"],"names":["loadScript","require","fetchRandomQuote","randomQuote","quote","crate","the_quote","notify","module","exports","initDiscord","widgetbot","Crate","server","channel","defer","then","setTimeout","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","callInvokeWithMethodAndArg","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","quoteCache","_fetchRandomQuote","_callee","response","_context","fetch","json","Math","floor","random","arguments","apply","_next","_throw","resetQuoteCache","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"discord.js","mappings":";2BAIA,IAAMA,EAAaC,EAAQ,KACnBC,EAAqBD,EAAQ,KAA7BC,iBAER,SAASC,EAAYC,EAAOC,GACxB,IAAIC,EAAYF,EAAkB,YAAKA,EAAa,MACpDC,EAAME,OAAOD,EACjB,CAEA,SAASE,IACLR,EAAW,mDAAmD,WAC1D,IAAIS,EAAY,IAAIC,MAAM,CACtBC,OAAQ,qBACRC,QAAS,qBACTC,OAAO,IAIXX,IAAmBY,MAAK,SAAAV,GACpBW,YAAW,WACHN,GACAN,EAAYC,EAAOK,EAE3B,GAAG,KACP,GACJ,GACJ,CAGsB,oBAAXO,SACPA,OAAOR,YAAcA,GAGzBS,EAAOC,QAAU,CACbV,YAAAA,EACAL,YAAAA,YCjCJ,SAASH,EAAWmB,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACT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,EAASG,OAAM,OAAlCN,EAAUI,EAAA9C,KAAA,cAAA8C,EAAA3C,OAAA,SAEPuC,EAAWO,KAAKC,MAAMD,KAAKE,SAAWT,EAAWvB,UAAQ,wBAAA2B,EAAAX,OAAA,GAAAS,EAAA,IAGpED,EAbA,eAAAnG,EAAA,KAAAD,EAAA6G,UAAA,WAAAxB,SAAA,SAAAnF,EAAAK,GAAA,IAAAK,EAAAP,EAAAyG,MAAA7G,EAAAD,GAAA,SAAA+G,EAAA1G,GAAA6F,EAAAtF,EAAAV,EAAAK,EAAAwG,EAAAC,EAAA,OAAA3G,EAAA,UAAA2G,EAAA3G,GAAA6F,EAAAtF,EAAAV,EAAAK,EAAAwG,EAAAC,EAAA,QAAA3G,EAAA,CAAA0G,OAAA,OAWCX,EAAAU,MAAA,KAAAD,UAAA,CASD7H,EAAOC,QAAU,CACbhB,iBApBJ,WAI+B,OAAAmI,EAAAU,MAAC,KAADD,UAAA,EAiB3BI,gBANJ,WACId,EAAa,IACjB,KClBIe,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAapI,QAGrB,IAAID,EAASkI,EAAyBE,GAAY,CAGjDnI,QAAS,CAAC,GAOX,OAHAsI,EAAoBH,GAAUpI,EAAQA,EAAOC,QAASkI,GAG/CnI,EAAOC,OACf,CCnB0BkI,CAAoB","sources":["webpack://@lizardbyte/shared-web/./src/js/discord.js","webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/./src/js/random-quote.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/* global Crate */\n// Crate is not defined... can we use npm version?\n// https://github.com/widgetbot-io/crate/issues/26\n\nconst loadScript = require('./load-script');\nconst { fetchRandomQuote } = require('./random-quote');\n\nfunction randomQuote(quote, crate) {\n let the_quote = quote['quote_safe'] || quote['quote'];\n crate.notify(the_quote);\n}\n\nfunction initDiscord() {\n loadScript('https://cdn.jsdelivr.net/npm/@widgetbot/crate@3', function() {\n let widgetbot = new Crate({\n server: '804382334370578482',\n channel: '804383092822900797',\n defer: false,\n });\n\n // get random video game quotes and notify the user on Widgetbot after 7 minutes\n fetchRandomQuote().then(quote => {\n setTimeout(() => {\n if (widgetbot) {\n randomQuote(quote, widgetbot);\n }\n }, 7 * 60 * 1000);\n });\n });\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.initDiscord = initDiscord;\n}\n\nmodule.exports = {\n initDiscord,\n randomQuote,\n};\n","/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\n","let quoteCache = null;\n\n/**\n * Fetch a random quote from our API.\n * @returns {Promise<*>} A promise that resolves with a random quote\n */\nasync function fetchRandomQuote() {\n if (!quoteCache) {\n const response = await fetch('https://app.lizardbyte.dev/uno/random-quotes/games.json');\n quoteCache = await response.json();\n }\n return quoteCache[Math.floor(Math.random() * quoteCache.length)];\n}\n\n/**\n * Reset the quote cache.\n */\nfunction resetQuoteCache() {\n quoteCache = null;\n}\n\nmodule.exports = {\n fetchRandomQuote,\n resetQuoteCache,\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(300);\n"],"names":["loadScript","require","fetchRandomQuote","randomQuote","quote","crate","the_quote","notify","initDiscord","widgetbot","Crate","server","channel","defer","then","setTimeout","window","module","exports","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","callInvokeWithMethodAndArg","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","quoteCache","_fetchRandomQuote","_callee","response","_context","fetch","json","Math","floor","random","arguments","apply","_next","_throw","resetQuoteCache","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var t={83:t=>{t.exports=function(t,r){if(0===t.length)return r.length;if(0===r.length)return t.length;var n,e,h=[];for(n=0;n<=r.length;n++)h[n]=[n];for(e=0;e<=t.length;e++)h[0][e]=e;for(n=1;n<=r.length;n++)for(e=1;e<=t.length;e++)r.charAt(n-1)===t.charAt(e-1)?h[n][e]=h[n-1][e-1]:h[n][e]=Math.min(h[n-1][e-1]+1,Math.min(h[n][e-1]+1,h[n-1][e]+1));return 100*(1-h[r.length][t.length]/Math.max(t.length,r.length))}}},r={};!function n(e){var h=r[e];if(void 0!==h)return h.exports;var g=r[e]={exports:{}};return t[e](g,g.exports,n),g.exports}(83)})();
1
+ (()=>{var t={83:t=>{function n(t,n){if(0===t.length)return n.length;if(0===n.length)return t.length;var e,r,h=[];for(e=0;e<=n.length;e++)h[e]=[e];for(r=0;r<=t.length;r++)h[0][r]=r;for(e=1;e<=n.length;e++)for(r=1;r<=t.length;r++)n.charAt(e-1)===t.charAt(r-1)?h[e][r]=h[e-1][r-1]:h[e][r]=Math.min(h[e-1][r-1]+1,Math.min(h[e][r-1]+1,h[e-1][r]+1));return 100*(1-h[n.length][t.length]/Math.max(t.length,n.length))}"undefined"!=typeof window&&(window.levenshteinDistance=n),t.exports=n}},n={};!function e(r){var h=n[r];if(void 0!==h)return h.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}(83)})();
2
2
  //# sourceMappingURL=levenshtein-distance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"levenshtein-distance.js","mappings":"oBAmCAA,EAAOC,QAnCP,SAA6BC,EAAGC,GAC5B,GAAiB,IAAbD,EAAEE,OAAc,OAAOD,EAAEC,OAC7B,GAAiB,IAAbD,EAAEC,OAAc,OAAOF,EAAEE,OAE7B,IAGIC,EAMAC,EATAC,EAAS,GAIb,IAAKF,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvBE,EAAOF,GAAK,CAACA,GAKjB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACvBC,EAAO,GAAGD,GAAKA,EAInB,IAAKD,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACnBH,EAAEK,OAAOH,EAAI,KAAOH,EAAEM,OAAOF,EAAI,GACjCC,EAAOF,GAAGC,GAAKC,EAAOF,EAAI,GAAGC,EAAI,GAEjCC,EAAOF,GAAGC,GAAKG,KAAKC,IAAIH,EAAOF,EAAI,GAAGC,EAAI,GAAK,EAC3CG,KAAKC,IAAIH,EAAOF,GAAGC,EAAI,GAAK,EACxBC,EAAOF,EAAI,GAAGC,GAAK,IAMvC,OAA2E,KAAnE,EAAKC,EAAOJ,EAAEC,QAAQF,EAAEE,QAAUK,KAAKE,IAAIT,EAAEE,OAAQD,EAAEC,QACnE,C,GChCIQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAID,EAASY,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUd,EAAQA,EAAOC,QAASY,GAG/Cb,EAAOC,OACf,CCnB0BY,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/levenshtein-distance.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["function levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n let matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) === a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n // return the percentage of the levenshtein distance\n return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100\n}\n\nmodule.exports = levenshteinDistance;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(83);\n"],"names":["module","exports","a","b","length","i","j","matrix","charAt","Math","min","max","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"levenshtein-distance.js","mappings":"oBAAA,SAASA,EAAoBC,EAAGC,GAC5B,GAAiB,IAAbD,EAAEE,OAAc,OAAOD,EAAEC,OAC7B,GAAiB,IAAbD,EAAEC,OAAc,OAAOF,EAAEE,OAE7B,IAGIC,EAMAC,EATAC,EAAS,GAIb,IAAKF,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvBE,EAAOF,GAAK,CAACA,GAKjB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACvBC,EAAO,GAAGD,GAAKA,EAInB,IAAKD,EAAI,EAAGA,GAAKF,EAAEC,OAAQC,IACvB,IAAKC,EAAI,EAAGA,GAAKJ,EAAEE,OAAQE,IACnBH,EAAEK,OAAOH,EAAI,KAAOH,EAAEM,OAAOF,EAAI,GACjCC,EAAOF,GAAGC,GAAKC,EAAOF,EAAI,GAAGC,EAAI,GAEjCC,EAAOF,GAAGC,GAAKG,KAAKC,IAAIH,EAAOF,EAAI,GAAGC,EAAI,GAAK,EAC3CG,KAAKC,IAAIH,EAAOF,GAAGC,EAAI,GAAK,EACxBC,EAAOF,EAAI,GAAGC,GAAK,IAMvC,OAA2E,KAAnE,EAAKC,EAAOJ,EAAEC,QAAQF,EAAEE,QAAUK,KAAKE,IAAIT,EAAEE,OAAQD,EAAEC,QACnE,CAGsB,oBAAXQ,SACPA,OAAOX,oBAAsBA,GAGjCY,EAAOC,QAAUb,C,GCvCbc,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/levenshtein-distance.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["function levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n let matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) === a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n // return the percentage of the levenshtein distance\n return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.levenshteinDistance = levenshteinDistance;\n}\n\nmodule.exports = levenshteinDistance;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(83);\n"],"names":["levenshteinDistance","a","b","length","i","j","matrix","charAt","Math","min","max","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var r={836:r=>{r.exports=function(r,n){var o=document.createElement("script");o.src=r,o.async=!0,o.onload=function(){n&&n(null,o)},o.onerror=function(){n&&n(new Error("Failed to load script: ".concat(r)))},document.head.appendChild(o)}}},n={};!function o(t){var e=n[t];if(void 0!==e)return e.exports;var c=n[t]={exports:{}};return r[t](c,c.exports,o),c.exports}(836)})();
1
+ (()=>{var n={836:n=>{function o(n,o){var r=document.createElement("script");r.src=n,r.async=!0,r.onload=function(){o&&o(null,r)},r.onerror=function(){o&&o(new Error("Failed to load script: ".concat(n)))},document.head.appendChild(r)}"undefined"!=typeof window&&(window.loadScript=o),n.exports=o}},o={};!function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}(836)})();
2
2
  //# sourceMappingURL=load-script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-script.js","mappings":"qBAqBAA,EAAOC,QAhBP,SAAoBC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,C,GClBIW,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAajB,QAGrB,IAAID,EAASe,EAAyBE,GAAY,CAGjDhB,QAAS,CAAC,GAOX,OAHAmB,EAAoBH,GAAUjB,EAAQA,EAAOC,QAASe,GAG/ChB,EAAOC,OACf,CCnB0Be,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\nmodule.exports = loadScript;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(836);\n"],"names":["module","exports","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"load-script.js","mappings":"qBAKA,SAASA,EAAWC,EAAKC,GACrB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IAAML,EACbE,EAAOI,OAAQ,EAEfJ,EAAOK,OAAS,WACRN,GAAUA,EAAS,KAAMC,EACjC,EAEAA,EAAOM,QAAU,WACTP,GAAUA,EAAS,IAAIQ,MAAM,0BAADC,OAA2BV,IAC/D,EAEAG,SAASQ,KAAKC,YAAYV,EAC9B,CAGsB,oBAAXW,SACPA,OAAOd,WAAaA,GAGxBe,EAAOC,QAAUhB,C,GCzBbiB,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/load-script.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Load a script asynchronously, and add it to the DOM. Optionally, call a callback when the script has loaded.\n * @param url The URL of the script to load.\n * @param callback An optional callback to call when the script has loaded.\n */\nfunction loadScript(url, callback) {\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n\n script.onload = () => {\n if (callback) callback(null, script);\n };\n\n script.onerror = () => {\n if (callback) callback(new Error(`Failed to load script: ${url}`));\n };\n\n document.head.appendChild(script);\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.loadScript = loadScript;\n}\n\nmodule.exports = loadScript;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(836);\n"],"names":["loadScript","url","callback","script","document","createElement","src","async","onload","onerror","Error","concat","head","appendChild","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var r={76:r=>{r.exports=function(r,t){return function(n,e){return n[r]>e[r]?-1:n[r]<e[r]||n[t]>e[t]?1:n[t]<e[t]?-1:0}}}},t={};!function n(e){var o=t[e];if(void 0!==o)return o.exports;var u=t[e]={exports:{}};return r[e](u,u.exports,n),u.exports}(76)})();
1
+ (()=>{var r={76:r=>{function n(r,n){return function(t,e){return t[r]>e[r]?-1:t[r]<e[r]||t[n]>e[n]?1:t[n]<e[n]?-1:0}}"undefined"!=typeof window&&(window.rankingSorter=n),r.exports=n}},n={};!function t(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,t),i.exports}(76)})();
2
2
  //# sourceMappingURL=ranking-sorter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ranking-sorter.js","mappings":"oBAyBAA,EAAOC,QAnBa,SAAUC,EAAUC,GACpC,OAAO,SAASC,EAAGC,GACf,OAAID,EAAEF,GAAYG,EAAEH,IACR,EACDE,EAAEF,GAAYG,EAAEH,IAInBE,EAAED,GAAaE,EAAEF,GAHd,EAKIC,EAAED,GAAaE,EAAEF,IAChB,EAED,CAGnB,CACJ,C,GCtBIG,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaR,QAGrB,IAAID,EAASM,EAAyBE,GAAY,CAGjDP,QAAS,CAAC,GAOX,OAHAU,EAAoBH,GAAUR,EAAQA,EAAOC,QAASM,GAG/CP,EAAOC,OACf,CCnB0BM,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/ranking-sorter.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sorts an array of objects by two keys in descending order.\n * @param firstKey The primary key to sort by.\n * @param secondKey The secondary key to sort by, in case the first key is equal.\n * @returns {(function(*, *): (number))|*} The sorting function.\n */\nlet rankingSorter = function (firstKey, secondKey) {\n return function(a, b) {\n if (a[firstKey] > b[firstKey]) {\n return -1;\n } else if (a[firstKey] < b[firstKey]) {\n return 1;\n }\n else {\n if (a[secondKey] > b[secondKey]) {\n return 1;\n } else if (a[secondKey] < b[secondKey]) {\n return -1;\n } else {\n return 0;\n }\n }\n }\n}\n\nmodule.exports = rankingSorter;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(76);\n"],"names":["module","exports","firstKey","secondKey","a","b","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"ranking-sorter.js","mappings":"oBAMA,SAASA,EAAcC,EAAUC,GAC7B,OAAO,SAASC,EAAGC,GACf,OAAID,EAAEF,GAAYG,EAAEH,IACR,EACDE,EAAEF,GAAYG,EAAEH,IAInBE,EAAED,GAAaE,EAAEF,GAHd,EAKIC,EAAED,GAAaE,EAAEF,IAChB,EAED,CAGnB,CACJ,CAGsB,oBAAXG,SACPA,OAAOL,cAAgBA,GAG3BM,EAAOC,QAAUP,C,GC7BbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,G","sources":["webpack://@lizardbyte/shared-web/./src/js/ranking-sorter.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sorts an array of objects by two keys in descending order.\n * @param firstKey The primary key to sort by.\n * @param secondKey The secondary key to sort by, in case the first key is equal.\n * @returns {(function(*, *): (number))|*} The sorting function.\n */\nfunction rankingSorter(firstKey, secondKey) {\n return function(a, b) {\n if (a[firstKey] > b[firstKey]) {\n return -1;\n } else if (a[firstKey] < b[firstKey]) {\n return 1;\n }\n else {\n if (a[secondKey] > b[secondKey]) {\n return 1;\n } else if (a[secondKey] < b[secondKey]) {\n return -1;\n } else {\n return 0;\n }\n }\n }\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.rankingSorter = rankingSorter;\n}\n\nmodule.exports = rankingSorter;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(76);\n"],"names":["rankingSorter","firstKey","secondKey","a","b","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
package/dist/sleep.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var r={399:r=>{r.exports=function(r){return new Promise((function(t){return setTimeout(t,r)}))}}},t={};!function e(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return r[n](u,u.exports,e),u.exports}(399)})();
1
+ (()=>{var e={399:e=>{function r(e){return new Promise((function(r){return setTimeout(r,e)}))}"undefined"!=typeof window&&(window.sleep=r),e.exports=r}},r={};!function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}(399)})();
2
2
  //# sourceMappingURL=sleep.js.map
package/dist/sleep.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sleep.js","mappings":"qBASAA,EAAOC,QAJP,SAAeC,GACX,OAAO,IAAIC,SAAQ,SAAAC,GAAO,OAAIC,WAAWD,EAASF,EAAG,GACzD,C,GCNII,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaR,QAGrB,IAAID,EAASM,EAAyBE,GAAY,CAGjDP,QAAS,CAAC,GAOX,OAHAU,EAAoBH,GAAUR,EAAQA,EAAOC,QAASM,GAG/CP,EAAOC,OACf,CCnB0BM,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/sleep.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sleep for a given amount of time.\n * @param ms The time to sleep in milliseconds\n * @returns {Promise<unknown>} A promise that resolves after the given time\n */\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nmodule.exports = sleep;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(399);\n"],"names":["module","exports","ms","Promise","resolve","setTimeout","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"sleep.js","mappings":"qBAKA,SAASA,EAAMC,GACX,OAAO,IAAIC,SAAQ,SAAAC,GAAO,OAAIC,WAAWD,EAASF,EAAG,GACzD,CAGsB,oBAAXI,SACPA,OAAOL,MAAQA,GAGnBM,EAAOC,QAAUP,C,GCbbQ,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaJ,QAGrB,IAAID,EAASE,EAAyBE,GAAY,CAGjDH,QAAS,CAAC,GAOX,OAHAM,EAAoBH,GAAUJ,EAAQA,EAAOC,QAASE,GAG/CH,EAAOC,OACf,CCnB0BE,CAAoB,I","sources":["webpack://@lizardbyte/shared-web/./src/js/sleep.js","webpack://@lizardbyte/shared-web/webpack/bootstrap","webpack://@lizardbyte/shared-web/webpack/startup"],"sourcesContent":["/**\n * Sleep for a given amount of time.\n * @param ms The time to sleep in milliseconds\n * @returns {Promise<unknown>} A promise that resolves after the given time\n */\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n// Expose to the global scope\nif (typeof window !== 'undefined') {\n window.sleep = sleep;\n}\n\nmodule.exports = sleep;\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","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(399);\n"],"names":["sleep","ms","Promise","resolve","setTimeout","window","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "repository": {
4
4
  "url": "git+https://github.com/LizardByte/shared-web.git"
5
5
  },
6
- "version": "2024.901.195233",
6
+ "version": "2024.921.24756",
7
7
  "description": "Shared web assets for LizardByte projects",
8
8
  "license": "AGPL-3.0-only",
9
9
  "files": [
package/src/js/discord.js CHANGED
@@ -29,6 +29,11 @@ function initDiscord() {
29
29
  });
30
30
  }
31
31
 
32
+ // Expose to the global scope
33
+ if (typeof window !== 'undefined') {
34
+ window.initDiscord = initDiscord;
35
+ }
36
+
32
37
  module.exports = {
33
38
  initDiscord,
34
39
  randomQuote,
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Format a number to a human-readable string
3
+ * @param num The number to format
4
+ * @param decimalPlaces The number of decimal places to include in the formatted string
5
+ * @returns {string}
6
+ */
7
+ function formatNumber(num, decimalPlaces = 1) {
8
+ if (num >= 1000000) {
9
+ return (num / 1000000).toFixed(decimalPlaces) + 'M';
10
+ } else if (num >= 1000) {
11
+ return (num / 1000).toFixed(decimalPlaces) + 'k';
12
+ } else {
13
+ return num.toFixed(decimalPlaces);
14
+ }
15
+ }
16
+
17
+ // Expose to the global scope
18
+ if (typeof window !== 'undefined') {
19
+ window.formatNumber = formatNumber;
20
+ }
21
+
22
+ module.exports = formatNumber;
@@ -33,4 +33,9 @@ function levenshteinDistance(a, b) {
33
33
  return (1 - (matrix[b.length][a.length] / Math.max(a.length, b.length))) * 100
34
34
  }
35
35
 
36
+ // Expose to the global scope
37
+ if (typeof window !== 'undefined') {
38
+ window.levenshteinDistance = levenshteinDistance;
39
+ }
40
+
36
41
  module.exports = levenshteinDistance;
@@ -19,4 +19,9 @@ function loadScript(url, callback) {
19
19
  document.head.appendChild(script);
20
20
  }
21
21
 
22
+ // Expose to the global scope
23
+ if (typeof window !== 'undefined') {
24
+ window.loadScript = loadScript;
25
+ }
26
+
22
27
  module.exports = loadScript;
@@ -4,7 +4,7 @@
4
4
  * @param secondKey The secondary key to sort by, in case the first key is equal.
5
5
  * @returns {(function(*, *): (number))|*} The sorting function.
6
6
  */
7
- let rankingSorter = function (firstKey, secondKey) {
7
+ function rankingSorter(firstKey, secondKey) {
8
8
  return function(a, b) {
9
9
  if (a[firstKey] > b[firstKey]) {
10
10
  return -1;
@@ -23,4 +23,9 @@ let rankingSorter = function (firstKey, secondKey) {
23
23
  }
24
24
  }
25
25
 
26
+ // Expose to the global scope
27
+ if (typeof window !== 'undefined') {
28
+ window.rankingSorter = rankingSorter;
29
+ }
30
+
26
31
  module.exports = rankingSorter;
package/src/js/sleep.js CHANGED
@@ -7,4 +7,9 @@ function sleep(ms) {
7
7
  return new Promise(resolve => setTimeout(resolve, ms));
8
8
  }
9
9
 
10
+ // Expose to the global scope
11
+ if (typeof window !== 'undefined') {
12
+ window.sleep = sleep;
13
+ }
14
+
10
15
  module.exports = sleep;
@@ -0,0 +1,26 @@
1
+ import {
2
+ describe,
3
+ expect,
4
+ test,
5
+ } from '@jest/globals';
6
+
7
+ const formatNumber = require('../src/js/format-number');
8
+
9
+ describe('formatNumber function', () => {
10
+ test.each([
11
+ [1234567, 1, '1.2M'], // 1.2 million
12
+ [1234567, 2, '1.23M'], // 1.23 million
13
+ [1234, 1, '1.2k'], // 1.2 thousand
14
+ [1234, 2, '1.23k'], // 1.23 thousand
15
+ [123, 1, '123.0'], // 123 with 1 decimal place
16
+ [123, 2, '123.00'], // 123 with 2 decimal places
17
+ ])('formats %i with %i decimal places as %s', (num, decimalPlaces, expected) => {
18
+ expect(formatNumber(num, decimalPlaces)).toBe(expected);
19
+ });
20
+
21
+ test('defaults to 1 decimal place if not provided', () => {
22
+ expect(formatNumber(1234567)).toBe('1.2M');
23
+ expect(formatNumber(1234)).toBe('1.2k');
24
+ expect(formatNumber(123)).toBe('123.0');
25
+ });
26
+ });