var Core = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./src/0globals.js": /*!*************************!*\ !*** ./src/0globals.js ***! \*************************/ /*! exports provided: minimumDiscordVersion, currentDiscordVersion, minSupportedVersion, bbdVersion, bbdChangelog, settings, defaultCookie, settingsCookie, bdpluginErrors, bdthemeErrors, bdConfig, bemotes, emotesFfz, emotesBTTV, emotesBTTV2, emotesTwitch, subEmotesTwitch, bdEmotes, bdEmoteSettingIDs, bdthemes, bdplugins, pluginCookie, themeCookie */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minimumDiscordVersion\", function() { return minimumDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentDiscordVersion\", function() { return currentDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minSupportedVersion\", function() { return minSupportedVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdVersion\", function() { return bbdVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdChangelog\", function() { return bbdChangelog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settings\", function() { return settings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultCookie\", function() { return defaultCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsCookie\", function() { return settingsCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdpluginErrors\", function() { return bdpluginErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemeErrors\", function() { return bdthemeErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdConfig\", function() { return bdConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bemotes\", function() { return bemotes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emotesFfz\", function() { return emotesFfz; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emotesBTTV\", function() { return emotesBTTV; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emotesBTTV2\", function() { return emotesBTTV2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emotesTwitch\", function() { return emotesTwitch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subEmotesTwitch\", function() { return subEmotesTwitch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdEmotes\", function() { return bdEmotes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdEmoteSettingIDs\", function() { return bdEmoteSettingIDs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemes\", function() { return bdthemes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdplugins\", function() { return bdplugins; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pluginCookie\", function() { return pluginCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"themeCookie\", function() { return themeCookie; });\n// var settingsPanel, emoteModule, quickEmoteMenu, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;\nconst minimumDiscordVersion = \"0.0.306\";\nconst currentDiscordVersion = window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion() || \"0.0.306\";\nconst minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.4\";\nconst bbdChangelog = {\n description: \"Big things are coming.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**In-App Updater** for the injection module now exists to try and decrease the number of issues with updates to the injector.\", \"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.\", \"Initialization sequence has once again been changed slightly to hopefully improve loading times.\"]\n }, {\n title: \"Bug Fixes\",\n type: \"fixed\",\n items: [\"Some fixes related to showing modals in the `BdApi`.\"]\n }]\n};\nconst settings = {\n \"Custom css live update\": {\n id: \"bda-css-0\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"Custom css auto udpate\": {\n id: \"bda-css-1\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"BetterDiscord Blue\": {\n id: \"bda-gs-b\",\n info: \"Replace Discord blue with BD Blue\",\n implemented: false,\n hidden: false,\n cat: \"core\"\n },\n\n /* Core */\n\n /* ====== */\n \"Public Servers\": {\n id: \"bda-gs-1\",\n info: \"Display public servers button\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Minimal Mode\": {\n id: \"bda-gs-2\",\n info: \"Hide elements and reduce the size of elements.\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Mode\": {\n id: \"bda-gs-4\",\n info: \"Only show voice chat\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Hide Channels\": {\n id: \"bda-gs-3\",\n info: \"Hide channels in minimal mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Dark Mode\": {\n id: \"bda-gs-5\",\n info: \"Make certain elements dark by default(wip)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Disconnect\": {\n id: \"bda-dc-0\",\n info: \"Disconnect from voice server when closing Discord\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"24 Hour Timestamps\": {\n id: \"bda-gs-6\",\n info: \"Replace 12hr timestamps with proper ones\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Colored Text\": {\n id: \"bda-gs-7\",\n info: \"Make text color the same as role color\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Normalize Classes\": {\n id: \"fork-ps-4\",\n info: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n\n /* Content */\n \"Content Error Modal\": {\n id: \"fork-ps-1\",\n info: \"Shows a modal with plugin/theme errors\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Show Toasts\": {\n id: \"fork-ps-2\",\n info: \"Shows a small notification for important information\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Scroll To Settings\": {\n id: \"fork-ps-3\",\n info: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Automatic Loading\": {\n id: \"fork-ps-5\",\n info: \"Automatically loads, reloads, and unloads plugins and themes\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n\n /* Developer */\n \"Developer Mode\": {\n id: \"bda-gs-8\",\n info: \"Developer Mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"Copy Selector\": {\n id: \"fork-dm-1\",\n info: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"React DevTools\": {\n id: \"reactDevTools\",\n info: \"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.\",\n implemented: true,\n hidden: true,\n cat: \"core\",\n category: \"developer settings\"\n },\n\n /* Window Prefs */\n \"Enable Transparency\": {\n id: \"fork-wp-1\",\n info: \"Enables the main window to be see-through (requires restart)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"window preferences\"\n },\n \"Window Frame\": {\n id: \"fork-wp-2\",\n info: \"Adds the native os window frame to the main window\",\n implemented: false,\n hidden: true,\n cat: \"core\",\n category: \"window preferences\"\n },\n\n /* Emotes */\n\n /* ====== */\n \"Download Emotes\": {\n id: \"fork-es-3\",\n info: \"Download emotes when the cache is expired\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Twitch Emotes\": {\n id: \"bda-es-7\",\n info: \"Show Twitch emotes\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"FrankerFaceZ Emotes\": {\n id: \"bda-es-1\",\n info: \"Show FrankerFaceZ Emotes\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"BetterTTV Emotes\": {\n id: \"bda-es-2\",\n info: \"Show BetterTTV Emotes\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Emote Menu\": {\n id: \"bda-es-0\",\n info: \"Show Twitch/Favourite emotes in emote menu\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Emoji Menu\": {\n id: \"bda-es-9\",\n info: \"Show Discord emoji menu\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Emote Auto Capitalization\": {\n id: \"bda-es-4\",\n info: \"Autocapitalize emote commands\",\n implemented: false,\n hidden: false,\n cat: \"emote\"\n },\n \"Show Names\": {\n id: \"bda-es-6\",\n info: \"Show emote names on hover\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Show emote modifiers\": {\n id: \"bda-es-8\",\n info: \"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n },\n \"Animate On Hover\": {\n id: \"fork-es-2\",\n info: \"Only animate the emote modifiers on hover\",\n implemented: true,\n hidden: false,\n cat: \"emote\"\n }\n};\nconst defaultCookie = {\n \"bda-gs-1\": true,\n \"bda-gs-2\": false,\n \"bda-gs-3\": false,\n \"bda-gs-4\": false,\n \"bda-gs-5\": true,\n \"bda-gs-6\": false,\n \"bda-gs-7\": false,\n \"bda-gs-8\": false,\n \"bda-es-0\": true,\n \"bda-es-1\": true,\n \"bda-es-2\": true,\n \"bda-es-4\": false,\n \"bda-es-6\": true,\n \"bda-es-7\": true,\n \"bda-gs-b\": false,\n \"bda-es-8\": true,\n \"bda-dc-0\": false,\n \"bda-css-0\": false,\n \"bda-css-1\": false,\n \"bda-es-9\": true,\n \"fork-dm-1\": false,\n \"fork-ps-1\": true,\n \"fork-ps-2\": true,\n \"fork-ps-3\": true,\n \"fork-ps-4\": true,\n \"fork-ps-5\": true,\n \"fork-es-2\": false,\n \"fork-es-3\": true,\n \"fork-wp-1\": false,\n \"fork-wp-2\": false,\n \"fork-beta\": true,\n \"reactDevTools\": false\n};\nconst settingsCookie = {};\nconst bdpluginErrors = [];\nconst bdthemeErrors = []; // define for backwards compatibility\n\nconst bdConfig = {};\nconst bemotes = [];\nconst emotesFfz = {};\nconst emotesBTTV = {};\nconst emotesBTTV2 = {};\nconst emotesTwitch = {};\nconst subEmotesTwitch = {};\nconst bdEmotes = {\n TwitchGlobal: {},\n TwitchSubscriber: {},\n BTTV: {},\n FrankerFaceZ: {},\n BTTV2: {}\n};\nconst bdEmoteSettingIDs = {\n TwitchGlobal: \"bda-es-7\",\n TwitchSubscriber: \"bda-es-7\",\n BTTV: \"bda-es-2\",\n FrankerFaceZ: \"bda-es-1\",\n BTTV2: \"bda-es-2\"\n};\nconst bdthemes = {};\nconst bdplugins = {};\nconst pluginCookie = {};\nconst themeCookie = {};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/0globals.js\n"); /***/ }), /***/ "./src/index.js": /*!**********************!*\ !*** ./src/index.js ***! \**********************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CoreWrapper; });\n/* harmony import */ var _localStorageFix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localStorageFix */ \"./src/localStorageFix.js\");\n/* harmony import */ var _loadingIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loadingIcon */ \"./src/loadingIcon.js\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_bdApi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/bdApi */ \"./src/modules/bdApi.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_pluginModule__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _modules_bdEvents__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _modules_dataStore__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _modules_emoteModule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/emoteModule */ \"./src/modules/emoteModule.js\");\n/* harmony import */ var _modules_contentManager__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _modules_classNormalizer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _modules_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/core */ \"./src/modules/core.js\");\n\n\nObject(_localStorageFix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nObject(_loadingIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n\nconst deprecateGlobal = (key, value) => {\n // value = typeof(value) !== \"object\" ? value : new Proxy(value, {\n // get: function(obj, mod) {\n // if (!obj.hasOwnProperty(mod)) return undefined;\n // return obj[mod];\n // },\n // set: function(obj, mod) {\n // if (obj.hasOwnProperty(mod)) return Utils.err(\"Deprecated Global\", \"Trying to overwrite deprecated BD globals\");\n // }\n // });\n Object.defineProperty(window, key, {\n get() {\n _modules_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].warn(\"Deprecated Global\", `\"${key}\" will be removed in future versions. Please only use BdApi.`);\n return value;\n }\n\n });\n};\n\n\nconst globalKeys = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_2__);\n\nfor (const key of globalKeys) deprecateGlobal(key, _0globals__WEBPACK_IMPORTED_MODULE_2__[key]);\n\n\n\n\n\n\n\n\n\n\n\n\ndeprecateGlobal(\"BDV2\", _modules_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\ndeprecateGlobal(\"pluginModule\", _modules_pluginModule__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\ndeprecateGlobal(\"themeModule\", _modules_themeModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\ndeprecateGlobal(\"Utils\", _modules_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"]);\ndeprecateGlobal(\"BDEvents\", _modules_bdEvents__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\ndeprecateGlobal(\"settingsPanel\", _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\ndeprecateGlobal(\"DataStore\", _modules_dataStore__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\ndeprecateGlobal(\"emoteModule\", _modules_emoteModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\ndeprecateGlobal(\"ContentManager\", _modules_contentManager__WEBPACK_IMPORTED_MODULE_12__[\"default\"]);\ndeprecateGlobal(\"ClassNormalizer\", _modules_classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"]);\nwindow.BdApi = _modules_bdApi__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n\ndeprecateGlobal(\"mainCore\", _modules_core__WEBPACK_IMPORTED_MODULE_14__[\"default\"]);\nclass CoreWrapper {\n constructor(bdConfig) {\n _modules_core__WEBPACK_IMPORTED_MODULE_14__[\"default\"].setConfig(bdConfig);\n }\n\n init() {\n // deprecateGlobal(\"mainCore\", this.mainCore);\n _modules_core__WEBPACK_IMPORTED_MODULE_14__[\"default\"].init();\n }\n\n} // function patchModuleLoad() {\n// const namespace = \"betterdiscord\";\n// const prefix = `${namespace}/`;\n// const Module = require(\"module\");\n// const load = Module._load;\n// // const resolveFilename = Module._resolveFilename;\n// Module._load = function(request) {\n// if (request === namespace || request.startsWith(prefix)) {\n// const requested = request.substr(prefix.length);\n// if (requested == \"api\") return BdApi;\n// }\n// return load.apply(this, arguments);\n// };\n// // Module._resolveFilename = function (request, parent, isMain) {\n// // if (request === \"betterdiscord\" || request.startsWith(\"betterdiscord/\")) {\n// // const contentPath = PluginManager.getPluginPathByModule(parent);\n// // if (contentPath) return request;\n// // }\n// // return resolveFilename.apply(this, arguments);\n// // };\n// return function() {\n// Module._load = load;\n// };\n// }\n// patchModuleLoad();\n// var settingsPanel, emoteModule, quickEmoteMenu, voiceMode,, dMode, publicServersModule;\n// var bdConfig = null;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2luZGV4LmpzP2JmNDUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGxvY2FsU3RvcmFnZUZpeCBmcm9tIFwiLi9sb2NhbFN0b3JhZ2VGaXhcI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ingIcon.js ***! \****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (() => {\n const v2Loader = document.createElement(\"div\");\n v2Loader.className = \"bd-loaderv2\";\n v2Loader.title = \"BandagedBD is loading...\";\n document.body.appendChild(v2Loader);\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbG9hZGluZ0ljb24uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2xvYWRpbmdJY29uLmpzP2NlZGIiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgKCgpID0+IHtcbiAgY29uc3QgdjJMb2FkZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xuICB2MkxvYWRlci5jbGFzc05hbWUgPSBcImJkLWxvYWRlcnYyXCI7XG4gIHYyTG9hZGVyLnRpdGxlID0gXCJCYW5kYWdlZEJEIGlzIGxvYWRpbmcuLi5cIjtcbiAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh2MkxvYWRlcik7XG59KTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/loadingIcon.js\n"); /***/ }), /***/ "./src/localStorageFix.js": /*!********************************!*\ !*** ./src/localStorageFix.js ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n const contentWindowGetter = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, \"contentWindow\").get;\n Object.defineProperty(HTMLIFrameElement.prototype, \"contentWindow\", {\n get: function () {\n const contentWindow = Reflect.apply(contentWindowGetter, this, arguments);\n return new Proxy(contentWindow, {\n getOwnPropertyDescriptor: function (obj, prop) {\n if (prop === \"localStorage\") return undefined;\n return Object.getOwnPropertyDescriptor(obj, prop);\n },\n get: function (obj, prop) {\n if (prop === \"localStorage\") return null;\n const val = obj[prop];\n if (typeof val === \"function\") return val.bind(obj);\n return val;\n }\n });\n }\n }); // Prevent interception by patching Reflect.apply and Function.prototype.bind\n\n Object.defineProperty(Reflect, \"apply\", {\n value: Reflect.apply,\n writable: false,\n configurable: false\n });\n Object.defineProperty(Function.prototype, \"bind\", {\n value: Function.prototype.bind,\n writable: false,\n configurable: false\n });\n const oOpen = XMLHttpRequest.prototype.open;\n\n XMLHttpRequest.prototype.open = function () {\n const url = arguments[1];\n if (url.toLowerCase().includes(\"api/webhooks\")) return null;\n return Reflect.apply(oOpen, this, arguments);\n };\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbG9jYWxTdG9yYWdlRml4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9sb2NhbFN0b3JhZ2VGaXguanM/MTUzMyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoKSB7XG4gIGNvbnN0IGNvbnRlbnRXaW5kb3dHZXR0ZXIgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEhUTUxJRnJhbWVFbGVtZW50LnByb3RvdHlwZSwgXCJjb250ZW50V2luZG93XCIpLmdldDtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEhUTUxJRnJhbWVFbGVtZW50LnByb3RvdHlwZSwgXCJjb250ZW50V2luZG93XCIsIHtcbiAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgIGNvbnN0IGNvbnRlbnRXaW5kb3cgPSB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HJvdG90eXBlLmJpbmQsXG4gICAgd3JpdGFibGU6IGZhbHNlLFxuICAgIGNvbmZpZ3VyYWJsZTogZmFsc2VcbiAgfSk7XG4gIGNvbnN0IG9PcGVuID0gWE1MSHR0cFJlcXVlc3QucHJvdG90eXBlLm9wZW47XG5cbiAgWE1MSHR0cFJlcXVlc3QucHJvdG90eXBlLm9wZW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgY29uc3QgdXJsID0gYXJndW1lbnRzWzFdO1xuICAgIGlmICh1cmwudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyhcImFwaS93ZWJob29rc1wiKSkgcmV0dXJuIG51bGw7XG4gICAgcmV0dXJuIFJlZmxlY3QuYXBwbHkob09wZW4sIHRoaXMsIGFyZ3VtZW50cyk7XG4gIH07XG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/localStorageFix.js\n"); /***/ }), /***/ "./src/modules/24hour.js": /*!*******************************!*\ !*** ./src/modules/24hour.js ***! \*******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class TFHour {\n inject24Hour() {\n if (this.cancel24Hour) return;\n const twelveHour = new RegExp(`([0-9]{1,2}):([0-9]{1,2})\\\\s(AM|PM)`);\n\n const convert = data => {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) return;\n const matched = data.returnValue.match(twelveHour);\n if (!matched || matched.length !== 4) return;\n if (matched[3] === \"AM\") return data.returnValue = data.returnValue.replace(matched[0], `${matched[1] === \"12\" ? \"00\" : matched[1].padStart(2, \"0\")}:${matched[2]}`);\n return data.returnValue = data.returnValue.replace(matched[0], `${matched[1] === \"12\" ? \"12\" : parseInt(matched[1]) + 12}:${matched[2]}`);\n };\n\n const cancelCozy = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].TimeFormatter, \"calendarFormat\", {\n after: convert\n }); // Called in Cozy mode\n\n const cancelCompact = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].TimeFormatter, \"dateFormat\", {\n after: convert\n }); // Called in Compact mode\n\n this.cancel24Hour = () => {\n cancelCozy();\n cancelCompact();\n }; // Cancel both\n\n }\n\n remove24Hour() {\n if (this.cancel24Hour) this.cancel24Hour();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy8yNGhvdXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvMjRob3VyLmpzPzc4OWYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raW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rZXlQYXRjaChCRFYyLlRpbWVGb3JtYXR0ZXIsIFwiY2FsZW5kYXJGb3JtYXRcIiwge1xuICAgICAgYWZ0ZXI6IGNvbnZlcnRcbiAgICB9KTsgLy8gQ2FsbGVkIGluIENvenkgbW9kZVxuXG4gICAgY29uc3QgY2FuY2VsQ29tcGFjdCA9IFV0aWxzLm1vbmtleVBhdGNoKEJEVjIuVGltZUZvcm1hdHRlciwgXCJkYXRlRm9ybWF0XCIsIHtcbiAgICAgIGFmdGVyOiBjb252ZXJ0XG4gICAgfSk7IC8vIENhbGxlZCBpbiBDb21wYWN0IG1vZGVcblxuICAgIHRoaXMuY2FuY2VsMjRIb3VyID0gKCkgPT4ge1xuICAgICAgY2FuY2VsQ296eSgpO1xuICAgICAgY2FuY2VsQ29tcGFjdCgpO1xuICAgIH07IC8vIENhbmNlbCBib3RoXG5cbiAgfVxuXG4gIHJlbW92ZTI0SG91cigpIHtcbiAgICBpZiAodGhpcy5jYW5jZWwyNEhvdXIpIHRoaXMuY2FuY2VsMjRIb3VyKCk7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/24hour.js\n"); /***/ }), /***/ "./src/modules/bdApi.js": /*!******************************!*\ !*** ./src/modules/bdApi.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ \"./src/modules/core.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _pluginModule__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _themeModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _settingsPanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\n\n\n\n\n\n\n\n\nconst BdApi = {\n get React() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].React;\n },\n\n get ReactDOM() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactDom;\n },\n\n get ReactComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactComponent;\n },\n\n get WindowConfigFile() {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].WindowConfigFile;\n },\n\n get settings() {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"];\n },\n\n get emotes() {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"];\n },\n\n get screenWidth() {\n return Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n },\n\n get screenHeight() {\n return Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n }\n\n};\n\nBdApi.getAllWindowPreferences = function () {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getAllWindowPreferences();\n};\n\nBdApi.getWindowPreference = function (key) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getWindowPreference(key);\n};\n\nBdApi.setWindowPreference = function (key, value) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setWindowPreference(key, value);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.injectCSS = function (id, css) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addStyle(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id), css);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.clearCSS = function (id) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].removeStyle(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id));\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.linkJS = function (id, url) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addScript(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id), url);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.unlinkJS = function (id) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].removeScript(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id));\n}; //Get another plugin\n//name = name of plugin\n\n\nBdApi.getPlugin = function (name) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"].hasOwnProperty(name)) {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][name].plugin;\n }\n\n return null;\n}; //Get BetterDiscord Core\n\n\nBdApi.getCore = function () {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(\"Deprecation Notice\", `BdApi.getCore() will be removed in future versions.`);\n return _core__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n};\n/**\r\n * Shows a generic but very customizable modal.\r\n * @param {string} title - title of the modal\r\n * @param {string} content - a string of text to display in the modal\r\n */\n\n\nBdApi.alert = function (title, content) {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showConfirmationModal(title, content, {\n cancelText: null\n });\n};\n/**\r\n * Shows a generic but very customizable confirmation modal with optional confirm and cancel callbacks.\r\n * @param {string} title - title of the modal\r\n * @param {(string|ReactElement|Array)} children - a single or mixed array of react elements and strings. Every string is wrapped in Discord's `Markdown` component so strings will show and render properly.\r\n * @param {object} [options] - options to modify the modal\r\n * @param {boolean} [options.danger=false] - whether the main button should be red or not\r\n * @param {string} [options.confirmText=Okay] - text for the confirmation/submit button\r\n * @param {string} [options.cancelText=Cancel] - text for the cancel button\r\n * @param {callable} [options.onConfirm=NOOP] - callback to occur when clicking the submit button\r\n * @param {callable} [options.onCancel=NOOP] - callback to occur when clicking the cancel button\r\n */\n\n\nBdApi.showConfirmationModal = function (title, content, options = {}) {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showConfirmationModal(title, content, options);\n}; //Show toast alert\n\n\nBdApi.showToast = function (content, options = {}) {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showToast(content, options);\n}; // Finds module\n\n\nBdApi.findModule = function (filter) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.find(filter);\n}; // Finds module\n\n\nBdApi.findAllModules = function (filter) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findAll(filter);\n}; // Finds module\n\n\nBdApi.findModuleByProps = function (...props) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByUniqueProperties(props);\n};\n\nBdApi.findModuleByPrototypes = function (...protos) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByPrototypes(protos);\n};\n\nBdApi.findModuleByDisplayName = function (name) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByDisplayName(name);\n}; // Gets react instance\n\n\nBdApi.getInternalInstance = function (node) {\n if (!(node instanceof window.jQuery) && !(node instanceof Element)) return undefined;\n if (node instanceof jQuery) node = node[0];\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getInternalInstance(node);\n}; // Gets data\n\n\nBdApi.loadData = function (pluginName, key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getPluginData(pluginName, key);\n};\n\nBdApi.getData = BdApi.loadData; // Sets data\n\nBdApi.saveData = function (pluginName, key, data) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setPluginData(pluginName, key, data);\n};\n\nBdApi.setData = BdApi.saveData; // Deletes data\n\nBdApi.deleteData = function (pluginName, key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].deletePluginData(pluginName, key);\n}; // Patches other functions\n\n\nBdApi.monkeyPatch = function (what, methodName, options) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(what, methodName, options);\n}; // Event when element is removed\n\n\nBdApi.onRemoved = function (node, callback) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].onRemoved(node, callback);\n}; // Wraps function in try..catch\n\n\nBdApi.suppressErrors = function (method, message) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].suppressErrors(method, message);\n}; // Tests for valid JSON\n\n\nBdApi.testJSON = function (data) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].testJSON(data);\n};\n\nBdApi.isPluginEnabled = function (name) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name];\n};\n\nBdApi.isThemeEnabled = function (name) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][name];\n};\n\nBdApi.isSettingEnabled = function (id) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id];\n};\n\nBdApi.enableSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, true);\n};\n\nBdApi.disableSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, false);\n};\n\nBdApi.toggleSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id]);\n}; // Gets data\n\n\nBdApi.getBDData = function (key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getBDData(key);\n}; // Sets data\n\n\nBdApi.setBDData = function (key, data) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setBDData(key, data);\n};\n\nconst makeAddonAPI = (cookie, list, manager) => new class AddonAPI {\n get folder() {\n return manager.folder;\n }\n\n isEnabled(name) {\n return !!cookie[name];\n }\n\n enable(name) {\n return manager.enable(name);\n }\n\n disable(name) {\n return manager.disable(name);\n }\n\n toggle(name) {\n if (cookie[name]) this.disable(name);else this.enable(name);\n }\n\n reload(name) {\n return manager.reload(name);\n }\n\n get(name) {\n if (list.hasOwnProperty(name)) {\n if (list[name].plugin) return list[name].plugin;\n return list[name];\n }\n\n return null;\n }\n\n getAll() {\n return Object.keys(list).map(k => this.get(k)).filter(a => a);\n }\n\n}();\n\nBdApi.Plugins = makeAddonAPI(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"], _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"], _pluginModule__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\nBdApi.Themes = makeAddonAPI(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"], _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"], _themeModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BdApi);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEFwaS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9iZEFwaS5qcz9hOWEzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHBsdWdpbkNvb2tpZSwgdGhlbWVDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMsIHNldHRpbmdzQ29va2llLCBzZXR0aW5ncywgYmRFbW90ZXMgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBtYWluQ29yZSBmcm9tIFwiLi9jb3JlXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuL3YyXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IHBsdWdpbk1vZHVsZSBmcm9tIFwiLi9wbHVnaW5Nb2R1bGVcIjtcbmltcG9ydCB0aGVtZU1vZHVsZSBmcm9tIFwiLi90aGVtZU1vZHVsZVwiO1xuaW1wb3J0IHNldHRpbmdzUGFuZWwgZnJvbSBcIi4vc2V0dGluZ3NQYW5lbFwiO1xuaW1wb3J0IERPTSBmcm9tIFwiLi9kb210b29sc1wiO1xuY29uc3QgQmRBcGkgPSB7XG4gIGdldCBSZWFjdCgpIHtcbiAgICByZXR1cm4gQkRWMi5SZWFjdDtcbiAgfSxcblxuICBnZXQgUmVhY3RET00oKSB7XG4gICAgcmV0dXJuIEJEVjIuUmVhY3REb207XG4gIH0sXG5cbiAgZ2V0IFJlYWN0Q29tcG9uZW50KCkge1xuICAgIHJldHVybiBCRFYyLlJlYWN0Q29tcG9uZW50O1x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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/bdApi.js\n"); /***/ }), /***/ "./src/modules/bdEvents.js": /*!*********************************!*\ !*** ./src/modules/bdEvents.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* BDEvents */\nconst EventEmitter = __webpack_require__(/*! events */ \"events\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class BDEvents extends EventEmitter {\n dispatch(eventName, ...args) {\n this.emit(eventName, ...args);\n }\n\n off(eventName, eventAction) {\n this.removeListener(eventName, eventAction);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcz84ZjI1Il0sInNvdXJjZXNDb250ZW50IjpbIi8qIEJERXZlbnRzICovXG5jb25zdCBFdmVudEVtaXR0ZXIgPSByZXF1aXJlKFwiZXZlbnRzXCIpO1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQkRFdmVudHMgZXh0ZW5kcyBFdmVudEVtaXR0ZXIge1xuICBkaXNwYXRjaChldmVudE5hbWUsIC4uLmFyZ3MpIHtcbiAgICB0aGlzLmVtaXQoZXZlbnROYW1lLCAuLi5hcmdzKTtcbiAgfVxuXG4gIG9mZihldmVudE5hbWUsIGV2ZW50QWN0aW9uKSB7XG4gICAgdGhpcy5yZW1vdmVMaXN0ZW5lcihldmVudE5hbWUsIGV2ZW50QWN0aW9uKTtcbiAgfVxuXG59KCk7Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/bdEvents.js\n"); /***/ }), /***/ "./src/modules/classNormalizer.js": /*!****************************************!*\ !*** ./src/modules/classNormalizer.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _webpackModules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./webpackModules */ \"./src/modules/webpackModules.js\");\n\nconst normalizedPrefix = \"da\";\nconst randClass = new RegExp(`^(?!${normalizedPrefix}-)((?:[A-Za-z]|[0-9]|-)+)-(?:[A-Za-z]|[0-9]|-|_){6}$`);\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class ClassNormalizer {\n stop() {\n if (!this.hasPatched) return;\n this.unpatchClassModules(_webpackModules__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findAll(this.moduleFilter.bind(this)));\n this.revertElement(document.querySelector(\"#app-mount\"));\n this.hasPatched = false;\n }\n\n start() {\n if (this.hasPatched) return;\n this.patchClassModules(_webpackModules__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findAll(this.moduleFilter.bind(this)));\n this.normalizeElement(document.querySelector(\"#app-mount\"));\n this.hasPatched = true;\n this.patchDOMMethods();\n }\n\n patchClassModules(modules) {\n for (const module of modules) {\n this.patchClassModule(normalizedPrefix, module);\n }\n }\n\n unpatchClassModules(modules) {\n for (const module of modules) {\n this.unpatchClassModule(normalizedPrefix, module);\n }\n }\n\n shouldIgnore(value) {\n if (!isNaN(value)) return true;\n if (value.endsWith(\"px\") || value.endsWith(\"ch\") || value.endsWith(\"em\") || value.endsWith(\"ms\")) return true;\n if (value.startsWith(\"layerContainer-\")) return true;\n if (value.startsWith(\"#\") && (value.length == 7 || value.length == 4)) return true;\n if (value.includes(\"calc(\") || value.includes(\"rgba\")) return true;\n return false;\n }\n\n moduleFilter(module) {\n if (typeof module !== \"object\" || Array.isArray(module)) return false;\n if (module.__esModule) return false;\n if (!Object.keys(module).length) return false;\n\n for (const baseClassName in module) {\n const value = module[baseClassName];\n if (typeof value !== \"string\") return false;\n if (this.shouldIgnore(value)) continue;\n if (value.split(\"-\").length === 1) return false;\n if (!randClass.test(value.split(\" \")[0])) return false;\n }\n\n return true;\n }\n\n patchClassModule(componentName, classNames) {\n for (const baseClassName in classNames) {\n const value = classNames[baseClassName];\n if (this.shouldIgnore(value)) continue;\n const classList = value.split(\" \");\n\n for (const normalClass of classList) {\n const match = normalClass.match(randClass);\n if (!match || !match.length || match.length < 2) continue; // Shouldn't ever happen since they passed the moduleFilter, but you never know\n\n const camelCase = match[1].split(\"-\").map((s, i) => i ? s[0].toUpperCase() + s.slice(1) : s).join(\"\");\n classNames[baseClassName] += ` ${componentName}-${camelCase}`;\n }\n }\n }\n\n unpatchClassModule(componentName, classNames) {\n for (const baseClassName in classNames) {\n const value = classNames[baseClassName];\n if (this.shouldIgnore(value)) continue;\n let newString = \"\";\n const classList = value.split(\" \");\n\n for (const normalClass of classList) {\n if (normalClass.startsWith(`${componentName}-`)) continue;\n newString += ` ${normalClass}`;\n }\n\n classNames[baseClassName] = newString.trim();\n }\n }\n\n normalizeElement(element) {\n if (!(element instanceof Element)) return;\n const classes = element.classList;\n\n for (let c = 0, clen = classes.length; c < clen; c++) {\n if (!randClass.test(classes[c])) continue;\n const match = classes[c].match(randClass)[1];\n const newClass = match.split(\"-\").map((s, i) => i ? s[0].toUpperCase() + s.slice(1) : s).join(\"\");\n element.classList.add(`${normalizedPrefix}-${newClass}`);\n }\n\n for (const child of element.children) this.normalizeElement(child);\n }\n\n revertElement(element) {\n if (!(element instanceof Element)) return;\n if (element.children && element.children.length) this.revertElement(element.children[0]);\n if (element.nextElementSibling) this.revertElement(element.nextElementSibling);\n const classes = element.classList;\n const toRemove = [];\n\n for (let c = 0; c < classes.length; c++) {\n if (classes[c].startsWith(`${normalizedPrefix}-`)) toRemove.push(classes[c]);\n }\n\n element.classList.remove(...toRemove);\n }\n\n patchDOMMethods() {\n const contains = DOMTokenList.prototype.contains;\n\n DOMTokenList.prototype.contains = function (token) {\n // const tokens = token.split(\" \");\n return Reflect.apply(contains, this, [token.split(\" \")[0]]); // return tokens.every(t => contains.call(this, t));\n };\n\n const add = DOMTokenList.prototype.add;\n\n DOMTokenList.prototype.add = function (...tokens) {\n for (let t = 0; t < tokens.length; t++) {\n tokens[t] = tokens[t].split(\" \")[0];\n }\n\n return Reflect.apply(add, this, tokens);\n };\n\n const remove = DOMTokenList.prototype.remove;\n\n DOMTokenList.prototype.remove = function (...tokens) {\n for (let t = 0; t < tokens.length; t++) {\n tokens[t] = tokens[t].split(\" \")[0];\n }\n\n return Reflect.apply(remove, this, tokens);\n };\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jbGFzc05vcm1hbGl6ZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvY2xhc3NOb3JtYWxpemVyLmpzP2JmMTkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFdlYnBhY2tNb2R1bGVzIGZyb20gXCIuL3dlYnBhY2tNb2R1bGVzXCI7XG5jb25zdCBub3JtYWxpemVkUHJlZml4ID0gXCJkYVwiO1xuY29uc3QgcmFuZENsYXNzID0gbmV3IFJlZ0V4cChgXig/ISR7bm9ybWFsaXplZFByZWZpeH0tKSgoPzpbQS1aYS16XXxbMC05XXwtKSspLSg/OltBLVphLXpdfFswLTldfC18Xyl7Nn0kYCk7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQ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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/classNormalizer.js\n"); /***/ }), /***/ "./src/modules/coloredText.js": /*!************************************!*\ !*** ./src/modules/coloredText.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class ColoredText {\n injectColoredText() {\n if (this.cancelColoredText) return;\n if (!_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MessageComponent) return;\n this.cancelColoredText = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].MessageComponent, \"default\", {\n before: data => {\n const props = data.methodArguments[0];\n if (!props || !props.childrenMessageContent) return;\n const messageContent = props.childrenMessageContent;\n if (!messageContent.type || !messageContent.type.type || messageContent.type.type.displayName != \"MessageContent\") return;\n const originalType = messageContent.type.type;\n if (originalType.__originalMethod) return; // Don't patch again\n\n messageContent.type.type = function (props) {\n const returnValue = originalType(props);\n const roleColor = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"] ? props.message.colorString || \"\" : \"\";\n returnValue.props.style = {\n color: roleColor\n };\n return returnValue;\n };\n\n messageContent.type.type.__originalMethod = originalType;\n Object.assign(messageContent.type.type, originalType);\n }\n });\n }\n\n removeColoredText() {\n document.querySelectorAll(\".markup-2BOw-j\").forEach(elem => {\n elem.style.setProperty(\"color\", \"\");\n });\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jb2xvcmVkVGV4dC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9jb2xvcmVkVGV4dC5qcz9lMjk3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi92MlwiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQ29sb3JlZFRleHQge1xuICBpbmplY3RDb2xvcmVkVGV4dCgpIHtcbiAgICBpZiAodGhpcy5jYW5jZWxDb2xvcmVkVGV4dCkgcmV0dXJuO1xuICAgIGlmICghQkRWMi5NZXNzYWdlQ29tcG9uZW50KSByZXR1cm47XG4gICAgdGhpcy5jYW5jZWxDb2xvcmVkVGV4dCA9IFV0aWxzLm1vbmtleVBhdGNoKEJEVjIuTWVzc2FnZUNvbXBvbmVudCwgXCJkZWZhdWx0XCIsIHtcbiAgICAgIGJlZm9yZTogZGF0YSA9PiB7XG4gICAgICAgIGNvbnN0IHByb3BzID0gZGF0YS5tZXRob2RBcmd1bWVudHNbMF07XG4gICAgICAgIGlmICghcHJvcHMgfHwgIXByb3BzLmNoaWxkcmVuTWVzc2FnZUNvbnRlbnQpIHJldHVybjtcbiAgICAgICAgY29uc3QgbWVzc2FnZUNvbnRlbnQgPSBwcm9wcy5jaGlsZHJlbk1lc3NhZ2VDb250ZW50O1xuICAgICAgICBpZiAoIW1lc3NhZ2VDb250ZW50LnR5cGUgfHwgIW1lc3NhZ2VDb250ZW50LnR5cGUudHlwZSB8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CIpO1xuICAgIH0pO1xuICB9XG5cbn0oKTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/coloredText.js\n"); /***/ }), /***/ "./src/modules/contentManager.js": /*!***************************************!*\ !*** ./src/modules/contentManager.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _pluginModule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _themeModule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\n\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst fs = __webpack_require__(/*! fs */ \"fs\");\n\nconst Module = __webpack_require__(/*! module */ \"module\").Module;\n\nModule.globalPaths.push(path.resolve(__webpack_require__(/*! electron */ \"electron\").remote.app.getAppPath(), \"node_modules\"));\n\nclass MetaError extends Error {\n constructor(message) {\n super(message);\n this.name = \"MetaError\";\n }\n\n}\n\nconst originalJSRequire = Module._extensions[\".js\"];\nconst originalCSSRequire = Module._extensions[\".css\"] ? Module._extensions[\".css\"] : () => {\n return null;\n};\nconst splitRegex = /[^\\S\\r\\n]*?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class ContentManager {\n constructor() {\n this.timeCache = {};\n this.watchers = {};\n Module._extensions[\".js\"] = this.getContentRequire(\"plugin\");\n Module._extensions[\".css\"] = this.getContentRequire(\"theme\");\n }\n\n get pluginsFolder() {\n return this._pluginsFolder || (this._pluginsFolder = fs.realpathSync(path.resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath + \"plugins/\")));\n }\n\n get themesFolder() {\n return this._themesFolder || (this._themesFolder = fs.realpathSync(path.resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath + \"themes/\")));\n }\n\n watchContent(contentType) {\n if (this.watchers[contentType]) return;\n const isPlugin = contentType === \"plugin\";\n const baseFolder = isPlugin ? this.pluginsFolder : this.themesFolder;\n const fileEnding = isPlugin ? \".plugin.js\" : \".theme.css\";\n this.watchers[contentType] = fs.watch(baseFolder, {\n persistent: false\n }, async (eventType, filename) => {\n if (!eventType || !filename || !filename.endsWith(fileEnding)) return;\n await new Promise(r => setTimeout(r, 50));\n\n try {\n fs.statSync(path.resolve(baseFolder, filename));\n } catch (err) {\n if (err.code !== \"ENOENT\") return;\n delete this.timeCache[filename];\n if (isPlugin) return _pluginModule__WEBPACK_IMPORTED_MODULE_1__[\"default\"].unloadPlugin(filename);\n return _themeModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].unloadTheme(filename);\n }\n\n if (!fs.statSync(path.resolve(baseFolder, filename)).isFile()) return;\n const stats = fs.statSync(path.resolve(baseFolder, filename));\n if (!stats || !stats.mtime || !stats.mtime.getTime()) return;\n if (typeof stats.mtime.getTime() !== \"number\") return;\n if (this.timeCache[filename] == stats.mtime.getTime()) return;\n this.timeCache[filename] = stats.mtime.getTime();\n\n if (eventType == \"rename\") {\n if (isPlugin) _pluginModule__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadPlugin(filename);else _themeModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].loadTheme(filename);\n }\n\n if (eventType == \"change\") {\n if (isPlugin) _pluginModule__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reloadPlugin(filename);else _themeModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reloadTheme(filename);\n }\n });\n }\n\n unwatchContent(contentType) {\n if (!this.watchers[contentType]) return;\n this.watchers[contentType].close();\n delete this.watchers[contentType];\n }\n\n extractMeta(content) {\n const firstLine = content.split(\"\\n\")[0];\n const hasOldMeta = firstLine.includes(\"//META\");\n if (hasOldMeta) return this.parseOldMeta(content);\n const hasNewMeta = firstLine.includes(\"/**\");\n if (hasNewMeta) return this.parseNewMeta(content);\n throw new MetaError(\"META was not found.\");\n }\n\n parseOldMeta(content) {\n const meta = content.split(\"\\n\")[0];\n const rawMeta = meta.substring(meta.lastIndexOf(\"//META\") + 6, meta.lastIndexOf(\"*//\"));\n if (meta.indexOf(\"META\") < 0) throw new MetaError(\"META was not found.\");\n const parsed = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].testJSON(rawMeta);\n if (!parsed) throw new MetaError(\"META could not be parsed.\");\n if (!parsed.name) throw new MetaError(\"META missing name data.\");\n parsed.format = \"json\";\n return parsed;\n }\n\n parseNewMeta(content) {\n const block = content.split(\"/**\", 2)[1].split(\"*/\", 1)[0];\n const out = {};\n let field = \"\";\n let accum = \"\";\n\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n out[field] = accum;\n const l = line.indexOf(\" \");\n field = line.substr(1, l - 1);\n accum = line.substr(l + 1);\n } else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n\n out[field] = accum.trim();\n delete out[\"\"];\n out.format = \"jsdoc\";\n return out;\n }\n\n getContentRequire(type) {\n const isPlugin = type === \"plugin\";\n const self = this;\n const originalRequire = isPlugin ? originalJSRequire : originalCSSRequire;\n return function (module, filename) {\n const baseFolder = isPlugin ? self.pluginsFolder : self.themesFolder;\n const possiblePath = path.resolve(baseFolder, path.basename(filename));\n if (!fs.existsSync(possiblePath) || filename !== fs.realpathSync(possiblePath)) return Reflect.apply(originalRequire, this, arguments);\n let content = fs.readFileSync(filename, \"utf8\");\n content = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].stripBOM(content);\n const stats = fs.statSync(filename);\n const meta = self.extractMeta(content);\n meta.filename = path.basename(filename);\n meta.added = stats.atimeMs;\n meta.modified = stats.mtimeMs;\n meta.size = stats.size;\n\n if (!isPlugin) {\n meta.css = content;\n if (meta.format == \"json\") meta.css = meta.css.split(\"\\n\").slice(1).join(\"\\n\");\n content = `module.exports = ${JSON.stringify(meta)};`;\n }\n\n if (isPlugin) {\n module._compile(content, module.filename);\n\n const didExport = !_utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isEmpty(module.exports);\n\n if (didExport) {\n meta.type = module.exports;\n module.exports = meta;\n content = \"\";\n } else {\n content += `\\nmodule.exports = ${JSON.stringify(meta)};\\nmodule.exports.type = ${meta.exports || meta.name};`;\n }\n }\n\n module._compile(content, filename);\n };\n }\n\n makePlaceholderPlugin(data) {\n return {\n plugin: {\n start: () => {},\n getName: () => {\n return data.name || data.filename;\n },\n getAuthor: () => {\n return \"???\";\n },\n getDescription: () => {\n return data.message ? data.message : \"This plugin was unable to be loaded. Check the author's page for updates.\";\n },\n getVersion: () => {\n return \"???\";\n }\n },\n name: data.name || data.filename,\n filename: data.filename,\n source: data.source ? data.source : \"\",\n website: data.website ? data.website : \"\"\n };\n }\n\n loadContent(filename, type) {\n if (typeof filename === \"undefined\" || typeof type === \"undefined\") return;\n const isPlugin = type === \"plugin\";\n const baseFolder = isPlugin ? this.pluginsFolder : this.themesFolder;\n\n try {\n require(path.resolve(baseFolder, filename));\n } catch (error) {\n return {\n name: filename,\n file: filename,\n message: \"Could not be compiled.\",\n error: {\n message: error.message,\n stack: error.stack\n }\n };\n }\n\n const content = require(path.resolve(baseFolder, filename));\n\n content.id = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].escapeID(content.name);\n\n if (isPlugin) {\n if (!content.type) return;\n\n try {\n content.plugin = new content.type();\n delete _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][content.plugin.getName()];\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][content.plugin.getName()] = content;\n } catch (error) {\n return {\n name: filename,\n file: filename,\n message: \"Could not be constructed.\",\n error: {\n message: error.message,\n stack: error.stack\n }\n };\n }\n } else {\n delete _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][content.name];\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][content.name] = content;\n }\n }\n\n unloadContent(filename, type) {\n if (typeof filename === \"undefined\" || typeof type === \"undefined\") return;\n const isPlugin = type === \"plugin\";\n const baseFolder = isPlugin ? this.pluginsFolder : this.themesFolder;\n\n try {\n delete require.cache[require.resolve(path.resolve(baseFolder, filename))];\n } catch (err) {\n return {\n name: filename,\n file: filename,\n message: \"Could not be unloaded.\",\n error: {\n message: err.message,\n stack: err.stack\n }\n };\n }\n }\n\n isLoaded(filename, type) {\n const isPlugin = type === \"plugin\";\n const baseFolder = isPlugin ? this.pluginsFolder : this.themesFolder;\n\n try {\n require.cache[require.resolve(path.resolve(baseFolder, filename))];\n } catch (err) {\n return false;\n }\n\n return true;\n }\n\n reloadContent(filename, type) {\n const cantUnload = this.unloadContent(filename, type);\n if (cantUnload) return cantUnload;\n return this.loadContent(filename, type);\n }\n\n loadNewContent(type) {\n const isPlugin = type === \"plugin\";\n const fileEnding = isPlugin ? \".plugin.js\" : \".theme.css\";\n const basedir = isPlugin ? this.pluginsFolder : this.themesFolder;\n const files = fs.readdirSync(basedir);\n const contentList = Object.values(isPlugin ? _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"] : _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n const removed = contentList.filter(t => !files.includes(t.filename)).map(c => isPlugin ? c.plugin.getName() : c.name);\n const added = files.filter(f => !contentList.find(t => t.filename == f) && f.endsWith(fileEnding) && fs.statSync(path.resolve(basedir, f)).isFile());\n return {\n added,\n removed\n };\n }\n\n loadAllContent(type) {\n const isPlugin = type === \"plugin\";\n const fileEnding = isPlugin ? \".plugin.js\" : \".theme.css\";\n const basedir = isPlugin ? this.pluginsFolder : this.themesFolder;\n const errors = [];\n const files = fs.readdirSync(basedir);\n\n for (const filename of files) {\n if (!fs.statSync(path.resolve(basedir, filename)).isFile() || !filename.endsWith(fileEnding)) continue;\n const error = this.loadContent(filename, type);\n if (error) errors.push(error);\n }\n\n return errors;\n }\n\n loadPlugins() {\n return this.loadAllContent(\"plugin\");\n }\n\n loadThemes() {\n return this.loadAllContent(\"theme\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jb250ZW50TWFuYWdlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9jb250ZW50TWFuYWdlci5qcz80ZWIwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJkQ29uZmlnLCBiZHBsdWdpbnMsIGJkdGhlbWVzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgcGx1Z2luTW9kdWxlIGZyb20gXCIuL3BsdWdpbk1vZHVsZVwiO1xuaW1wb3J0IHRoZW1lTW9kdWxlIGZyb20gXCIuL3RoZW1lTW9kdWxlXCI7XG5pbXBvcnQgVXRpb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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/contentManager.js\n"); /***/ }), /***/ "./src/modules/core.js": /*!*****************************!*\ !*** ./src/modules/core.js ***! \*****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _emoteModule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./emoteModule */ \"./src/modules/emoteModule.js\");\n/* harmony import */ var _quickEmoteMenu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./quickEmoteMenu */ \"./src/modules/quickEmoteMenu.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _settingsPanel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _pluginModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _themeModule__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _webpackModules__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./webpackModules */ \"./src/modules/webpackModules.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _ui_bdLogo__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../ui/bdLogo */ \"./src/ui/bdLogo.js\");\n/* harmony import */ var _ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ui/tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Core() {// Object.assign(bdConfig, __non_webpack_require__(DataStore.configFile));\n // this.init();\n}\n\nCore.prototype.setConfig = function (config) {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"], config);\n};\n\nCore.prototype.init = async function () {\n if (!Array.prototype.flat) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Not Supported\", \"BetterDiscord v\" + _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"] + \" does not support this old version (\" + _0globals__WEBPACK_IMPORTED_MODULE_0__[\"currentDiscordVersion\"] + \") of Discord. Please update your Discord installation before proceeding.\");\n return;\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].version < _0globals__WEBPACK_IMPORTED_MODULE_0__[\"minSupportedVersion\"]) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Not Supported\", \"BetterDiscord v\" + _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].version + \" (your version)\" + \" is not supported by the latest js (\" + _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"] + \").

Please download the latest version from GitHub\");\n return;\n }\n\n if (window.ED) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Not Supported\", \"BandagedBD does not work with EnhancedDiscord. Please uninstall one of them.\");\n return;\n }\n\n if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes(\"Patched\")) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Not Supported\", \"BandagedBD does not work with Powercord. Please uninstall one of them.\");\n return;\n }\n\n const latestLocalVersion = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].updater ? _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].updater.LatestVersion : _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].latestVersion;\n\n if (latestLocalVersion > _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].version) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showConfirmationModal(\"Update Available\", [`There is an update available for BandagedBD's Injector (${latestLocalVersion}).`, \"You can either update and restart now, or later.\"], {\n confirmText: \"Update Now\",\n cancelText: \"Maybe Later\",\n onConfirm: async () => {\n const onUpdateFailed = () => {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Could Not Update\", `Unable to update automatically, please download the installer and reinstall normally.

Download Installer`);\n };\n\n try {\n const didUpdate = await this.updateInjector();\n if (!didUpdate) return onUpdateFailed();\n\n const app = __webpack_require__(/*! electron */ \"electron\").remote.app;\n\n app.relaunch();\n app.exit();\n } catch (err) {\n onUpdateFailed();\n }\n }\n });\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing Settings\");\n this.initSettings();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing EmoteModule\");\n window.emotePromise = _emoteModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init().then(() => {\n _emoteModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].initialized = true;\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing QuickEmoteMenu\");\n _quickEmoteMenu__WEBPACK_IMPORTED_MODULE_3__[\"default\"].init();\n });\n this.injectExternals();\n await this.checkForGuilds();\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].initialize();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Updating Settings\");\n _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].initializeSettings();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Plugins\");\n _pluginModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"].loadPlugins();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Themes\");\n _themeModule__WEBPACK_IMPORTED_MODULE_7__[\"default\"].loadThemes();\n _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addStyle(\"customcss\", atob(_dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getBDData(\"bdcustomcss\")));\n window.addEventListener(\"beforeunload\", function () {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-dc-0\"]) document.querySelector(\".btn.btn-disconnect\").click();\n });\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Removing Loading Icon\");\n if (document.getElementsByClassName(\"bd-loaderv2\").length) document.getElementsByClassName(\"bd-loaderv2\")[0].remove();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing Main Observer\");\n this.initObserver(); // Show loading errors\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Collecting Startup Errors\");\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showContentErrors({\n plugins: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdpluginErrors\"],\n themes: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemeErrors\"]\n });\n }\n\n const previousVersion = _dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getBDData(\"version\");\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"] > previousVersion) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdChangelog\"]) this.showChangelogModal(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdChangelog\"]);\n _dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].setBDData(\"version\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"]);\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchSocial.bind(this), \"BD Social Patch\")();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchGuildPills.bind(this), \"BD Guild Pills Patch\")();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchGuildListItems.bind(this), \"BD Guild List Items Patch\")();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchGuildSeparator.bind(this), \"BD Guild Separator Patch\")();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchMessageHeader.bind(this), \"BD Badge Chat Patch\")();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(this.patchMemberList.bind(this), \"BD Badge Member List Patch\")();\n};\n\nCore.prototype.checkForGuilds = function () {\n let timesChecked = 0;\n return new Promise(resolve => {\n const checkForGuilds = function () {\n const wrapper = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].guildClasses.wrapper.split(\" \")[0];\n if (document.querySelectorAll(`.${wrapper}`).length > 0) timesChecked++;\n const guild = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].guildClasses.listItem.split(\" \")[0];\n const blob = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].guildClasses.blobContainer.split(\" \")[0];\n if (document.querySelectorAll(`.${wrapper} .${guild} .${blob}`).length > 0) return resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].deferLoaded = true);else if (timesChecked >= 50) return resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].deferLoaded = true);\n setTimeout(checkForGuilds, 100);\n };\n\n if (document.readyState != \"loading\") setTimeout(checkForGuilds, 100);\n document.addEventListener(\"DOMContentLoaded\", () => {\n setTimeout(checkForGuilds, 100);\n });\n });\n};\n\nCore.prototype.injectExternals = async function () {\n await _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addScript(\"ace-script\", \"https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js\");\n if (window.require.original) window.require = window.require.original;\n};\n\nCore.prototype.initSettings = function () {\n _dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].initialize();\n\n if (!_dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getSettingGroup(\"settings\")) {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultCookie\"]);\n _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].saveSettings();\n } else {\n _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].loadSettings();\n\n for (const setting in _0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultCookie\"]) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][setting] == undefined) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][setting] = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultCookie\"][setting];\n _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].saveSettings();\n }\n }\n }\n};\n\nCore.prototype.initObserver = function () {\n const mainObserver = new MutationObserver(mutations => {\n for (let i = 0, mlen = mutations.length; i < mlen; i++) {\n const mutation = mutations[i];\n if (typeof _pluginModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"] !== \"undefined\") _pluginModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"].rawObserver(mutation); // if there was nothing added, skip\n\n if (!mutation.addedNodes.length || !(mutation.addedNodes[0] instanceof Element)) continue;\n const node = mutation.addedNodes[0];\n\n if (node.classList.contains(\"layer-3QrUeG\")) {\n if (node.getElementsByClassName(\"guild-settings-base-section\").length) node.setAttribute(\"layer-id\", \"server-settings\");\n\n if (node.getElementsByClassName(\"socialLinks-3jqNFy\").length) {\n node.setAttribute(\"layer-id\", \"user-settings\");\n node.setAttribute(\"id\", \"user-settings\");\n if (!document.getElementById(\"bd-settings-sidebar\")) _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].renderSidebar();\n }\n }\n\n if (node.parentElement == document.body && node.querySelector(\"#ace_settingsmenu\")) node.id = \"ace_settingsmenu_container\"; // Emoji Picker\n //node.getElementsByClassName(\"emojiPicker-3m1S-j\").length && !node.querySelector(\".emojiPicker-3m1S-j\").parentElement.classList.contains(\"animatorLeft-1EQxU0\")\n\n if (node.classList.contains(\"layer-v9HyYc\") && node.getElementsByClassName(\"emojiPicker-3m1S-j\").length && !node.querySelector(\".emojiPicker-3m1S-j\").parentElement.classList.contains(\"animatorLeft-1EQxU0\")) _quickEmoteMenu__WEBPACK_IMPORTED_MODULE_3__[\"default\"].obsCallback(node);\n }\n });\n mainObserver.observe(document, {\n childList: true,\n subtree: true\n });\n};\n\nCore.prototype.showChangelogModal = function (options = {}) {\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showChangelogModal(options);\n};\n\nCore.prototype.alert = function (title, content) {\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(title, content);\n};\n\nCore.prototype.patchSocial = function () {\n if (this.socialPatch) return;\n const TabBar = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.displayName == \"TabBar\");\n const Anchor = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.displayName == \"Anchor\");\n if (!TabBar) return;\n this.socialPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(TabBar.prototype, \"render\", {\n after: data => {\n const children = data.returnValue.props.children;\n if (!children || !children.length || children.length < 3) return;\n if (children[children.length - 3].type.displayName !== \"Separator\") return;\n if (!children[children.length - 2].type.toString().includes(\"socialLinks\")) return;\n\n if (Anchor) {\n const original = children[children.length - 2].type;\n\n const newOne = function () {\n const returnVal = original(...arguments);\n returnVal.props.children.push(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"BandagedBD\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(Anchor, {\n className: \"bd-social-link\",\n href: \"https://github.com/rauenzi/BetterDiscordApp\",\n title: \"BandagedBD\",\n target: \"_blank\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_bdLogo__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n size: \"16px\",\n className: \"bd-social-logo\"\n }))));\n return returnVal;\n };\n\n children[children.length - 2].type = newOne;\n }\n\n const injector = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(\"div\", {\n className: \"colorMuted-HdFt4q size12-3cLvbJ\"\n }, `Injector ${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].version}`);\n const versionHash = `(${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].hash ? _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].hash.substring(0, 7) : _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].branch})`;\n const additional = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(\"div\", {\n className: \"colorMuted-HdFt4q size12-3cLvbJ\"\n }, `BBD ${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"]} `, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(\"span\", {\n className: \"versionHash-2gXjIB da-versionHash\"\n }, versionHash));\n const originalVersions = children[children.length - 1].type;\n\n children[children.length - 1].type = function () {\n const returnVal = originalVersions(...arguments);\n returnVal.props.children.splice(returnVal.props.children.length - 1, 0, injector);\n returnVal.props.children.splice(1, 0, additional);\n return returnVal;\n };\n }\n });\n};\n\nconst getGuildClasses = function () {\n const guildsWrapper = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"wrapper\", \"unreadMentionsBar\");\n const guilds = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"guildsError\", \"selected\");\n const pill = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"blobContainer\");\n return Object.assign({}, guildsWrapper, guilds, pill);\n};\n\nCore.prototype.patchGuildListItems = function () {\n if (this.guildListItemsPatch) return;\n const GuildClasses = getGuildClasses();\n const listItemClass = GuildClasses.listItem.split(\" \")[0];\n const blobClass = GuildClasses.blobContainer.split(\" \")[0];\n const reactInstance = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getInternalInstance(document.querySelector(`.${listItemClass} .${blobClass}`).parentElement);\n const GuildComponent = reactInstance.return.type;\n if (!GuildComponent) return;\n this.guildListItemsPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(GuildComponent.prototype, \"render\", {\n after: data => {\n if (data.returnValue && data.thisObject) {\n const returnValue = data.returnValue;\n const guildData = data.thisObject.props;\n returnValue.props.className += \" bd-guild\";\n if (guildData.unread) returnValue.props.className += \" bd-unread\";\n if (guildData.selected) returnValue.props.className += \" bd-selected\";\n if (guildData.audio) returnValue.props.className += \" bd-audio\";\n if (guildData.video) returnValue.props.className += \" bd-video\";\n if (guildData.badge) returnValue.props.className += \" bd-badge\";\n if (guildData.animatable) returnValue.props.className += \" bd-animatable\";\n return returnValue;\n }\n }\n });\n};\n\nCore.prototype.patchGuildPills = function () {\n if (this.guildPillPatch) return;\n const guildPill = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.default && !m.default.displayName && m.default.toString && m.default.toString().includes(\"translate3d\"));\n if (!guildPill) return;\n this.guildPillPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(guildPill, \"default\", {\n after: data => {\n const props = data.methodArguments[0];\n if (props.unread) data.returnValue.props.className += \" bd-unread\";\n if (props.selected) data.returnValue.props.className += \" bd-selected\";\n if (props.hovered) data.returnValue.props.className += \" bd-hovered\";\n return data.returnValue;\n }\n });\n};\n\nCore.prototype.patchGuildSeparator = function () {\n if (this.guildSeparatorPatch) return;\n const Guilds = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByDisplayName(\"Guilds\");\n const guildComponents = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"renderListItem\");\n if (!guildComponents || !Guilds) return;\n\n const GuildSeparator = function () {\n const returnValue = guildComponents.Separator(...arguments);\n returnValue.props.className += \" bd-guild-separator\";\n return returnValue;\n };\n\n this.guildSeparatorPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(Guilds.prototype, \"render\", {\n after: data => {\n data.returnValue.props.children[1].props.children[3].type = GuildSeparator;\n }\n });\n};\n\nCore.prototype.patchMessageHeader = function () {\n if (this.messageHeaderPatch) return;\n const MessageHeader = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"MessageTimestamp\");\n const Anchor = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.displayName == \"Anchor\");\n if (!Anchor || !MessageHeader || !MessageHeader.default) return;\n this.messageHeaderPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(MessageHeader, \"default\", {\n after: data => {\n const author = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNestedProp(data.methodArguments[0], \"message.author\"); // const header = Utils.getNestedProp(data.returnValue, \"props.children.1.props\");\n\n const children = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNestedProp(data.returnValue, \"props.children.1.props.children.1.props.children\");\n if (!children || !author || !author.id || author.id !== \"249746236008169473\") return; // if (header && header.className) header.className += \" \"\n\n if (!Array.isArray(children)) return;\n children.push(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"BandagedBD Developer\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(Anchor, {\n className: \"bd-chat-badge\",\n href: \"https://github.com/rauenzi/BetterDiscordApp\",\n title: \"BandagedBD\",\n target: \"_blank\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_bdLogo__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n size: \"16px\",\n className: \"bd-logo\"\n }))));\n }\n });\n};\n\nCore.prototype.patchMemberList = function () {\n if (this.memberListPatch) return;\n const MemberListItem = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByDisplayName(\"MemberListItem\");\n const Anchor = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.displayName == \"Anchor\");\n if (!Anchor || !MemberListItem || !MemberListItem.prototype || !MemberListItem.prototype.renderDecorators) return;\n this.memberListPatch = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].monkeyPatch(MemberListItem.prototype, \"renderDecorators\", {\n after: data => {\n const user = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNestedProp(data.thisObject, \"props.user\");\n const children = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNestedProp(data.returnValue, \"props.children\");\n if (!children || !user || !user.id || user.id !== \"249746236008169473\") return;\n if (!Array.isArray(children)) return;\n children.push(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"BandagedBD Developer\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(Anchor, {\n className: \"bd-member-badge\",\n href: \"https://github.com/rauenzi/BetterDiscordApp\",\n title: \"BandagedBD\",\n target: \"_blank\"\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(_ui_bdLogo__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n size: \"16px\",\n className: \"bd-logo\"\n }))));\n }\n });\n};\n\nCore.prototype.updateInjector = async function () {\n const injectionPath = _dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].injectionPath;\n if (!injectionPath) return false;\n\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const path = __webpack_require__(/*! path */ \"path\");\n\n const rmrf = __webpack_require__(/*! rimraf */ \"rimraf\");\n\n const yauzl = __webpack_require__(/*! yauzl */ \"yauzl\");\n\n const mkdirp = __webpack_require__(/*! mkdirp */ \"mkdirp\");\n\n const request = __webpack_require__(/*! request */ \"request\");\n\n const parentPath = path.resolve(injectionPath, \"..\");\n const folderName = path.basename(injectionPath);\n const zipLink = \"https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip\";\n const savedZip = path.resolve(parentPath, \"injector.zip\");\n const extractedFolder = path.resolve(parentPath, \"BetterDiscordApp-injector\"); // Download the injector zip file\n\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Downloading \" + zipLink);\n let success = await new Promise(resolve => {\n request.get({\n url: zipLink,\n encoding: null\n }, async (error, response, body) => {\n if (error || response.statusCode !== 200) return resolve(false); // Save a backup in case someone has their own copy\n\n const alreadyExists = await new Promise(res => fs.exists(savedZip, res));\n if (alreadyExists) await new Promise(res => fs.rename(savedZip, `${savedZip}.bak${Math.round(performance.now())}`, res));\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Writing \" + savedZip);\n fs.writeFile(savedZip, body, err => resolve(!err));\n });\n });\n if (!success) return success; // Check and delete rename extraction\n\n const alreadyExists = await new Promise(res => fs.exists(extractedFolder, res));\n if (alreadyExists) await new Promise(res => fs.rename(extractedFolder, `${extractedFolder}.bak${Math.round(performance.now())}`, res)); // Unzip the downloaded zip file\n\n const zipfile = await new Promise(r => yauzl.open(savedZip, {\n lazyEntries: true\n }, (err, zip) => r(zip)));\n zipfile.on(\"entry\", function (entry) {\n // Skip directories, they are handled with mkdirp\n if (entry.fileName.endsWith(\"/\")) return zipfile.readEntry();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Extracting \" + entry.fileName); // Make any needed parent directories\n\n const fullPath = path.resolve(parentPath, entry.fileName);\n mkdirp.sync(path.dirname(fullPath));\n zipfile.openReadStream(entry, function (err, readStream) {\n if (err) return success = false;\n readStream.on(\"end\", function () {\n zipfile.readEntry();\n }); // Go to next file after this\n\n readStream.pipe(fs.createWriteStream(fullPath));\n });\n });\n zipfile.readEntry(); // Start reading\n // Wait for the final file to finish\n\n await new Promise(resolve => zipfile.once(\"end\", resolve)); // Save a backup in case something goes wrong during final step\n\n const backupFolder = path.resolve(parentPath, `${folderName}.bak${Math.round(performance.now())}`);\n await new Promise(resolve => fs.rename(injectionPath, backupFolder, resolve)); // Rename the extracted folder to what it should be\n\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", `Renaming ${path.basename(extractedFolder)} to ${folderName}`);\n success = await new Promise(resolve => fs.rename(extractedFolder, injectionPath, err => resolve(!err)));\n\n if (!success) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Failed to rename the final directory\");\n return success;\n } // If rename had issues, delete what we tried to rename and restore backup\n\n\n if (!success) {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Something went wrong... restoring backups.\");\n await new Promise(resolve => rmrf(extractedFolder, resolve));\n await new Promise(resolve => fs.rename(backupFolder, injectionPath, resolve));\n return success;\n } // If we've gotten to this point, everything should have gone smoothly.\n // Cleanup the backup folder then remove the zip\n\n\n await new Promise(resolve => rmrf(backupFolder, resolve));\n await new Promise(resolve => fs.unlink(savedZip, resolve));\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Injector Updated!\");\n return success;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new Core());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jb3JlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9tb2R1bGVzL2NvcmUuanM/MTNjMiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBiZENvbmZpZywgbWluU3VwcG9ydGVkVmVyc2lvbiwgYmJkVmVyc2lvbiwgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2luRXJyb3JzLCBiZHRoZW1lRXJyb3JzLCBiYmRDaGFuZ2Vsb2csIGRlZmF1bHRDb29raWUsIGN1cnJlbnREaXNjb3JkVmVyc2lvbiB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5pbXBvcnQgZW1vdGVNb2R1bGUgZnJvbSBcIi4vZW1vdGVNb2R1bGVcIjtcbmltcG9ydCBxdWlja0Vtb3RlTWVudSBmcm9tIFwiLi9xdWlja0Vtb3RlTWVudVwiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmltcG9ydCBzZXR0aW5nc1BhbmVsIGZyb20gXCIuL3NldHRpbmdzUGFuZWxcIjtcbmltcG9ydCBwbHVnaW5Nb2R1bGUgZnJvbSBcIi4vcGx1Z2luTW9kdWxlXCI7XG5pbXBvcnQgdGhlbWVNb2R1bGUgZnJvbSBcIi4vdGhlbWVN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5sZW5ndGggLSAyXS50eXBlO1xuXG4gICAgICAgIGNvbnN0IG5ld09uZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBjb25zdCByZXR1cm5WYWwgPSBvcmlnaW5hbCguLi5hcmd1bWVudHMpO1xuICAgICAgICAgIHJldHVyblZhbC5wcm9wcy5jaGlsZHJlbi5wdXNoKEJEVjIuUmVhY3QuY3JlYXRlRWxlbWVudChUb29sdGlwV3JhcCwge1xuICAgICAgICAgICAgY29sb3I6IFwiYmxhY2tcIixcbiAgICAgICAgICAgIHNpZGU6IFwidG9wXCIsXG4gICAgICAgICAgICB0ZXh0OiBcIkJhbmRhZ2VkQkRcIlxuICAgICAgICAgIH0sIEJEVjIuUmVhY3QuY3JlYXRlRWxlbWVudChBbmNob3IsIHtcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJiZC1zb2NpYWwtbGlua1wiLFxuICAgICAgICAgICAgaHJlZjogXCJodHRwczovL2dpdGh1Yi5jb20vcmF1ZW56aS9CZXR0ZXJEaXNjb3JkQXBwXCIsXG4gICAgICAgICAgICB0aXRsZTogXCJCYW5kYWdlZEJEXCIsXG4gICAgICAgICAgICB0YXJnZXQ6IFwiX2JsYW5rXCJcbiAgICAgICAgICB9LCBCRFYyLlJlYWN0LmNyZWF0ZUVsZW1lbnQoQkRMb2dvLCB7XG4gICAgICAgICAgICBzaXplOiBcIjE2cHhcIixcbiAgICAgICAgICAgIGNsYXNzTmFtZTogXCJiZC1zb2NpYWwtbG9nb1wiXG4gICAgICAgICAgfSkpKSk7XG4gICAgICAgICAgcmV0dXJuIHJldHVyblZhbDtcbiAgICAgICAgfTtcblxuICAgICAgICBjaGlsZHJlbltjaGlsZHJlbi5sZW5ndGggLSAyXS50eXBlID0gbmV3T25lO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpbmplY3RvciA9IEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICAgIGNsYXNzTmFtZTogXCJjb2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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/core.js\n"); /***/ }), /***/ "./src/modules/dataStore.js": /*!**********************************!*\ !*** ./src/modules/dataStore.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n\n\n\n\nconst fs = __webpack_require__(/*! fs */ \"fs\");\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst releaseChannel = DiscordNative.globals.releaseChannel;\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class DataStore {\n constructor() {\n this.data = {\n settings: {\n stable: {},\n canary: {},\n ptb: {}\n }\n };\n this.pluginData = {};\n }\n\n initialize() {\n try {\n if (!fs.existsSync(this.BDFile)) fs.writeFileSync(this.BDFile, JSON.stringify(this.data, null, 4));\n\n const data = require(this.BDFile);\n\n if (data.hasOwnProperty(\"settings\")) this.data = data;\n if (!fs.existsSync(this.settingsFile)) return;\n\n let settings = require(this.settingsFile);\n\n fs.unlinkSync(this.settingsFile);\n if (settings.hasOwnProperty(\"settings\")) settings = Object.assign({\n stable: {},\n canary: {},\n ptb: {}\n }, {\n [releaseChannel]: settings\n });else settings = Object.assign({\n stable: {},\n canary: {},\n ptb: {}\n }, settings);\n this.setBDData(\"settings\", settings);\n } catch (err) {\n console.error(err);\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Corrupt Storage\", \"The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.\");\n }\n }\n\n get injectionPath() {\n if (this._injectionPath) return this._injectionPath;\n\n const electron = __webpack_require__(/*! electron */ \"electron\").remote.app;\n\n const base = electron.getAppPath();\n const roamingBase = electron.getPath(\"userData\");\n const roamingLocation = path.resolve(roamingBase, electron.getVersion(), \"modules\", \"discord_desktop_core\", \"injector\");\n const location = path.resolve(base, \"..\", \"app\");\n const realLocation = fs.existsSync(location) ? location : fs.existsSync(roamingLocation) ? roamingLocation : null;\n if (!realLocation) return this._injectionPath = null;\n return this._injectionPath = realLocation;\n }\n\n get configFile() {\n return this._configFile || (this._configFile = path.resolve(this.injectionPath, \"betterdiscord\", \"config.json\"));\n }\n\n get BDFile() {\n return this._BDFile || (this._BDFile = path.resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath, \"bdstorage.json\"));\n }\n\n get settingsFile() {\n return this._settingsFile || (this._settingsFile = path.resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath, \"bdsettings.json\"));\n }\n\n getPluginFile(pluginName) {\n return path.resolve(_contentManager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].pluginsFolder, pluginName + \".config.json\");\n }\n\n getSettingGroup(key) {\n return this.data.settings[releaseChannel][key] || null;\n }\n\n setSettingGroup(key, data) {\n this.data.settings[releaseChannel][key] = data;\n fs.writeFileSync(this.BDFile, JSON.stringify(this.data, null, 4));\n }\n\n getBDData(key) {\n return this.data[key] || \"\";\n }\n\n setBDData(key, value) {\n this.data[key] = value;\n fs.writeFileSync(this.BDFile, JSON.stringify(this.data, null, 4));\n }\n\n getPluginData(pluginName, key) {\n if (this.pluginData[pluginName] !== undefined) return this.pluginData[pluginName][key] || undefined;\n if (!fs.existsSync(this.getPluginFile(pluginName))) return undefined;\n this.pluginData[pluginName] = JSON.parse(fs.readFileSync(this.getPluginFile(pluginName)));\n return this.pluginData[pluginName][key] || undefined;\n }\n\n setPluginData(pluginName, key, value) {\n if (value === undefined) return;\n if (this.pluginData[pluginName] === undefined) this.pluginData[pluginName] = {};\n this.pluginData[pluginName][key] = value;\n fs.writeFileSync(this.getPluginFile(pluginName), JSON.stringify(this.pluginData[pluginName], null, 4));\n }\n\n deletePluginData(pluginName, key) {\n if (this.pluginData[pluginName] === undefined) this.pluginData[pluginName] = {};\n delete this.pluginData[pluginName][key];\n fs.writeFileSync(this.getPluginFile(pluginName), JSON.stringify(this.pluginData[pluginName], null, 4));\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9kYXRhU3RvcmUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvZGF0YVN0b3JlLmpzPzg1ZGIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmRDb25maWcgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IENvbnRlbnRNYW5hZ2VyIGZyb20gXCIuL2NvbnRlbnRNYW5hZ2VyXCI7XG5cbmNvbnN0IGZzID0gcmVxdWlyZShcImZzXCIpO1xuXG5jb25zdCBwYXRoID0gcmVxdWlyZShcInBhdGh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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/dataStore.js\n"); /***/ }), /***/ "./src/modules/devMode.js": /*!********************************!*\ !*** ./src/modules/devMode.js ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class DevMode {\n constructor() {\n this.debugListener = this.debugListener.bind(this);\n this.copySelectorListener = this.copySelectorListener.bind(this);\n }\n\n start() {\n this.startDebugListener();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]) this.startCopySelector();\n }\n\n stop() {\n this.stopDebugListener();\n this.stopCopySelector();\n }\n\n startDebugListener() {\n this.stopDebugListener();\n document.addEventListener(\"keydown\", this.debugListener);\n }\n\n stopDebugListener() {\n document.removeEventListener(\"keydown\", this.debugListener);\n }\n\n startCopySelector() {\n this.stopCopySelector();\n document.addEventListener(\"contextmenu\", this.copySelectorListener);\n }\n\n stopCopySelector() {\n document.removeEventListener(\"contextmenu\", this.copySelectorListener);\n }\n\n debugListener(e) {\n if (e.which === 119 || e.which == 118) {\n //F8\n console.log(\"%c[%cDevMode%c] %cBreak/Resume\", \"color: red;\", \"color: #303030; font-weight:700;\", \"color:red;\", \"\");\n debugger; // eslint-disable-line no-debugger\n\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n }\n\n copySelectorListener(e) {\n e.stopPropagation();\n const selector = this.getSelector(e.target);\n\n function attach() {\n let cm = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].query(\".contextMenu-HLZMGh\");\n\n if (!cm) {\n const container = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].query(\"#app-mount\");\n const cmWrap = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(`
`);\n cm = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(`
`);\n cmWrap.append(cm);\n container.append(cmWrap);\n cmWrap.style.top = e.clientY + \"px\";\n cmWrap.style.left = e.clientX + \"px\";\n cmWrap.style.zIndex = \"1002\";\n\n const removeCM = function (e) {\n if (e.keyCode && e.keyCode !== 27) return;\n cmWrap.remove();\n document.removeEventListener(\"click\", removeCM);\n document.removeEventListener(\"contextmenu\", removeCM);\n document.removeEventListener(\"keyup\", removeCM);\n };\n\n document.addEventListener(\"click\", removeCM);\n document.addEventListener(\"contextmenu\", removeCM);\n document.addEventListener(\"keyup\", removeCM);\n }\n\n const cmg = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(`
`);\n const cmi = _domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(`
`);\n cmi.append(_domtools__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(`
Copy Selector
`));\n cmi.addEventListener(\"click\", () => {\n _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].NativeModule.copy(selector);\n cm.style.display = \"none\";\n });\n cmg.append(cmi);\n cm.append(cmg);\n }\n\n setImmediate(attach);\n }\n\n getSelector(element) {\n if (element.id) return `#${element.id}`;\n const rules = this.getRules(element);\n const latestRule = rules[rules.length - 1];\n if (latestRule) return latestRule.selectorText;else if (element.classList.length) return `.${Array.from(element.classList).join(\".\")}`;\n return `.${Array.from(element.parentElement.classList).join(\".\")}`;\n }\n\n getRules(element, css = element.ownerDocument.styleSheets) {\n //if (window.getMatchedCSSRules) return window.getMatchedCSSRules(element);\n const sheets = [...css].filter(s => !s.href || !s.href.includes(\"BetterDiscordApp\"));\n const rules = sheets.map(s => [...(s.cssRules || [])]).flat();\n const elementRules = rules.filter(r => r && r.selectorText && element.matches(r.selectorText) && r.style.length && r.selectorText.split(\", \").length < 8 && !r.selectorText.split(\", \").includes(\"*\"));\n return elementRules;\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9kZXZNb2RlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9tb2R1bGVzL2Rldk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QUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/devMode.js\n"); /***/ }), /***/ "./src/modules/domtools.js": /*!*********************************!*\ !*** ./src/modules/domtools.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DOMTools; });\n/**\r\n * Copyright 2018 Zachary Rauen\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining\r\n * a copy of this software and associated documentation files (the \"Software\"),\r\n * to deal in the Software without restriction, including without limitation the\r\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is furnished\r\n * to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\r\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\r\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\r\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n * \r\n * From: https://github.com/rauenzi/BDPluginLibrary\r\n */\n\n/**\r\n * @interface\r\n * @name Offset\r\n * @property {number} top - Top offset of the target element.\r\n * @property {number} right - Right offset of the target element.\r\n * @property {number} bottom - Bottom offset of the target element.\r\n * @property {number} left - Left offset of the target element.\r\n * @property {number} height - Outer height of the target element.\r\n * @property {number} width - Outer width of the target element.\r\n */\n\n/**\r\n* Function that automatically removes added listener.\r\n* @callback module:DOMTools~CancelListener\r\n*/\nclass DOMTools {\n static escapeID(id) {\n return id.replace(/^[^a-z]+|[^\\w-]+/gi, \"-\");\n }\n /**\r\n * Adds a style to the document.\r\n * @param {string} id - identifier to use as the element id\r\n * @param {string} css - css to add to the document\r\n */\n\n\n static addStyle(id, css) {\n document.head.append(DOMTools.createElement(``));\n }\n /**\r\n * Removes a style from the document.\r\n * @param {string} id - original identifier used\r\n */\n\n\n static removeStyle(id) {\n const element = document.getElementById(id);\n if (element) element.remove();\n }\n /**\r\n * Adds/requires a remote script to be loaded\r\n * @param {string} id - identifier to use for this script\r\n * @param {string} url - url from which to load the script\r\n * @returns {Promise} promise that resolves when the script is loaded\r\n */\n\n\n static addScript(id, url) {\n return new Promise(resolve => {\n const script = document.createElement(\"script\");\n script.id = id;\n script.src = url;\n script.type = \"text/javascript\";\n script.onload = resolve;\n document.head.append(script);\n });\n }\n /**\r\n * Removes a remote script from the document.\r\n * @param {string} id - original identifier used\r\n */\n\n\n static removeScript(id) {\n id = this.escapeID(id);\n const element = document.getElementById(id);\n if (element) element.remove();\n } // https://javascript.info/js-animation\n\n\n static animate({\n timing = _ => _,\n update,\n duration\n }) {\n const start = performance.now();\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1; // calculate the current animation state\n\n const progress = timing(timeFraction);\n update(progress); // draw it\n\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n }\n });\n }\n /**\r\n * This is my shit version of not having to use `$` from jQuery. Meaning\r\n * that you can pass a selector and it will automatically run {@link module:DOMTools.query}.\r\n * It also means that you can pass a string of html and it will perform and return `parseHTML`.\r\n * @see module:DOMTools.parseHTML\r\n * @see module:DOMTools.query\r\n * @param {string} selector - Selector to query or HTML to parse\r\n * @returns {(DocumentFragment|NodeList|HTMLElement)} - Either the result of `parseHTML` or `query`\r\n */\n\n\n static Q(selector) {\n const element = this.parseHTML(selector);\n const isHTML = element instanceof NodeList ? Array.from(element).some(n => n.nodeType === 1) : element.nodeType === 1;\n if (isHTML) return element;\n return this.query(selector);\n }\n /**\r\n * Essentially a shorthand for `document.querySelector`. If the `baseElement` is not provided\r\n * `document` is used by default.\r\n * @param {string} selector - Selector to query\r\n * @param {Element} [baseElement] - Element to base the query from\r\n * @returns {(Element|null)} - The found element or null if not found\r\n */\n\n\n static query(selector, baseElement) {\n if (!baseElement) baseElement = document;\n return baseElement.querySelector(selector);\n }\n /**\r\n * Essentially a shorthand for `document.querySelectorAll`. If the `baseElement` is not provided\r\n * `document` is used by default.\r\n * @param {string} selector - Selector to query\r\n * @param {Element} [baseElement] - Element to base the query from\r\n * @returns {Array} - Array of all found elements\r\n */\n\n\n static queryAll(selector, baseElement) {\n if (!baseElement) baseElement = document;\n return baseElement.querySelectorAll(selector);\n }\n /**\r\n * Parses a string of HTML and returns the results. If the second parameter is true,\r\n * the parsed HTML will be returned as a document fragment {@see https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment}.\r\n * This is extremely useful if you have a list of elements at the top level, they can then be appended all at once to another node.\r\n * \r\n * If the second parameter is false, then the return value will be the list of parsed\r\n * nodes and there were multiple top level nodes, otherwise the single node is returned.\r\n * @param {string} html - HTML to be parsed\r\n * @param {boolean} [fragment=false] - Whether or not the return should be the raw `DocumentFragment`\r\n * @returns {(DocumentFragment|NodeList|HTMLElement)} - The result of HTML parsing\r\n */\n\n\n static parseHTML(html, fragment = false) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n const node = template.content.cloneNode(true);\n if (fragment) return node;\n return node.childNodes.length > 1 ? node.childNodes : node.childNodes[0];\n }\n /** Alternate name for {@link module:DOMTools.parseHTML} */\n\n\n static createElement(html, fragment = false) {\n return this.parseHTML(html, fragment);\n }\n /**\r\n * Takes a string of html and escapes it using the brower's own escaping mechanism.\r\n * @param {String} html - html to be escaped\r\n */\n\n\n static escapeHTML(html) {\n const textNode = document.createTextNode(\"\");\n const spanElement = document.createElement(\"span\");\n spanElement.append(textNode);\n textNode.nodeValue = html;\n return spanElement.innerHTML;\n }\n /**\r\n * Adds a list of classes from the target element.\r\n * @param {Element} element - Element to edit classes of\r\n * @param {...string} classes - Names of classes to add\r\n * @returns {Element} - `element` to allow for chaining\r\n */\n\n\n static addClass(element, ...classes) {\n classes = classes.flat().filter(c => c);\n\n for (let c = 0; c < classes.length; c++) classes[c] = classes[c].toString().split(\" \");\n\n classes = classes.flat().filter(c => c);\n element.classList.add(...classes);\n return element;\n }\n /**\r\n * Removes a list of classes from the target element.\r\n * @param {Element} element - Element to edit classes of\r\n * @param {...string} classes - Names of classes to remove\r\n * @returns {Element} - `element` to allow for chaining\r\n */\n\n\n static removeClass(element, ...classes) {\n for (let c = 0; c < classes.length; c++) classes[c] = classes[c].toString().split(\" \");\n\n classes = classes.flat().filter(c => c);\n element.classList.remove(...classes);\n return element;\n }\n /**\r\n * When only one argument is present: Toggle class value;\r\n * i.e., if class exists then remove it and return false, if not, then add it and return true.\r\n * When a second argument is present:\r\n * If the second argument evaluates to true, add specified class value, and if it evaluates to false, remove it.\r\n * @param {Element} element - Element to edit classes of\r\n * @param {string} classname - Name of class to toggle\r\n * @param {boolean} [indicator] - Optional indicator for if the class should be toggled\r\n * @returns {Element} - `element` to allow for chaining\r\n */\n\n\n static toggleClass(element, classname, indicator) {\n classname = classname.toString().split(\" \").filter(c => c);\n if (typeof indicator !== \"undefined\") classname.forEach(c => element.classList.toggle(c, indicator));else classname.forEach(c => element.classList.toggle(c));\n return element;\n }\n /**\r\n * Checks if an element has a specific class\r\n * @param {Element} element - Element to edit classes of\r\n * @param {string} classname - Name of class to check\r\n * @returns {boolean} - `true` if the element has the class, `false` otherwise.\r\n */\n\n\n static hasClass(element, classname) {\n return classname.toString().split(\" \").filter(c => c).every(c => element.classList.contains(c));\n }\n /**\r\n * Replaces one class with another\r\n * @param {Element} element - Element to edit classes of\r\n * @param {string} oldName - Name of class to replace\r\n * @param {string} newName - New name for the class\r\n * @returns {Element} - `element` to allow for chaining\r\n */\n\n\n static replaceClass(element, oldName, newName) {\n element.classList.replace(oldName, newName);\n return element;\n }\n /**\r\n * Appends `thisNode` to `thatNode`\r\n * @param {Node} thisNode - Node to be appended to another node\r\n * @param {Node} thatNode - Node for `thisNode` to be appended to\r\n * @returns {Node} - `thisNode` to allow for chaining\r\n */\n\n\n static appendTo(thisNode, thatNode) {\n if (typeof thatNode == \"string\") thatNode = this.query(thatNode);\n if (!thatNode) return null;\n thatNode.append(thisNode);\n return thisNode;\n }\n /**\r\n * Prepends `thisNode` to `thatNode`\r\n * @param {Node} thisNode - Node to be prepended to another node\r\n * @param {Node} thatNode - Node for `thisNode` to be prepended to\r\n * @returns {Node} - `thisNode` to allow for chaining\r\n */\n\n\n static prependTo(thisNode, thatNode) {\n if (typeof thatNode == \"string\") thatNode = this.query(thatNode);\n if (!thatNode) return null;\n thatNode.prepend(thisNode);\n return thisNode;\n }\n /**\r\n * Insert after a specific element, similar to jQuery's `thisElement.insertAfter(otherElement)`.\r\n * @param {Node} thisNode - The node to insert\r\n * @param {Node} targetNode - Node to insert after in the tree\r\n * @returns {Node} - `thisNode` to allow for chaining\r\n */\n\n\n static insertAfter(thisNode, targetNode) {\n targetNode.parentNode.insertBefore(thisNode, targetNode.nextSibling);\n return thisNode;\n }\n /**\r\n * Insert after a specific element, similar to jQuery's `thisElement.after(newElement)`.\r\n * @param {Node} thisNode - The node to insert\r\n * @param {Node} newNode - Node to insert after in the tree\r\n * @returns {Node} - `thisNode` to allow for chaining\r\n */\n\n\n static after(thisNode, newNode) {\n thisNode.parentNode.insertBefore(newNode, thisNode.nextSibling);\n return thisNode;\n }\n /**\r\n * Gets the next sibling element that matches the selector.\r\n * @param {Element} element - Element to get the next sibling of\r\n * @param {string} [selector=\"\"] - Optional selector\r\n * @returns {Element} - The sibling element\r\n */\n\n\n static next(element, selector = \"\") {\n return selector ? element.querySelector(\"+ \" + selector) : element.nextElementSibling;\n }\n /**\r\n * Gets all subsequent siblings.\r\n * @param {Element} element - Element to get next siblings of\r\n * @returns {NodeList} - The list of siblings\r\n */\n\n\n static nextAll(element) {\n return element.querySelectorAll(\"~ *\");\n }\n /**\r\n * Gets the subsequent siblings until an element matches the selector.\r\n * @param {Element} element - Element to get the following siblings of\r\n * @param {string} selector - Selector to stop at\r\n * @returns {Array} - The list of siblings\r\n */\n\n\n static nextUntil(element, selector) {\n const next = [];\n\n while (element.nextElementSibling && !element.nextElementSibling.matches(selector)) next.push(element = element.nextElementSibling);\n\n return next;\n }\n /**\r\n * Gets the previous sibling element that matches the selector.\r\n * @param {Element} element - Element to get the previous sibling of\r\n * @param {string} [selector=\"\"] - Optional selector\r\n * @returns {Element} - The sibling element\r\n */\n\n\n static previous(element, selector = \"\") {\n const previous = element.previousElementSibling;\n if (selector) return previous && previous.matches(selector) ? previous : null;\n return previous;\n }\n /**\r\n * Gets all preceeding siblings.\r\n * @param {Element} element - Element to get preceeding siblings of\r\n * @returns {NodeList} - The list of siblings\r\n */\n\n\n static previousAll(element) {\n const previous = [];\n\n while (element.previousElementSibling) previous.push(element = element.previousElementSibling);\n\n return previous;\n }\n /**\r\n * Gets the preceeding siblings until an element matches the selector.\r\n * @param {Element} element - Element to get the preceeding siblings of\r\n * @param {string} selector - Selector to stop at\r\n * @returns {Array} - The list of siblings\r\n */\n\n\n static previousUntil(element, selector) {\n const previous = [];\n\n while (element.previousElementSibling && !element.previousElementSibling.matches(selector)) previous.push(element = element.previousElementSibling);\n\n return previous;\n }\n /**\r\n * Find which index in children a certain node is. Similar to jQuery's `$.index()`\r\n * @param {HTMLElement} node - The node to find its index in parent\r\n * @returns {number} Index of the node\r\n */\n\n\n static indexInParent(node) {\n const children = node.parentNode.childNodes;\n let num = 0;\n\n for (let i = 0; i < children.length; i++) {\n if (children[i] == node) return num;\n if (children[i].nodeType == 1) num++;\n }\n\n return -1;\n }\n /** Shorthand for {@link module:DOMTools.indexInParent} */\n\n\n static index(node) {\n return this.indexInParent(node);\n }\n /**\r\n * Gets the parent of the element if it matches the selector,\r\n * otherwise returns null.\r\n * @param {Element} element - Element to get parent of\r\n * @param {string} [selector=\"\"] - Selector to match parent\r\n * @returns {(Element|null)} - The sibling element or null\r\n */\n\n\n static parent(element, selector = \"\") {\n return !selector || element.parentElement.matches(selector) ? element.parentElement : null;\n }\n /**\r\n * Gets all children of Element that match the selector if provided.\r\n * @param {Element} element - Element to get all children of\r\n * @param {string} selector - Selector to match the children to\r\n * @returns {Array} - The list of children\r\n */\n\n\n static findChild(element, selector) {\n return element.querySelector(\":scope > \" + selector);\n }\n /**\r\n * Gets all children of Element that match the selector if provided.\r\n * @param {Element} element - Element to get all children of\r\n * @param {string} selector - Selector to match the children to\r\n * @returns {Array} - The list of children\r\n */\n\n\n static findChildren(element, selector) {\n return element.querySelectorAll(\":scope > \" + selector);\n }\n /**\r\n * Gets all ancestors of Element that match the selector if provided.\r\n * @param {Element} element - Element to get all parents of\r\n * @param {string} [selector=\"\"] - Selector to match the parents to\r\n * @returns {Array} - The list of parents\r\n */\n\n\n static parents(element, selector = \"\") {\n const parents = [];\n if (selector) while (element.parentElement && element.parentElement.closest(selector)) parents.push(element = element.parentElement.closest(selector));else while (element.parentElement) parents.push(element = element.parentElement);\n return parents;\n }\n /**\r\n * Gets the ancestors until an element matches the selector.\r\n * @param {Element} element - Element to get the ancestors of\r\n * @param {string} selector - Selector to stop at\r\n * @returns {Array} - The list of parents\r\n */\n\n\n static parentsUntil(element, selector) {\n const parents = [];\n\n while (element.parentElement && !element.parentElement.matches(selector)) parents.push(element = element.parentElement);\n\n return parents;\n }\n /**\r\n * Gets all siblings of the element that match the selector.\r\n * @param {Element} element - Element to get all siblings of\r\n * @param {string} [selector=\"*\"] - Selector to match the siblings to\r\n * @returns {Array} - The list of siblings\r\n */\n\n\n static siblings(element, selector = \"*\") {\n return Array.from(element.parentElement.children).filter(e => e != element && e.matches(selector));\n }\n /**\r\n * Sets or gets css styles for a specific element. If `value` is provided\r\n * then it sets the style and returns the element to allow for chaining,\r\n * otherwise returns the style. \r\n * @param {Element} element - Element to set the CSS of\r\n * @param {string} attribute - Attribute to get or set\r\n * @param {string} [value] - Value to set for attribute\r\n * @returns {Element|string} - When setting a value, element is returned for chaining, otherwise the value is returned.\r\n */\n\n\n static css(element, attribute, value) {\n if (typeof value == \"undefined\") return global.getComputedStyle(element)[attribute];\n element.style[attribute] = value;\n return element;\n }\n /**\r\n * Sets or gets the width for a specific element. If `value` is provided\r\n * then it sets the width and returns the element to allow for chaining,\r\n * otherwise returns the width. \r\n * @param {Element} element - Element to set the CSS of\r\n * @param {string} [value] - Width to set\r\n * @returns {Element|string} - When setting a value, element is returned for chaining, otherwise the value is returned.\r\n */\n\n\n static width(element, value) {\n if (typeof value == \"undefined\") return parseInt(getComputedStyle(element).width);\n element.style.width = value;\n return element;\n }\n /**\r\n * Sets or gets the height for a specific element. If `value` is provided\r\n * then it sets the height and returns the element to allow for chaining,\r\n * otherwise returns the height. \r\n * @param {Element} element - Element to set the CSS of\r\n * @param {string} [value] - Height to set\r\n * @returns {Element|string} - When setting a value, element is returned for chaining, otherwise the value is returned.\r\n */\n\n\n static height(element, value) {\n if (typeof value == \"undefined\") return parseInt(getComputedStyle(element).height);\n element.style.height = value;\n return element;\n }\n /**\r\n * Sets the inner text of an element if given a value, otherwise returns it.\r\n * @param {Element} element - Element to set the text of\r\n * @param {string} [text] - Content to set\r\n * @returns {string} - Either the string set by this call or the current text content of the node.\r\n */\n\n\n static text(element, text) {\n if (typeof text == \"undefined\") return element.textContent;\n return element.textContent = text;\n }\n /**\r\n * Returns the innerWidth of the element.\r\n * @param {Element} element - Element to retrieve inner width of\r\n * @return {number} - The inner width of the element.\r\n */\n\n\n static innerWidth(element) {\n return element.clientWidth;\n }\n /**\r\n * Returns the innerHeight of the element.\r\n * @param {Element} element - Element to retrieve inner height of\r\n * @return {number} - The inner height of the element.\r\n */\n\n\n static innerHeight(element) {\n return element.clientHeight;\n }\n /**\r\n * Returns the outerWidth of the element.\r\n * @param {Element} element - Element to retrieve outer width of\r\n * @return {number} - The outer width of the element.\r\n */\n\n\n static outerWidth(element) {\n return element.offsetWidth;\n }\n /**\r\n * Returns the outerHeight of the element.\r\n * @param {Element} element - Element to retrieve outer height of\r\n * @return {number} - The outer height of the element.\r\n */\n\n\n static outerHeight(element) {\n return element.offsetHeight;\n }\n /**\r\n * Gets the offset of the element in the page.\r\n * @param {Element} element - Element to get offset of\r\n * @return {Offset} - The offset of the element\r\n */\n\n\n static offset(element) {\n return element.getBoundingClientRect();\n }\n\n static get listeners() {\n return this._listeners || (this._listeners = {});\n }\n /**\r\n * This is similar to jQuery's `on` function and can *hopefully* be used in the same way.\r\n * \r\n * Rather than attempt to explain, I'll show some example usages.\r\n * \r\n * The following will add a click listener (in the `myPlugin` namespace) to `element`.\r\n * `DOMTools.on(element, \"click.myPlugin\", () => {console.log(\"clicked!\");});`\r\n * \r\n * The following will add a click listener (in the `myPlugin` namespace) to `element` that only fires when the target is a `.block` element.\r\n * `DOMTools.on(element, \"click.myPlugin\", \".block\", () => {console.log(\"clicked!\");});`\r\n * \r\n * The following will add a click listener (without namespace) to `element`.\r\n * `DOMTools.on(element, \"click\", () => {console.log(\"clicked!\");});`\r\n * \r\n * The following will add a click listener (without namespace) to `element` that only fires once.\r\n * `const cancel = DOMTools.on(element, \"click\", () => {console.log(\"fired!\"); cancel();});`\r\n * \r\n * @param {Element} element - Element to add listener to\r\n * @param {string} event - Event to listen to with option namespace (e.g. \"event.namespace\")\r\n * @param {(string|callable)} delegate - Selector to run on element to listen to\r\n * @param {callable} [callback] - Function to fire on event\r\n * @returns {module:DOMTools~CancelListener} - A function that will undo the listener\r\n */\n\n\n static on(element, event, delegate, callback) {\n const [type, namespace] = event.split(\".\");\n const hasDelegate = delegate && callback;\n if (!callback) callback = delegate;\n const eventFunc = !hasDelegate ? callback : function (event) {\n if (event.target.matches(delegate)) {\n callback(event);\n }\n };\n element.addEventListener(type, eventFunc);\n\n const cancel = () => {\n element.removeEventListener(type, eventFunc);\n };\n\n if (namespace) {\n if (!this.listeners[namespace]) this.listeners[namespace] = [];\n\n const newCancel = () => {\n cancel();\n this.listeners[namespace].splice(this.listeners[namespace].findIndex(l => l.event == type && l.element == element), 1);\n };\n\n this.listeners[namespace].push({\n event: type,\n element: element,\n cancel: newCancel\n });\n return newCancel;\n }\n\n return cancel;\n }\n /**\r\n * Functionality for this method matches {@link module:DOMTools.on} but automatically cancels itself\r\n * and removes the listener upon the first firing of the desired event.\r\n * \r\n * @param {Element} element - Element to add listener to\r\n * @param {string} event - Event to listen to with option namespace (e.g. \"event.namespace\")\r\n * @param {(string|callable)} delegate - Selector to run on element to listen to\r\n * @param {callable} [callback] - Function to fire on event\r\n * @returns {module:DOMTools~CancelListener} - A function that will undo the listener\r\n */\n\n\n static once(element, event, delegate, callback) {\n const [type, namespace] = event.split(\".\");\n const hasDelegate = delegate && callback;\n if (!callback) callback = delegate;\n const eventFunc = !hasDelegate ? function (event) {\n callback(event);\n element.removeEventListener(type, eventFunc);\n } : function (event) {\n if (!event.target.matches(delegate)) return;\n callback(event);\n element.removeEventListener(type, eventFunc);\n };\n element.addEventListener(type, eventFunc);\n\n const cancel = () => {\n element.removeEventListener(type, eventFunc);\n };\n\n if (namespace) {\n if (!this.listeners[namespace]) this.listeners[namespace] = [];\n\n const newCancel = () => {\n cancel();\n this.listeners[namespace].splice(this.listeners[namespace].findIndex(l => l.event == type && l.element == element), 1);\n };\n\n this.listeners[namespace].push({\n event: type,\n element: element,\n cancel: newCancel\n });\n return newCancel;\n }\n\n return cancel;\n }\n\n static __offAll(event, element) {\n const [type, namespace] = event.split(\".\");\n\n let matchFilter = listener => listener.event == type,\n defaultFilter = _ => _;\n\n if (element) matchFilter = l => l.event == type && l.element == element, defaultFilter = l => l.element == element;\n const listeners = this.listeners[namespace] || [];\n const list = type ? listeners.filter(matchFilter) : listeners.filter(defaultFilter);\n\n for (let c = 0; c < list.length; c++) list[c].cancel();\n }\n /**\r\n * This is similar to jQuery's `off` function and can *hopefully* be used in the same way.\r\n * \r\n * Rather than attempt to explain, I'll show some example usages.\r\n * \r\n * The following will remove a click listener called `onClick` (in the `myPlugin` namespace) from `element`.\r\n * `DOMTools.off(element, \"click.myPlugin\", onClick);`\r\n * \r\n * The following will remove a click listener called `onClick` (in the `myPlugin` namespace) from `element` that only fired when the target is a `.block` element.\r\n * `DOMTools.off(element, \"click.myPlugin\", \".block\", onClick);`\r\n * \r\n * The following will remove a click listener (without namespace) from `element`.\r\n * `DOMTools.off(element, \"click\", onClick);`\r\n * \r\n * The following will remove all listeners in namespace `myPlugin` from `element`.\r\n * `DOMTools.off(element, \".myPlugin\");`\r\n * \r\n * The following will remove all click listeners in namespace `myPlugin` from *all elements*.\r\n * `DOMTools.off(\"click.myPlugin\");`\r\n * \r\n * The following will remove all listeners in namespace `myPlugin` from *all elements*.\r\n * `DOMTools.off(\".myPlugin\");`\r\n * \r\n * @param {(Element|string)} element - Element to remove listener from\r\n * @param {string} [event] - Event to listen to with option namespace (e.g. \"event.namespace\")\r\n * @param {(string|callable)} [delegate] - Selector to run on element to listen to\r\n * @param {callable} [callback] - Function to fire on event\r\n * @returns {Element} - The original element to allow for chaining\r\n */\n\n\n static off(element, event, delegate, callback) {\n if (typeof element == \"string\") return this.__offAll(element);\n const [type, namespace] = event.split(\".\");\n if (namespace) return this.__offAll(event, element);\n const hasDelegate = delegate && callback;\n if (!callback) callback = delegate;\n const eventFunc = !hasDelegate ? callback : function (event) {\n if (event.target.matches(delegate)) {\n callback(event);\n }\n };\n element.removeEventListener(type, eventFunc);\n return element;\n }\n /**\r\n * Adds a listener for when the node is added/removed from the document body.\r\n * The listener is automatically removed upon firing.\r\n * @param {HTMLElement} node - node to wait for\r\n * @param {callable} callback - function to be performed on event\r\n * @param {boolean} onMount - determines if it should fire on Mount or on Unmount\r\n */\n\n\n static onMountChange(node, callback, onMount = true) {\n const wrappedCallback = () => {\n this.observer.unsubscribe(wrappedCallback);\n callback();\n };\n\n this.observer.subscribe(wrappedCallback, mutation => {\n const nodes = Array.from(onMount ? mutation.addedNodes : mutation.removedNodes);\n const directMatch = nodes.indexOf(node) > -1;\n const parentMatch = nodes.some(parent => parent.contains(node));\n return directMatch || parentMatch;\n });\n return node;\n }\n /** Shorthand for {@link module:DOMTools.onMountChange} with third parameter `true` */\n\n\n static onMount(node, callback) {\n return this.onMountChange(node, callback);\n }\n /** Shorthand for {@link module:DOMTools.onMountChange} with third parameter `false` */\n\n\n static onUnmount(node, callback) {\n return this.onMountChange(node, callback, false);\n }\n /** Alias for {@link module:DOMTools.onMount} */\n\n\n static onAdded(node, callback) {\n return this.onMount(node, callback);\n }\n /** Alias for {@link module:DOMTools.onUnmount} */\n\n\n static onRemoved(node, callback) {\n return this.onUnmount(node, callback, false);\n }\n /**\r\n * Helper function which combines multiple elements into one parent element\r\n * @param {Array} elements - array of elements to put into a single parent\r\n */\n\n\n static wrap(elements) {\n const domWrapper = this.parseHTML(`
`);\n\n for (let e = 0; e < elements.length; e++) domWrapper.appendChild(elements[e]);\n\n return domWrapper;\n }\n /**\r\n * Resolves the node to an HTMLElement. This is mainly used by library modules.\r\n * @param {(jQuery|Element)} node - node to resolve\r\n */\n\n\n static resolveElement(node) {\n if (!(node instanceof jQuery) && !(node instanceof Element)) return undefined;\n return node instanceof jQuery ? node[0] : node;\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9kb210b29scy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9kb210b29scy5qcz82ODdkIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiBDb3B5cmlnaHQgMjAxOCBaYWNoYXJ5IFJhdWVuXHJcbiAqXHJcbiAqIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZ1xyXG4gKiBhIGNvcHkgb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgXCJTb2Z0d2FyZVwiKSxcclxuICogdG8gZGVhbCBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGVcclxuICogcmlnaHRzIHRvIHVzZSwgY29weS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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/domtools.js\n"); /***/ }), /***/ "./src/modules/emoteModule.js": /*!************************************!*\ !*** ./src/modules/emoteModule.js ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _ui_bdEmote__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/bdEmote */ \"./src/ui/bdEmote.js\");\n\n\n\n\n\n\nfunction EmoteModule() {\n Object.defineProperty(this, \"categories\", {\n get: function () {\n const cats = [];\n\n for (const current in _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmoteSettingIDs\"]) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmoteSettingIDs\"][current]]) cats.push(current);\n }\n\n return cats;\n }\n });\n}\n\nEmoteModule.prototype.init = async function () {\n this.modifiers = [\"flip\", \"spin\", \"pulse\", \"spin2\", \"spin3\", \"1spin\", \"2spin\", \"3spin\", \"tr\", \"bl\", \"br\", \"shake\", \"shake2\", \"shake3\", \"flap\"];\n this.overrides = [\"twitch\", \"bttv\", \"ffz\"];\n const emoteInfo = {\n TwitchGlobal: {\n url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_twitch_global.json`,\n variable: \"TwitchGlobal\",\n oldVariable: \"emotesTwitch\",\n getEmoteURL: e => `https://static-cdn.jtvnw.net/emoticons/v1/${e}/1.0`\n },\n TwitchSubscriber: {\n url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_twitch_subscriber.json`,\n variable: \"TwitchSubscriber\",\n oldVariable: \"subEmotesTwitch\",\n getEmoteURL: e => `https://static-cdn.jtvnw.net/emoticons/v1/${e}/1.0`\n },\n FrankerFaceZ: {\n url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_ffz.json`,\n variable: \"FrankerFaceZ\",\n oldVariable: \"emotesFfz\",\n getEmoteURL: e => `https://cdn.frankerfacez.com/emoticon/${e}/1`\n },\n BTTV: {\n url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_bttv.json`,\n variable: \"BTTV\",\n oldVariable: \"emotesBTTV\",\n getEmoteURL: e => `https://cdn.betterttv.net/emote/${e}/1x`\n },\n BTTV2: {\n url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_bttv2.json`,\n variable: \"BTTV2\",\n oldVariable: \"emotesBTTV2\",\n getEmoteURL: e => `https://cdn.betterttv.net/emote/${e}/1x`\n }\n };\n await this.getBlacklist();\n await this.loadEmoteData(emoteInfo);\n\n while (!_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].MessageComponent) await new Promise(resolve => setTimeout(resolve, 100));\n\n if (this.cancelEmoteRender) return;\n this.cancelEmoteRender = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].MessageComponent, \"default\", {\n before: ({\n methodArguments\n }) => {\n const nodes = methodArguments[0].childrenMessageContent.props.content;\n if (!nodes || !nodes.length) return;\n\n for (let n = 0; n < nodes.length; n++) {\n const node = nodes[n];\n if (typeof node !== \"string\") continue;\n const words = node.split(/([^\\s]+)([\\s]|$)/g);\n\n for (let c = 0, clen = this.categories.length; c < clen; c++) {\n for (let w = 0, wlen = words.length; w < wlen; w++) {\n const emote = words[w];\n const emoteSplit = emote.split(\":\");\n const emoteName = emoteSplit[0];\n let emoteModifier = emoteSplit[1] ? emoteSplit[1] : \"\";\n let emoteOverride = emoteModifier.slice(0);\n if (emoteName.length < 4 || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bemotes\"].includes(emoteName)) continue;\n if (!this.modifiers.includes(emoteModifier) || !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-es-8\"]) emoteModifier = \"\";\n if (!this.overrides.includes(emoteOverride)) emoteOverride = \"\";else emoteModifier = emoteOverride;\n let current = this.categories[c];\n\n if (emoteOverride === \"twitch\") {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchGlobal[emoteName]) current = \"TwitchGlobal\";else if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchSubscriber[emoteName]) current = \"TwitchSubscriber\";\n } else if (emoteOverride === \"bttv\") {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].BTTV[emoteName]) current = \"BTTV\";else if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].BTTV2[emoteName]) current = \"BTTV2\";\n } else if (emoteOverride === \"ffz\") {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].FrankerFaceZ[emoteName]) current = \"FrankerFaceZ\";\n }\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"][current][emoteName] || !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmoteSettingIDs\"][current]]) continue;\n const results = nodes[n].match(new RegExp(`([\\\\s]|^)${_utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].escape(emoteModifier ? emoteName + \":\" + emoteModifier : emoteName)}([\\\\s]|$)`));\n if (!results) continue;\n const pre = nodes[n].substring(0, results.index + results[1].length);\n const post = nodes[n].substring(results.index + results[0].length - results[2].length);\n nodes[n] = pre;\n const emoteComponent = _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_ui_bdEmote__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n name: emoteName,\n url: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"][current][emoteName],\n modifier: emoteModifier\n });\n nodes.splice(n + 1, 0, post);\n nodes.splice(n + 1, 0, emoteComponent);\n }\n }\n }\n\n const onlyEmotes = nodes.every(r => {\n if (typeof r == \"string\" && r.replace(/\\s*/, \"\") == \"\") return true;else if (r.type && r.type.name == \"BDEmote\") return true;else if (r.props && r.props.children && r.props.children.props && r.props.children.props.emojiName) return true;\n return false;\n });\n if (!onlyEmotes) return;\n\n for (const node of nodes) {\n if (typeof node != \"object\") continue;\n if (node.type.name == \"BDEmote\") node.props.jumboable = true;else if (node.props && node.props.children && node.props.children.props && node.props.children.props.emojiName) node.props.children.props.jumboable = true;\n }\n }\n });\n};\n\nEmoteModule.prototype.disable = function () {\n if (this.cancelEmoteRender) return;\n this.cancelEmoteRender();\n this.cancelEmoteRender = null;\n};\n\nEmoteModule.prototype.clearEmoteData = async function () {\n const _fs = __webpack_require__(/*! fs */ \"fs\");\n\n const emoteFile = \"emote_data.json\";\n const file = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath + emoteFile;\n\n const exists = _fs.existsSync(file);\n\n if (exists) _fs.unlinkSync(file);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setBDData(\"emoteCacheDate\", new Date().toJSON());\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"], {\n TwitchGlobal: {},\n TwitchSubscriber: {},\n BTTV: {},\n FrankerFaceZ: {},\n BTTV2: {}\n });\n};\n\nEmoteModule.prototype.isCacheValid = function () {\n const cacheLength = _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBDData(\"emoteCacheDays\") || _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setBDData(\"emoteCacheDays\", 7) || 7;\n const cacheDate = new Date(_dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBDData(\"emoteCacheDate\") || null);\n const currentDate = new Date();\n const daysBetween = Math.round(Math.abs((currentDate.getTime() - cacheDate.getTime()) / (24 * 60 * 60 * 1000)));\n\n if (daysBetween > cacheLength) {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setBDData(\"emoteCacheDate\", currentDate.toJSON());\n return false;\n }\n\n return true;\n};\n\nEmoteModule.prototype.loadEmoteData = async function (emoteInfo) {\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const emoteFile = \"emote_data.json\";\n const file = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].dataPath + emoteFile;\n const exists = await new Promise(r => fs.exists(file, r));\n\n if (exists && this.isCacheValid()) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].showToast(\"Loading emotes from cache.\", {\n type: \"info\"\n });\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].log(\"Emotes\", \"Loading emotes from local cache.\");\n const data = await new Promise(resolve => {\n fs.readFile(file, \"utf8\", (err, data) => {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].log(\"Emotes\", \"Emote file read.\");\n if (err) data = {};\n resolve(data);\n });\n });\n const parsed = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].testJSON(data);\n let isValid = !!parsed;\n if (isValid) Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"], parsed);\n\n for (const e in emoteInfo) {\n isValid = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"][emoteInfo[e].variable]).length > 0;\n }\n\n if (isValid) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].showToast(\"Emotes successfully loaded.\", {\n type: \"success\"\n });\n return;\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].log(\"Emotes\", \"Cache was corrupt, downloading...\");\n await new Promise(r => fs.unlink(file, r));\n }\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-es-3\"]) return;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].showToast(\"Downloading emotes in the background do not reload.\", {\n type: \"info\"\n });\n\n for (const e in emoteInfo) {\n await new Promise(r => setTimeout(r, 1000));\n const data = await this.downloadEmotes(emoteInfo[e]);\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"][emoteInfo[e].variable] = data;\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].showToast(\"All emotes successfully downloaded.\", {\n type: \"success\"\n });\n\n try {\n await new Promise(r => fs.writeFile(file, JSON.stringify(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"]), \"utf8\", r));\n } catch (err) {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"Emotes\", \"Could not save emote data.\", err);\n }\n};\n\nEmoteModule.prototype.downloadEmotes = function (emoteMeta) {\n const request = __webpack_require__(/*! request */ \"request\");\n\n const options = {\n url: emoteMeta.url,\n timeout: emoteMeta.timeout ? emoteMeta.timeout : 5000,\n json: true\n };\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].log(\"Emotes\", `Downloading: ${emoteMeta.variable} (${emoteMeta.url})`);\n return new Promise((resolve, reject) => {\n request(options, (error, response, parsedData) => {\n if (error) {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"Emotes\", \"Could not download \" + emoteMeta.variable, error);\n\n if (emoteMeta.backup) {\n emoteMeta.url = emoteMeta.backup;\n emoteMeta.backup = null;\n if (emoteMeta.backupParser) emoteMeta.parser = emoteMeta.backupParser;\n return resolve(this.downloadEmotes(emoteMeta));\n }\n\n return reject({});\n }\n\n if (typeof emoteMeta.parser === \"function\") parsedData = emoteMeta.parser(parsedData);\n\n for (const emote in parsedData) {\n if (emote.length < 4 || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bemotes\"].includes(emote)) {\n delete parsedData[emote];\n continue;\n }\n\n parsedData[emote] = emoteMeta.getEmoteURL(parsedData[emote]);\n }\n\n resolve(parsedData);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].log(\"Emotes\", \"Downloaded: \" + emoteMeta.variable);\n });\n });\n};\n\nEmoteModule.prototype.getBlacklist = function () {\n return new Promise(resolve => {\n __webpack_require__(/*! request */ \"request\").get({\n url: \"https://rauenzi.github.io/BetterDiscordApp/data/emotefilter.json\",\n json: true\n }, function (err, resp, data) {\n if (err) return resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bemotes\"]);\n resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bemotes\"].splice(0, 0, ...data.blacklist));\n });\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new EmoteModule());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9lbW90ZU1vZHVsZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9lbW90ZU1vZHVsZS5qcz9hMzdmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJkQ29uZmlnLCBzZXR0aW5nc0Nvb2tpZSwgYmVtb3RlcywgYmRFbW90ZVNldHRpbmdJRHMsIGJkRW1vdGVzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IEJERW1vdGUgZnJvbSBcIi4uL3VpL2JkRW1vdGVcIjtcblxuZnVuY3Rpb24gRW1vdGVNb2R1bGUoKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/emoteModule.js\n"); /***/ }), /***/ "./src/modules/pluginModule.js": /*!*************************************!*\ !*** ./src/modules/pluginModule.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\n\n\n\nclass PluginModule {\n get folder() {\n return _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].pluginsFolder;\n }\n\n}\n\nPluginModule.prototype.loadPlugins = function () {\n this.loadPluginData();\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdpluginErrors\"].splice(0, 0, ..._contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadPlugins());\n const plugins = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]);\n\n for (let i = 0; i < plugins.length; i++) {\n let plugin, name;\n\n try {\n plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].plugin;\n name = plugin.getName();\n if (plugin.load && typeof plugin.load == \"function\") plugin.load();\n } catch (err) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name] = false;\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", name + \" could not be loaded.\", err);\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdpluginErrors\"].push({\n name: name,\n file: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].filename,\n message: \"load() could not be fired.\",\n error: {\n message: err.message,\n stack: err.stack\n }\n });\n continue;\n }\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name]) _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name] = false;\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name]) {\n try {\n plugin.start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin.getName()} v${plugin.getVersion()} has started.`);\n } catch (err) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name] = false;\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", name + \" could not be started.\", err);\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdpluginErrors\"].push({\n name: name,\n file: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].filename,\n message: \"start() could not be fired.\",\n error: {\n message: err.message,\n stack: err.stack\n }\n });\n }\n }\n }\n\n this.savePluginData();\n\n __webpack_require__(/*! electron */ \"electron\").remote.getCurrentWebContents().on(\"did-navigate-in-page\", this.channelSwitch.bind(this)); // if (settingsCookie[\"fork-ps-5\"]) ContentManager.watchContent(\"plugin\");\n\n};\n\nPluginModule.prototype.startPlugin = function (plugin, reload = false) {\n try {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getName()} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} has started.`);\n } catch (err) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getName()} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} could not be started.`, {\n type: \"error\"\n });\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin] = false;\n this.savePluginData();\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", plugin + \" could not be started.\", err);\n }\n};\n\nPluginModule.prototype.stopPlugin = function (plugin, reload = false) {\n try {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.stop();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getName()} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} has stopped.`);\n } catch (err) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getName()} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} could not be stopped.`, {\n type: \"error\"\n });\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getName() + \" could not be stopped.\", err);\n }\n};\n\nPluginModule.prototype.enablePlugin = function (plugin, reload = false) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin]) return;\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin] = true;\n this.savePluginData();\n this.startPlugin(plugin, reload);\n};\n\nPluginModule.prototype.enable = function (plugin, reload = false) {\n return this.enablePlugin(plugin, reload);\n};\n\nPluginModule.prototype.disablePlugin = function (plugin, reload = false) {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin]) return;\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin] = false;\n this.savePluginData();\n this.stopPlugin(plugin, reload);\n};\n\nPluginModule.prototype.disable = function (plugin, reload = false) {\n return this.disablePlugin(plugin, reload);\n};\n\nPluginModule.prototype.togglePlugin = function (plugin) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin]) this.disablePlugin(plugin);else this.enablePlugin(plugin);\n};\n\nPluginModule.prototype.toggle = function (plugin, reload = false) {\n return this.togglePlugin(plugin, reload);\n};\n\nPluginModule.prototype.loadPlugin = function (filename) {\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadContent(filename, \"plugin\");\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n plugins: [error]\n });\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${filename} could not be loaded.`, {\n type: \"error\"\n });\n return _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"ContentManager\", `${filename} could not be loaded.`, error);\n }\n\n const plugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).find(p => p.filename == filename).plugin;\n\n try {\n if (plugin.load && typeof plugin.load == \"function\") plugin.load();\n } catch (err) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n plugins: [err]\n });\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${plugin.getName()} v${plugin.getVersion()} was loaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin.getName()} v${plugin.getVersion()} was loaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"plugin-loaded\", plugin.getName());\n};\n\nPluginModule.prototype.unloadPlugin = function (filenameOrName) {\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][filenameOrName];\n if (!bdplugin) return;\n const plugin = bdplugin.plugin.getName();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin]) this.disablePlugin(plugin, true);\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].unloadContent(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].filename, \"plugin\");\n delete _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin];\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n plugins: [error]\n });\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin} could not be unloaded. It may have not been loaded yet.`, {\n type: \"error\"\n });\n return _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"ContentManager\", `${plugin} could not be unloaded. It may have not been loaded yet.`, error);\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${plugin} was unloaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin} was unloaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"plugin-unloaded\", plugin);\n};\n\nPluginModule.prototype.delete = function (filenameOrName) {\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][filenameOrName];\n if (!bdplugin) return;\n this.unloadPlugin(bdplugin.filename);\n\n const fullPath = __webpack_require__(/*! path */ \"path\").resolve(_contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].pluginsFolder, bdplugin.filename);\n\n __webpack_require__(/*! fs */ \"fs\").unlinkSync(fullPath);\n};\n\nPluginModule.prototype.reloadPlugin = function (filenameOrName) {\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][filenameOrName];\n if (!bdplugin) return this.loadPlugin(filenameOrName);\n const plugin = bdplugin.plugin.getName();\n const enabled = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin];\n if (enabled) this.stopPlugin(plugin, true);\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reloadContent(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].filename, \"plugin\");\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n plugins: [error]\n });\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin} could not be reloaded.`, {\n type: \"error\"\n });\n return _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"ContentManager\", `${plugin} could not be reloaded.`, error);\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.load && typeof _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.load == \"function\") _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.load();\n if (enabled) this.startPlugin(plugin, true);\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${plugin} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} was reloaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${plugin} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin.getVersion()} was reloaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"plugin-reloaded\", plugin);\n};\n\nPluginModule.prototype.reload = function (name) {\n return this.reloadPlugin(name);\n};\n\nPluginModule.prototype.edit = function (filenameOrName) {\n console.log(\"Edit \" + filenameOrName);\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][filenameOrName];\n if (!bdplugin) return;\n\n const fullPath = __webpack_require__(/*! path */ \"path\").resolve(_contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].pluginsFolder, bdplugin.filename);\n\n console.log(\"Edit \" + fullPath);\n\n __webpack_require__(/*! electron */ \"electron\").shell.openItem(`${fullPath}`);\n};\n\nPluginModule.prototype.updatePluginList = function () {\n const results = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadNewContent(\"plugin\");\n\n for (const filename of results.added) this.loadPlugin(filename);\n\n for (const name of results.removed) this.unloadPlugin(name);\n};\n\nPluginModule.prototype.loadPluginData = function () {\n const saved = _dataStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSettingGroup(\"plugins\");\n\n if (saved) {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"], saved);\n }\n};\n\nPluginModule.prototype.savePluginData = function () {\n _dataStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setSettingGroup(\"plugins\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"]);\n};\n\nPluginModule.prototype.newMessage = function () {\n const plugins = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]);\n\n for (let i = 0; i < plugins.length; i++) {\n const plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].plugin;\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin.getName()]) continue;\n\n if (typeof plugin.onMessage === \"function\") {\n try {\n plugin.onMessage();\n } catch (err) {\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", \"Unable to fire onMessage for \" + plugin.getName() + \".\", err);\n }\n }\n }\n};\n\nPluginModule.prototype.channelSwitch = function () {\n const plugins = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]);\n\n for (let i = 0; i < plugins.length; i++) {\n const plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].plugin;\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin.getName()]) continue;\n\n if (typeof plugin.onSwitch === \"function\") {\n try {\n plugin.onSwitch();\n } catch (err) {\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", \"Unable to fire onSwitch for \" + plugin.getName() + \".\", err);\n }\n }\n }\n};\n\nPluginModule.prototype.rawObserver = function (e) {\n const plugins = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]);\n\n for (let i = 0; i < plugins.length; i++) {\n const plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugins[i]].plugin;\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][plugin.getName()]) continue;\n\n if (typeof plugin.observer === \"function\") {\n try {\n plugin.observer(e);\n } catch (err) {\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"Plugins\", \"Unable to fire observer for \" + plugin.getName() + \".\", err);\n }\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new PluginModule());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9wbHVnaW5Nb2R1bGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2luTW9kdWxlLmpzP2FhN2YiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmRwbHVnaW5FcnJvcnMsIHBsdWdpbkNvb2tpZSwgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2lucyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IENvbnRlbnRNYW5hZ2VyIGZyb20gXCIuL2NvbnRlbnRNYW5hZ2VyXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IEJERXZlbnRzIGZyb20gXCIuL2JkRXZlbnRzXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcblxuY2xhc3MgUGx1Z2luTW9kdWxlIHtcbiAgZ2V0IGZvbGRlcigpIHtcbiAgICByZXR1cm4gQ29udGVudE1hbmFnZXIucGx1Z2luc0ZvbGRlcjtcbiAgfVxuXG59XG5cblBsdWdpbk1vZHVsZS5wcm90b3R5cGUubG9hZFBsdWdpbnMgPSBmdW5jdGlvbiAoKSB7XG4gIHRoaXMubG9hZFBsdWdpbkRhdGEoKTtcbiAgYmRwbHVnaW5FcnJvcnMuc3BsaWNlKDAsIDAsIC4uLkNvbnRlbnRNYW5hZ2VyLmxvYWRQbHVnaW5zKCkpO1xuICBjb25zdCBwbHVnaW5zID0gT2JqZWN0LmtleXMoYmRwbHVnaW5zKTtcblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHBsdWd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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/pluginModule.js\n"); /***/ }), /***/ "./src/modules/publicServers.js": /*!**************************************!*\ !*** ./src/modules/publicServers.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _webpackModules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./webpackModules */ \"./src/modules/webpackModules.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _ui_publicservers_publicServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/publicservers/publicServers */ \"./src/ui/publicservers/publicServers.js\");\n/* harmony import */ var _ui_publicservers_layer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ui/publicservers/layer */ \"./src/ui/publicservers/layer.js\");\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_PublicServers {\n constructor() {\n this._appendButton = this._appendButton.bind(this);\n }\n\n get component() {\n return _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_ui_publicservers_layer__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n rootId: \"pubslayerroot\",\n id: \"pubslayer\"\n }, _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_ui_publicservers_publicServers__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n rootId: \"pubslayerroot\"\n }));\n }\n\n get root() {\n const _root = document.getElementById(\"pubslayerroot\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n const layers = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\".layers, .layers-3iHuyZ\");\n if (!layers) return false;\n layers.append(_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(\"
\"));\n return true;\n }\n\n render() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layers\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactDom.render(this.component, root);\n }\n\n get button() {\n const btn = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
`);\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) btn.style.display = \"none\";\n const label = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
public
`);\n label.addEventListener(\"click\", () => {\n this.render();\n });\n btn.append(label);\n return btn;\n }\n\n _appendButton() {\n if (_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#bd-pub-li\")) return;\n const wrapper = _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].guildClasses.wrapper.split(\" \")[0];\n const guilds = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(`.${wrapper} .scroller-2FKFPG >:first-child`);\n _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].after(guilds, this.button);\n }\n\n addButton() {\n if (this.guildPatch) return;\n const GuildList = _webpackModules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].find(m => m.default && m.default.displayName == \"NavigableGuilds\");\n const GuildListOld = _webpackModules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].findByDisplayName(\"Guilds\");\n if (!GuildList && !GuildListOld) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].warn(\"PublicServer\", \"Can't find GuildList component\");\n this.guildPatch = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].monkeyPatch(GuildList ? GuildList : GuildListOld.prototype, GuildList ? \"default\" : \"render\", {\n after: this._appendButton\n });\n\n this._appendButton();\n }\n\n removeButton() {\n this.guildPatch();\n delete this.guildPatch;\n _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#bd-pub-li\").remove();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9wdWJsaWNTZXJ2ZXJzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9tb2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SIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/publicServers.js\n"); /***/ }), /***/ "./src/modules/quickEmoteMenu.js": /*!***************************************!*\ !*** ./src/modules/quickEmoteMenu.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\n\n\n\n\n\nfunction QuickEmoteMenu() {\n this.switchHandler = this.switchHandler.bind(this);\n this.favContext = this.favContext.bind(this);\n}\n\nconst insertEmote = function (e) {\n const emote = e.target.getAttribute(\"title\");\n const newTextarea = document.querySelector(`.${_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].slateEditorClasses.slateTextArea.split(\" \")[0]}`);\n\n if (newTextarea) {\n const instance = _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getInternalInstance(newTextarea);\n const insert = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getNestedProp(instance, \"memoizedProps.children.props.editor.insertText\");\n if (insert) insert(` ${emote} `);\n } else {\n const ta = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getTextArea();\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].insertText(ta, ta.value.slice(-1) == \" \" ? ta.value + emote : ta.value + \" \" + emote);\n }\n};\n\nconst makeEmote = function (name, url, {\n click = insertEmote,\n contextmenu\n} = {}) {\n const emote = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
\"${name}\"
`);\n if (click) emote.addEventListener(\"click\", click);\n if (contextmenu) emote.addEventListener(\"contextmenu\", contextmenu);\n return emote;\n};\n\nQuickEmoteMenu.prototype.init = function () {\n this.initialized = true;\n this.favoriteEmotes = {};\n const fe = _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBDData(\"bdfavemotes\");\n if (fe !== \"\" && fe !== null) this.favoriteEmotes = JSON.parse(atob(fe));\n this.qmeHeader = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
`);\n this.twitchButton = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(``);\n this.favoriteButton = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(``);\n this.emojiButton = _domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`\n
\n
\n
\n
`);\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].query(\"#app-mount\").append(modal);\n }\n\n static showContentErrors({\n plugins: pluginErrors = [],\n themes: themeErrors = []\n }) {\n if (!pluginErrors || !themeErrors) return;\n if (!pluginErrors.length && !themeErrors.length) return;\n const modal = _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].createElement(`
\n
\n
\n
\n
Content Errors
\n
\n
\n
\n
Plugins
\n
Themes
\n
\n
\n
\n
Name
\n
Message
\n
Error
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
`);\n\n function generateTab(errors) {\n const container = _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].createElement(`
`);\n\n for (const err of errors) {\n const error = _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].createElement(`
\n
${err.name ? err.name : err.file}
\n
${err.message}
\n \n
`);\n container.append(error);\n\n if (err.error) {\n error.querySelectorAll(\"a\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n Utils.err(\"ContentManager\", `Error details for ${err.name ? err.name : err.file}.`, err.error);\n }));\n }\n }\n\n return container;\n }\n\n const tabs = [generateTab(pluginErrors), generateTab(themeErrors)];\n modal.querySelectorAll(\".tab-bar-item\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n const selected = modal.querySelector(\".tab-bar-item.selected\");\n if (selected) _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].removeClass(selected, \"selected\");\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addClass(e.target, \"selected\");\n const scroller = modal.querySelector(\".scroller\");\n scroller.innerHTML = \"\";\n scroller.append(tabs[_domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].index(e.target)]);\n }));\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].query(\"#app-mount\").append(modal);\n if (pluginErrors.length) modal.querySelector(\".tab-bar-item\").click();else modal.querySelectorAll(\".tab-bar-item\")[1].click();\n }\n\n static showChangelogModal(options = {}) {\n const ModalStack = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const ChangelogClasses = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"fixed\", \"improved\");\n const TextElement = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByDisplayName(\"Text\");\n const FlexChild = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"Child\");\n const Titles = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"Tags\", \"default\");\n const Changelog = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].find(m => m.defaultProps && m.defaultProps.selectable == false);\n const MarkdownParser = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"defaultRules\", \"parse\");\n if (!Changelog || !ModalStack || !ChangelogClasses || !TextElement || !FlexChild || !Titles || !MarkdownParser) return;\n const {\n image = \"https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5\",\n description = \"\",\n changes = [],\n title = \"BandagedBD\",\n subtitle = `v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"]}`,\n footer\n } = options;\n const ce = _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].React.createElement;\n const changelogItems = [ce(\"img\", {\n src: image\n })];\n if (description) changelogItems.push(ce(\"p\", null, MarkdownParser.parse(description)));\n\n for (let c = 0; c < changes.length; c++) {\n const entry = changes[c];\n const type = ChangelogClasses[entry.type] ? ChangelogClasses[entry.type] : ChangelogClasses.added;\n const margin = c == 0 ? ChangelogClasses.marginTop : \"\";\n changelogItems.push(ce(\"h1\", {\n className: `${type} ${margin}`\n }, entry.title));\n const list = ce(\"ul\", null, entry.items.map(i => ce(\"li\", null, MarkdownParser.parse(i))));\n changelogItems.push(list);\n }\n\n const renderHeader = function () {\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, ce(Titles.default, {\n tag: Titles.Tags.H4\n }, title), ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD,\n className: ChangelogClasses.date\n }, subtitle));\n };\n\n const renderFooter = () => {\n const Anchor = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].find(m => m.displayName == \"Anchor\");\n const AnchorClasses = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"anchorUnderlineOnHover\") || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n\n const joinSupportServer = click => {\n click.preventDefault();\n click.stopPropagation();\n ModalStack.pop();\n _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].joinBD2();\n };\n\n const supportLink = Anchor ? ce(Anchor, {\n onClick: joinSupportServer\n }, \"Join our Discord Server.\") : ce(\"a\", {\n className: `${AnchorClasses.anchor} ${AnchorClasses.anchorUnderlineOnHover}`,\n onClick: joinSupportServer\n }, \"Join our Discord Server.\");\n const defaultFooter = ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD\n }, \"Need support? \", supportLink);\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, footer ? footer : defaultFooter);\n };\n\n ModalStack.push(function (props) {\n return ce(Changelog, Object.assign({\n className: ChangelogClasses.container,\n selectable: true,\n onScroll: _ => _,\n onClose: _ => _,\n renderHeader: renderHeader,\n renderFooter: renderFooter,\n children: changelogItems\n }, props));\n });\n }\n /**\r\n * Shows a generic but very customizable confirmation modal with optional confirm and cancel callbacks.\r\n * @param {string} title - title of the modal\r\n * @param {(string|ReactElement|Array)} children - a single or mixed array of react elements and strings. Every string is wrapped in Discord's `Markdown` component so strings will show and render properly.\r\n * @param {object} [options] - options to modify the modal\r\n * @param {boolean} [options.danger=false] - whether the main button should be red or not\r\n * @param {string} [options.confirmText=Okay] - text for the confirmation/submit button\r\n * @param {string} [options.cancelText=Cancel] - text for the cancel button\r\n * @param {callable} [options.onConfirm=NOOP] - callback to occur when clicking the submit button\r\n * @param {callable} [options.onCancel=NOOP] - callback to occur when clicking the cancel button\r\n */\n\n\n static showConfirmationModal(title, content, options = {}) {\n const ModalStack = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const Markdown = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByDisplayName(\"Markdown\");\n const ConfirmationModal = _webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].find(m => m.defaultProps && m.key && m.key() == \"confirm-modal\");\n if (!ModalStack || !ConfirmationModal || !Markdown) return Utils.alert(title, content);\n\n const emptyFunction = () => {};\n\n const {\n onConfirm = emptyFunction,\n onCancel = emptyFunction,\n confirmText = \"Okay\",\n cancelText = \"Cancel\",\n danger = false\n } = options;\n if (!Array.isArray(content)) content = [content];\n content = content.map(c => typeof c === \"string\" ? _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].React.createElement(Markdown, null, c) : c);\n ModalStack.push(function (props) {\n return _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].React.createElement(ConfirmationModal, Object.assign({\n header: title,\n children: content,\n red: danger,\n confirmText: confirmText,\n cancelText: cancelText,\n onConfirm: onConfirm,\n onCancel: onCancel\n }, props));\n });\n }\n\n}\nUtils.showToast = Utils.suppressErrors(Utils.showToast, \"Could not show toast.\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy91dGlscy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy91dGlscy5qcz9jMGY3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJiZFZlcnNpb24sIHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgV2VicGFja01vZHVsZXMgZnJvbSBcIi4vd2VicGFja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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRpdGxlXCI+JHt0aXRsZX08L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiZC1tb2RhbC1ib2R5XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXItd3JhcCBmYWRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNjcm9sbGVyXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7Y29udGVudH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZvb3RlciBmb290ZXItMnlmQ2dYIGZvb3Rlci0zckRXZEMgZm9vdGVyLTJnTDFwcFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCI+T2theTwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gKTtcbiAgICBtb2RhbC5xdWVyeVNlbGVjdG9yKFwiLmZvb3RlciBidXR0b25cIikuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsICgpID0+IHtcbiAgICAgIERPT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ICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsLWlubmVyIGlubmVyLTFKZUdWY1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaGVhZGVyIGhlYWRlci0xUl9BakZcIj48ZGl2IGNsYXNzPVwidGl0bGVcIj5Db250ZW50IEVycm9yczwvZGl2PjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYmQtbW9kYWwtYm9keVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYi1iYXItY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYi1iYXIgVE9QXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyLWl0ZW1cIj5QbHVnaW5zPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyLWl0ZW1cIj5UaGVtZXM8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWhlYWRlclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW5hbWVcIj5OYW1lPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbWVzc2FnZVwiPk1lc3NhZ2U8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1lcnJvclwiPkVycm9yPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlci13cmFwIGZhZGVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXJcIj5cbiAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZvb3RlciBmb290ZXItMnlmQ2dYIGZvb3Rlci0zckRXZEMgZm9vdGVyLTJnTDFwcFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCI+T2theTwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gKTtcblxuICAgIGZ1bmN0aW9uIGdlbmVyYXRlVGFiKGVycm9ycykge1xuICAgICAgY29uc3QgY29udGFpbmVyID0gRE9NLmNyZWF0ZUVsZW1lbnQoYDxkaXYgY2xhc3M9XCJlcnJvcnNcIj5gKTtcblxuICAgICAgZm9yIChjb25zdCBlcnIgb2YgZXJyb3JzKSB7XG4gICAgICAgIGNvbnN0IGVycm9yID0gRE9NLmNyZWF0ZUVsZW1lbnQoYDxkaXYgY2xhc3M9XCJlcnJvclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbmFtZVwiPiR7ZXJyLm5hbWUgPyBlcnIubmFtZSA6IGVyci5maWxlfTwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbWVzc2FnZVwiPiR7ZXJyLm1lc3NhZ2V9PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1lcnJvclwiPjxhIGNsYXNzPVwiZXJyb3ItbGlua1wiIGhyZWY9XCJcIj4ke2Vyci5lcnJvciA/IGVyci5lcnJvci5tZXNzYWdlIDogXCJcIn08L2E+PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PmApO1xuICAgICAgICBjb250YWluZXIuYXBwZW5kKGVycm9yKTtcblxuICAgICAgICBpZiAoZXJyLmVycm9yKSB7XG4gICAgICAgICAgZXJyb3IucXVlcnlTZWxlY3RvckFsbChcImFcIikuZm9yRWFjaChlbCA9PiBlbC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgZSA9PiB7XG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBVdGlscy5lcnIoXCJDb250ZW50TWFuYWdlclwiLCBgRXJyb3IgZGV0YWlscyBmb3IgJHtlcnIubmFtZSA/IGVyci5uYW1lIDogZXJyLmZpbGV9LmAsIGVyci5lcnJvcik7XG4gICAgICAgICAgfSkpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBjb250YWluZXI7XG4gICAgfVxuXG4gICA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/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2 {\n constructor() {\n this.editorDetached = false;\n\n this.WebpackModules = (() => {\n const req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n }, [[\"__extra_id__\"]]]);\n delete req.m.__extra_id__;\n delete req.c.__extra_id__;\n\n const shouldProtect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;\n if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;\n return false;\n };\n\n const protect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return null;\n if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;\n const proxy = new Proxy(theModule, {\n getOwnPropertyDescriptor: function (obj, prop) {\n if (prop === \"getToken\" || prop === \"getEmail\" || prop === \"showToken\") return undefined;\n return Object.getOwnPropertyDescriptor(obj, prop);\n },\n get: function (obj, func) {\n if (func == \"getToken\") return () => \"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa\";\n if (func == \"getEmail\") return () => \"puppet11112@gmail.com\";\n if (func == \"showToken\") return () => true; // if (func == \"__proto__\") return proxy;\n\n return obj[func];\n }\n });\n return proxy;\n };\n\n const find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default);\n if (m && filter(m)) return protect(m);\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n };\n\n const findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default));else if (m && filter(m)) modules.push(protect(m));\n }\n }\n\n return modules;\n };\n\n const findByUniqueProperties = propNames => find(module => propNames.every(prop => module[prop] !== undefined));\n\n const findByPrototypes = protoNames => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\n const findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n return {\n find,\n findAll,\n findByUniqueProperties,\n findByPrototypes,\n findByDisplayName\n };\n })();\n\n this.internal = {\n react: this.WebpackModules.findByUniqueProperties([\"Component\", \"PureComponent\", \"Children\", \"createElement\", \"cloneElement\"]),\n reactDom: this.WebpackModules.findByUniqueProperties([\"findDOMNode\"])\n };\n\n this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith(\"__reactInternalInstance\"))];\n }\n\n initialize() {}\n\n joinBD1() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"0Tmfo5ZbORCRqbAd\");\n }\n\n leaveBD1() {\n this.GuildActions.leaveGuild(\"86004744966914048\");\n }\n\n joinBD2() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n }\n\n leaveBD2() {\n this.GuildActions.leaveGuild(\"280806472928198656\");\n }\n\n get react() {\n return this.internal.react;\n }\n\n get React() {\n return this.internal.react;\n }\n\n get reactDom() {\n return this.internal.reactDom;\n }\n\n get ReactDom() {\n return this.internal.reactDom;\n }\n\n get reactComponent() {\n return this.internal.react.Component;\n }\n\n get ReactComponent() {\n return this.internal.react.Component;\n }\n\n get anchorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"anchorUnderlineOnHover\"]) || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n }\n\n get slateEditorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"slateTextArea\"]);\n }\n\n get messageClasses() {\n return this.WebpackModules.findByUniqueProperties([\"message\", \"containerCozy\"]);\n }\n\n get guildClasses() {\n const guildsWrapper = this.WebpackModules.findByUniqueProperties([\"wrapper\", \"unreadMentionsBar\"]);\n const guilds = this.WebpackModules.findByUniqueProperties([\"guildsError\", \"selected\"]);\n const pill = this.WebpackModules.findByUniqueProperties([\"blobContainer\"]);\n return Object.assign({}, guildsWrapper, guilds, pill);\n }\n\n get MessageContentComponent() {\n return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty(\"disableButtons\"));\n }\n\n get MessageComponent() {\n return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == \"Message\");\n }\n\n get TimeFormatter() {\n return this.WebpackModules.findByUniqueProperties([\"dateFormat\"]);\n }\n\n get TooltipWrapper() {\n return this.WebpackModules.findByDisplayName(\"Tooltip\");\n }\n\n get NativeModule() {\n return this.WebpackModules.findByUniqueProperties([\"setBadge\"]);\n }\n\n get InviteActions() {\n return this.WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n }\n\n get GuildActions() {\n return this.WebpackModules.findByUniqueProperties([\"leaveGuild\"]);\n }\n\n get Tooltips() {\n return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);\n }\n\n get KeyGenerator() {\n return this.WebpackModules.find(m => m.toString && /\"binary\"/.test(m.toString()));\n }\n\n get LayerStack() {\n return this.WebpackModules.findByUniqueProperties([\"popLayer\"]);\n }\n\n get UserStore() {\n return this.WebpackModules.findByUniqueProperties([\"getCurrentUser\"]);\n }\n\n get ChannelStore() {\n return this.WebpackModules.findByUniqueProperties([\"getChannel\"]);\n }\n\n get ChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"openPrivateChannel\"]);\n }\n\n get PrivateChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"selectPrivateChannel\"]);\n }\n\n openDM(userId) {\n const selfId = this.UserStore.getCurrentUser().id;\n if (selfId == userId) return;\n const privateChannelId = this.ChannelStore.getDMFromUserId(userId);\n if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);\n this.ChannelActions.openPrivateChannel(selfId, userId);\n }\n\n parseSettings(cat) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === cat && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92Mi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy92Mi5qcz84NTdiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVjIge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmVkaXRvckRldGFjaGVkID0gZmFsc2U7XG5cbiAgICB0aGlzLldlYnBhY2tNb2R1bGVzID0gKCgpID0+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3Qgc2hvdWxkUHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGh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cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/v2.js\n"); /***/ }), /***/ "./src/modules/voiceMode.js": /*!**********************************!*\ !*** ./src/modules/voiceMode.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\nconst style = `\n .container-2Rl01u {\n display: none!important;\n }\n\n .chat-3bRxxu {\n display: none!important;\n }\n\n .sidebar-2K8pFh {\n flex-grow: 1!important;\n }\n`;\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class VoiceMode {\n start() {\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].addStyle(\"VoiceMode\", style);\n }\n\n stop() {\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].removeStyle(\"VoiceMode\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92b2ljZU1vZGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvdm9pY2VNb2RlLmpzP2Y4NDQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERPTSBmcm9tIFwiLi9kb210b29sc1wiO1xuY29uc3Qgc3R5bGUgPSBgXG4gICAgLmNvbnRhaW5lci0yUmwwMXUge1xuICAgICAgICBkaXNwbGF5OiBub25lIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuY2hhdC0zYlJ4eHUge1xuICAgICAgICBkaXNwbGF5OiBub25lIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuc2lkZWJhci0ySzhwRmgge1xuICAgICAgICBmbGV4LWdyb3c6IDEhaW1wb3J0YW50O1xuICAgIH1cbmA7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVm9pY2VNb2RlIHtcbiAgc3RhcnQoKSB7XG4gICAgRE9NLmFkZFN0eWxlKFwiVm9pY2VNb2RlXCIsIHN0eWxlKTtcbiAgfVxuXG4gIHN0b3AoKSB7XG4gICAgRE9NLnJlbW92ZVN0eWxlKFwiVm9pY2VNb2RlXCIpO1xuICB9XG5cbn0oKTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/voiceMode.js\n"); /***/ }), /***/ "./src/modules/webpackModules.js": /*!***************************************!*\ !*** ./src/modules/webpackModules.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nconst req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n}, [[\"__extra_id__\"]]]);\ndelete req.m.__extra_id__;\ndelete req.c.__extra_id__;\n\nconst find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return m.default;\n if (m && filter(m)) return m;\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n};\n\nconst findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(m.default);else if (m && filter(m)) modules.push(m);\n }\n }\n\n return modules;\n};\n\nconst findByProps = (...propNames) => find(module => propNames.every(prop => module[prop] !== undefined));\n\nconst findByPrototypes = (...protoNames) => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\nconst findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n find,\n findAll,\n findByProps,\n findByPrototypes,\n findByDisplayName\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy93ZWJwYWNrTW9kdWxlcy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy93ZWJwYWNrTW9kdWxlcy5qcz9iNDBkIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbn0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG5kZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuY29uc3QgZmluZCA9IGZpbHRlciA9PiB7XG4gIGZvciAoY29uc3QgaSBpbiByZXEuYykge1xuICAgIGlmIChyZXEuYy5oYXNPd25Qcm9wZXJ0eShpKSkge1xuICAgICAgY29uc3QgbSA9IHJlcS5jW2ldLmV4cG9ydHM7XG4gICAgICBpZiAobSAmJiBtLl9fZXNNb2R1bGUgJiYgbS5kZWZhdWx0ICYmIGZpbHRlcihtLmRlZmF1bHQpKSByZXR1cm4gbS5kZWZhdWx0O1xuICAgICAgaWYgKG0gJiYgZmlsdGVyKG0pKSByZXR1cm4gbTtcbiAgICB9XG4gIH0gLy8gY29uc29sZS53YXJuKFwiQ2Fubm90IGZpbmQgbG9hZGVkIG1vZHVsZSBpbiBjYWNoZVwiKTtcblxuXG4gIHJldHVybiBudWxsO1x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E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/webpackModules.js\n"); /***/ }), /***/ "./src/ui/addoncard.jsx": /*!******************************!*\ !*** ./src/ui/addoncard.jsx ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_PluginCard; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _modules_domtools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _xSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./xSvg */ \"./src/ui/xSvg.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _icons_edit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./icons/edit */ \"./src/ui/icons/edit.jsx\");\n/* harmony import */ var _icons_delete__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./icons/delete */ \"./src/ui/icons/delete.jsx\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\n/* harmony import */ var _tooltipWrap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n\n\n\n\n\n\n\n\n\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].React;\nconst anchorClasses = _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].anchorClasses;\nclass V2C_PluginCard extends _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onChange = this.onChange.bind(this);\n this.showSettings = this.showSettings.bind(this);\n this.setInitialState();\n this.hasSettings = this.props.addon.plugin && typeof this.props.addon.plugin.getSettingsPanel === \"function\";\n this.settingsPanel = \"\";\n this.edit = this.edit.bind(this);\n this.delete = this.delete.bind(this);\n this.reload = this.reload.bind(this);\n }\n\n setInitialState() {\n this.state = {\n checked: this.props.enabled,\n settings: false,\n reloads: 0\n };\n }\n\n showSettings() {\n if (!this.hasSettings) return;\n this.setState({\n settings: true\n });\n }\n\n closeSettings() {\n this.panelRef.current.innerHTML = \"\";\n this.setState({\n settingsOpen: false\n });\n }\n\n componentDidUpdate() {\n if (!this.state.settings) return;\n\n if (typeof this.settingsPanel === \"object\") {\n this.refs.settingspanel.appendChild(this.settingsPanel);\n }\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-3\"]) return;\n setImmediate(() => {\n const isHidden = (container, element) => {\n const cTop = container.scrollTop;\n const cBottom = cTop + container.clientHeight;\n const eTop = element.offsetTop;\n const eBottom = eTop + element.clientHeight;\n return eTop < cTop || eBottom > cBottom;\n };\n\n const thisNode = this.refs.cardNode;\n const container = thisNode.closest(\".scroller\");\n if (!isHidden(container, thisNode)) return;\n const thisNodeOffset = _modules_domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].offset(thisNode);\n const containerOffset = _modules_domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].offset(container);\n const original = container.scrollTop;\n const endPoint = thisNodeOffset.top - containerOffset.top + container.scrollTop - 30;\n _modules_domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].animate({\n duration: 300,\n update: function (progress) {\n if (endPoint > original) container.scrollTop = original + progress * (endPoint - original);else container.scrollTop = original - progress * (original - endPoint);\n }\n });\n });\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n get settingsComponent() {\n try {\n this.settingsPanel = this.props.addon.plugin.getSettingsPanel();\n } catch (err) {\n _modules_utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].err(\"Plugins\", \"Unable to get settings panel for \" + this.name + \".\", err);\n }\n\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-card bd-addon-card settings-open ui-switch-item\",\n ref: \"cardNode\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n style: {\n \"float\": \"right\",\n \"cursor\": \"pointer\"\n },\n onClick: () => {\n this.refs.settingspanel.innerHTML = \"\";\n this.setState({\n settings: false\n });\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_xSvg__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null)), typeof this.settingsPanel === \"object\" && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n id: `plugin-settings-${this.name}`,\n className: \"plugin-settings\",\n ref: \"settingspanel\"\n }), typeof this.settingsPanel !== \"object\" && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n id: `plugin-settings-${this.name}`,\n className: \"plugin-settings\",\n ref: \"settingspanel\",\n dangerouslySetInnerHTML: {\n __html: this.settingsPanel\n }\n }));\n }\n\n buildTitle(name, version, author) {\n const title = \"{{name}} v{{version}} by {{author}}\".split(/({{[A-Za-z]+}})/);\n const nameIndex = title.findIndex(s => s == \"{{name}}\");\n if (nameIndex) title[nameIndex] = React.createElement(\"span\", {\n className: \"name bda-name\"\n }, name);\n const versionIndex = title.findIndex(s => s == \"{{version}}\");\n if (nameIndex) title[versionIndex] = React.createElement(\"span\", {\n className: \"version bda-version\"\n }, version);\n const authorIndex = title.findIndex(s => s == \"{{author}}\");\n\n if (nameIndex) {\n const props = {\n className: \"author bda-author\"\n };\n\n if (author.link || author.id) {\n props.className += ` ${anchorClasses.anchor} ${anchorClasses.anchorUnderlineOnHover}`;\n props.target = \"_blank\";\n if (author.link) props.href = author.link;\n if (author.id) props.onClick = () => {\n _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LayerStack.popLayer();\n _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].openDM(author.id);\n };\n }\n\n title[authorIndex] = React.createElement(author.link || author.id ? \"a\" : \"span\", props, author.name);\n }\n\n return title.flat();\n }\n\n makeLink(title, url) {\n const props = {\n className: \"bda-link bda-link-website\",\n target: \"_blank\"\n };\n if (typeof url == \"string\") props.href = url;\n if (typeof url == \"function\") props.onClick = event => {\n event.preventDefault();\n event.stopPropagation();\n url();\n };\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"a\", props, title);\n }\n\n makeButton(title, children, action) {\n return React.createElement(_tooltipWrap__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: title\n }, React.createElement(\"div\", {\n className: \"bd-addon-button\",\n onClick: action\n }, children));\n }\n\n get links() {\n const links = [];\n const addon = this.props.addon;\n if (addon.website) links.push(this.makeLink(\"Website\", addon.website));\n if (addon.source) links.push(this.makeLink(\"Source\", addon.source));\n\n if (addon.invite) {\n links.push(this.makeLink(\"Support Server\", () => {\n const tester = /\\.gg\\/(.*)$/;\n let code = addon.invite;\n if (tester.test(code)) code = code.match(tester)[1];\n _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].LayerStack.popLayer();\n _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].InviteActions.acceptInviteAndTransitionToInviteChannel(code);\n }));\n }\n\n if (addon.donate) links.push(this.makeLink(\"Donate\", addon.donate));\n if (addon.patreon) links.push(this.makeLink(\"Patreon\", addon.patreon));\n return links;\n }\n\n get footer() {\n const links = this.links;\n return (links.length || this.hasSettings) && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-card-footer bda-footer\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"span\", {\n className: \"bd-addon-links bda-links\"\n }, ...links.map((element, index) => index < links.length - 1 ? [element, \" | \"] : element).flat()), this.hasSettings && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"button\", {\n onClick: this.showSettings,\n className: \"bd-button bda-settings-button\",\n disabled: !this.state.checked\n }, \"Settings\"));\n }\n\n onChange() {\n this.props.toggle && this.props.toggle(this.name);\n this.setState({\n checked: !this.state.checked\n });\n }\n\n edit() {\n this.props.edit(this.name);\n }\n\n delete() {\n this.props.remove(this.name);\n }\n\n reload() {\n this.props.reload(this.name);\n }\n\n get name() {\n return this.getString(this.props.addon.plugin ? this.props.addon.plugin.getName() : this.props.addon.name);\n }\n\n get author() {\n return this.getString(this.props.addon.plugin ? this.props.addon.plugin.getAuthor() : this.props.addon.author);\n }\n\n get description() {\n return this.getString(this.props.addon.plugin ? this.props.addon.plugin.getDescription() : this.props.addon.description);\n }\n\n get version() {\n return this.getString(this.props.addon.plugin ? this.props.addon.plugin.getVersion() : this.props.addon.version);\n }\n\n render() {\n if (this.state.settings) return this.settingsComponent;\n const {\n authorId,\n authorLink\n } = this.props.addon;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-card bd-addon-card settings-closed ui-switch-item\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-addon-header bda-header\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-card-title bda-header-title\"\n }, this.buildTitle(this.name, this.version, {\n name: this.author,\n id: authorId,\n link: authorLink\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-addon-controls bda-controls\"\n }, this.props.edit && this.makeButton(\"Edit\", React.createElement(_icons_edit__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: \"bd-icon\"\n }), this.edit), this.props.remove && this.makeButton(\"Delete\", React.createElement(_icons_delete__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n className: \"bd-icon\"\n }), this.delete), this.props.reload && this.makeButton(\"Reload\", React.createElement(_reloadIcon__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n className: \"bd-icon\"\n }), this.reload), React.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n onChange: this.onChange,\n checked: this.state.checked\n }))), _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-scroller-wrap bda-description-wrap scroller-wrap fade\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-scroller bd-addon-description bda-description scroller\"\n }, this.description)), this.footer);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25jYXJkLmpzeC5qcy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list.jsx ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CardList; });\n/* harmony import */ var _errorBoundary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errorBoundary */ \"./src/ui/errorBoundary.js\");\n/* harmony import */ var _contentColumn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contentColumn */ \"./src/ui/contentColumn.js\");\n/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _addoncard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addoncard */ \"./src/ui/addoncard.jsx\");\n/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/dropdown */ \"./src/ui/components/dropdown.jsx\");\n/* harmony import */ var _components_search__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/search */ \"./src/ui/components/search.jsx\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modules/contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../modules/webpackModules */ \"./src/modules/webpackModules.js\");\n/* harmony import */ var _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../modules/bdApi */ \"./src/modules/bdApi.js\");\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Tooltip = _modules_webpackModules__WEBPACK_IMPORTED_MODULE_13__[\"default\"].findByDisplayName(\"Tooltip\");\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].react;\nclass CardList extends _modules_v2__WEBPACK_IMPORTED_MODULE_10__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.state = {\n sort: \"name\",\n ascending: true,\n query: \"\"\n };\n this.isPlugins = this.props.type == \"plugins\";\n this.cookie = this.isPlugins ? _0globals__WEBPACK_IMPORTED_MODULE_8__[\"pluginCookie\"] : _0globals__WEBPACK_IMPORTED_MODULE_8__[\"themeCookie\"];\n this.manager = this.isPlugins ? _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"] : _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n this.sort = this.sort.bind(this);\n this.reverse = this.reverse.bind(this);\n this.search = this.search.bind(this);\n }\n\n openFolder() {\n __webpack_require__(/*! electron */ \"electron\").shell.openItem(this.isPlugins ? _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].pluginsFolder : _modules_contentManager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].themesFolder);\n }\n\n edit(name) {\n console.log(name);\n this.manager.edit(name);\n }\n\n async delete(name) {\n const shouldDelete = await this.confirmDelete(name);\n if (!shouldDelete) return;\n this.manager.delete(name);\n }\n\n confirmDelete(name) {\n return new Promise(resolve => {\n _modules_bdApi__WEBPACK_IMPORTED_MODULE_14__[\"default\"].showConfirmationModal(\"Are You Sure?\", `Are you sure you want to delete ${name}?`, {\n danger: true,\n confirmText: \"Delete\",\n onConfirm: () => {\n resolve(true);\n },\n onCancel: () => {\n resolve(false);\n }\n });\n });\n }\n\n get sortOptions() {\n return [{\n label: \"Name\",\n value: \"name\"\n }, {\n label: \"Author\",\n value: \"author\"\n }, {\n label: \"Version\",\n value: \"version\"\n }, {\n label: \"Recently Added\",\n value: \"added\"\n }, {\n label: \"Last Modified\",\n value: \"modified\"\n }, {\n label: \"File Size\",\n value: \"size\"\n }];\n }\n\n get directions() {\n return [{\n label: \"Ascending\",\n value: true\n }, {\n label: \"Descending\",\n value: false\n }];\n }\n\n reverse(value) {\n this.setState({\n ascending: value\n });\n }\n\n sort(value) {\n this.setState({\n sort: value\n });\n }\n\n search(event) {\n this.setState({\n query: event.target.value.toLocaleLowerCase()\n });\n }\n\n getProps(addon) {\n return {\n key: this.getName(addon),\n enabled: this.cookie[this.getName(addon)],\n toggle: this.manager.toggle.bind(this.manager),\n //edit: this.edit.bind(this),\n remove: this.delete.bind(this),\n addon: addon\n };\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n getAddons() {\n const sortedAddons = this.props.list.sort((a, b) => {\n const cap = this.state.sort.charAt(0).toUpperCase() + this.state.sort.slice(1);\n const first = a.plugin && a.plugin[`get${cap}`] ? this.getString(a.plugin[`get${cap}`]()) : a[this.state.sort];\n const second = b.plugin && b.plugin[`get${cap}`] ? this.getString(b.plugin[`get${cap}`]()) : b[this.state.sort];\n if (typeof first == \"string\") return first.toLocaleLowerCase().localeCompare(second.toLocaleLowerCase());\n if (first > second) return 1;\n if (second > first) return -1;\n return 0;\n });\n if (!this.state.ascending) sortedAddons.reverse();\n const rendered = [];\n\n for (let a = 0; a < sortedAddons.length; a++) {\n const addon = sortedAddons[a];\n\n if (this.state.query) {\n let matches = null;\n const name = this.getName(addon);\n const author = this.getAuthor(addon);\n const description = this.getDescription(addon);\n const version = this.getVersion(addon);\n if (name) matches = name.toLocaleLowerCase().includes(this.state.query);\n if (author) matches = matches || author.toLocaleLowerCase().includes(this.state.query);\n if (description) matches = matches || description.toLocaleLowerCase().includes(this.state.query);\n if (version) matches = matches || version.toLocaleLowerCase().includes(this.state.query);\n if (!matches) continue;\n }\n\n const props = this.getProps(addon);\n rendered.push(React.createElement(_errorBoundary__WEBPACK_IMPORTED_MODULE_0__[\"default\"], null, React.createElement(_addoncard__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _extends({}, props, {\n reload: !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && this.manager.reload.bind(this.manager)\n }))));\n }\n\n return rendered;\n }\n\n getName(addon) {\n return this.getString(addon.plugin ? addon.plugin.getName() : addon.name);\n }\n\n getAuthor(addon) {\n return this.getString(addon.plugin ? addon.plugin.getAuthor() : addon.author);\n }\n\n getDescription(addon) {\n return this.getString(addon.plugin ? addon.plugin.getDescription() : addon.description);\n }\n\n getVersion(addon) {\n return this.getString(addon.plugin ? addon.plugin.getVersion() : addon.version);\n }\n\n render() {\n const refreshIcon = React.createElement(Tooltip, {\n color: \"black\",\n position: \"top\",\n text: \"Reload List\"\n }, props => React.createElement(_reloadIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _extends({}, props, {\n className: \"bd-icon bd-reload bd-reload-header\",\n size: \"18px\",\n onClick: async () => {\n if (this.isPlugins) _modules_pluginModule__WEBPACK_IMPORTED_MODULE_11__[\"default\"].updatePluginList();else _modules_themeModule__WEBPACK_IMPORTED_MODULE_12__[\"default\"].updateThemeList();\n this.forceUpdate();\n }\n })));\n const addonCards = this.getAddons();\n return React.createElement(_scroller__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, React.createElement(_contentColumn__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n title: `${this.props.type.toUpperCase()}—${addonCards.length}`\n }, React.createElement(\"button\", {\n key: \"folder-button\",\n className: \"bd-button bd-pfbtn\",\n onClick: this.openFolder.bind(this)\n }, \"Open \", this.isPlugins ? \"Plugin\" : \"Theme\", \" Folder\"), !_0globals__WEBPACK_IMPORTED_MODULE_8__[\"settingsCookie\"][\"fork-ps-5\"] && refreshIcon, React.createElement(\"div\", {\n className: \"bd-controls bd-addon-controls\"\n }, React.createElement(_components_search__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n onChange: this.search,\n placeholder: `Search ${this.props.type}...`\n }), React.createElement(\"div\", {\n className: \"bd-addon-dropdowns\"\n }, React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Sort by:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.sortOptions,\n onChange: this.sort,\n style: \"transparent\"\n })), React.createElement(\"div\", {\n className: \"bd-select-wrapper\"\n }, React.createElement(\"label\", {\n className: \"bd-label\"\n }, \"Order:\"), React.createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n options: this.directions,\n onChange: this.reverse,\n style: \"transparent\"\n })))), React.createElement(\"div\", {\n className: \"bda-slist bd-addon-list\"\n }, addonCards)), React.createElement(_tools__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25saXN0LmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYW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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/addonlist.jsx\n"); /***/ }), /***/ "./src/ui/bdEmote.js": /*!***************************!*\ !*** ./src/ui/bdEmote.js ***! \***************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BDEmote; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/quickEmoteMenu */ \"./src/modules/quickEmoteMenu.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\n\n\nclass BDEmote extends _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n const isFav = _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"] && _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favoriteEmotes && _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favoriteEmotes[this.label] ? true : false;\n this.state = {\n shouldAnimate: !this.animateOnHover,\n isFavorite: isFav\n };\n this.onMouseEnter = this.onMouseEnter.bind(this);\n this.onMouseLeave = this.onMouseLeave.bind(this);\n this.onClick = this.onClick.bind(this);\n }\n\n get animateOnHover() {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-es-2\"];\n }\n\n get label() {\n return this.props.modifier ? `${this.props.name}:${this.props.modifier}` : this.props.name;\n }\n\n get modifierClass() {\n return this.props.modifier ? ` emote${this.props.modifier}` : \"\";\n }\n\n onMouseEnter() {\n if (!this.state.shouldAnimate && this.animateOnHover) this.setState({\n shouldAnimate: true\n });\n if (!this.state.isFavorite && _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favoriteEmotes[this.label]) this.setState({\n isFavorite: true\n });else if (this.state.isFavorite && !_modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favoriteEmotes[this.label]) this.setState({\n isFavorite: false\n });\n }\n\n onMouseLeave() {\n if (this.state.shouldAnimate && this.animateOnHover) this.setState({\n shouldAnimate: false\n });\n }\n\n onClick(e) {\n if (this.props.onClick) this.props.onClick(e);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TooltipWrapper, {\n color: \"black\",\n position: \"top\",\n text: this.label,\n delay: 750\n }, childProps => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", Object.assign({\n className: \"emotewrapper\" + (this.props.jumboable ? \" jumboable\" : \"\"),\n onMouseEnter: this.onMouseEnter,\n onMouseLeave: this.onMouseLeave,\n onClick: this.onClick\n }, childProps), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"img\", {\n draggable: false,\n className: \"emote\" + this.modifierClass + (this.props.jumboable ? \" jumboable\" : \"\") + (!this.state.shouldAnimate ? \" stop-animation\" : \"\"),\n dataModifier: this.props.modifier,\n alt: this.label,\n src: this.props.url\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"input\", {\n className: \"fav\" + (this.state.isFavorite ? \" active\" : \"\"),\n title: \"Favorite!\",\n type: \"button\",\n onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.state.isFavorite) {\n delete _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favoriteEmotes[this.label];\n _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateFavorites();\n } else {\n _modules_quickEmoteMenu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].favorite(this.label, this.props.url);\n }\n\n this.setState({\n isFavorite: !this.state.isFavorite\n });\n }\n }));\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYmRFbW90ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYmRFbW90ZS5qcz84NjQ5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgcXVpY2tFbW90ZU1lbnUgZnJvbS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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/bdEmote.js\n"); /***/ }), /***/ "./src/ui/bdLogo.js": /*!**************************!*\ !*** ./src/ui/bdLogo.js ***! \**************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BDLogo; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass BDLogo extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"svg\", {\n height: \"100%\",\n width: this.props.size || \"16px\",\n className: \"bd-logo \" + this.props.className,\n style: {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n },\n viewBox: \"0 0 2000 2000\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"metadata\", null), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"defs\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"filter\", {\n id: \"shadow1\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"feDropShadow\", {\n \"dx\": \"20\",\n \"dy\": \"0\",\n \"stdDeviation\": \"20\",\n \"flood-color\": \"rgba(0,0,0,0.35)\"\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"filter\", {\n id: \"shadow2\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"feDropShadow\", {\n \"dx\": \"15\",\n \"dy\": \"0\",\n \"stdDeviation\": \"20\",\n \"flood-color\": \"rgba(255,255,255,0.15)\"\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"filter\", {\n id: \"shadow3\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"feDropShadow\", {\n \"dx\": \"10\",\n \"dy\": \"0\",\n \"stdDeviation\": \"20\",\n \"flood-color\": \"rgba(0,0,0,0.35)\"\n }))), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"g\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n style: {\n filter: \"url(#shadow3)\"\n },\n d: \"M1195.44+135.442L1195.44+135.442L997.6+136.442C1024.2+149.742+1170.34+163.542+1193.64+179.742C1264.34+228.842+1319.74+291.242+1358.24+365.042C1398.14+441.642+1419.74+530.642+1422.54+629.642L1422.54+630.842L1422.54+632.042C1422.54+773.142+1422.54+1228.14+1422.54+1369.14L1422.54+1370.34L1422.54+1371.54C1419.84+1470.54+1398.24+1559.54+1358.24+1636.14C1319.74+1709.94+1264.44+1772.34+1193.64+1821.44C1171.04+1837.14+1025.7+1850.54+1000+1863.54L1193.54+1864.54C1539.74+1866.44+1864.54+1693.34+1864.54+1296.64L1864.54+716.942C1866.44+312.442+1541.64+135.442+1195.44+135.442Z\",\n fill: \"#171717\",\n opacity: \"1\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n style: {\n filter: \"url(#shadow2)\"\n },\n d: \"M1695.54+631.442C1685.84+278.042+1409.34+135.442+1052.94+135.442L361.74+136.442L803.74+490.442L1060.74+490.442C1335.24+490.442+1335.24+835.342+1060.74+835.342L1060.74+1164.84C1150.22+1164.84+1210.53+1201.48+1241.68+1250.87C1306.07+1353+1245.76+1509.64+1060.74+1509.64L361.74+1863.54L1052.94+1864.54C1409.24+1864.54+1685.74+1721.94+1695.54+1368.54C1695.54+1205.94+1651.04+1084.44+1572.64+999.942C1651.04+915.542+1695.54+794.042+1695.54+631.442Z\",\n fill: \"#3E82E5\",\n opacity: \"1\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n style: {\n filter: \"url(#shadow1)\"\n },\n d: \"M1469.25+631.442C1459.55+278.042+1183.05+135.442+826.65+135.442L135.45+135.442L135.45+1004C135.45+1004+135.427+1255.21+355.626+1255.21C575.825+1255.21+575.848+1004+575.848+1004L577.45+490.442L834.45+490.442C1108.95+490.442+1108.95+835.342+834.45+835.342L664.65+835.342L664.65+1164.84L834.45+1164.84C923.932+1164.84+984.244+1201.48+1015.39+1250.87C1079.78+1353+1019.47+1509.64+834.45+1509.64L135.45+1509.64L135.45+1864.54L826.65+1864.54C1182.95+1864.54+1459.45+1721.94+1469.25+1368.54C1469.25+1205.94+1424.75+1084.44+1346.35+999.942C1424.75+915.542+1469.25+794.042+1469.25+631.442Z\",\n fill: \"#FFFFFF\",\n opacity: \"1\"\n })));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYmRMb2dvLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9iZExvZ28uanM/MzYxYiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2x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sxODY0LjU0KzE0NTkuNDUrMTcyMS45NCsxNDY5LjI1KzEzNjguNTRDMTQ2OS4yNSsxMjA1Ljk0KzE0MjQuNzUrMTA4NC40NCsxMzQ2LjM1Kzk5OS45NDJDMTQyNC43NSs5MTUuNTQyKzE0NjkuMjUrNzk0LjA0MisxNDY5LjI1KzYzMS40NDJaXCIsXG4gICAgICBmaWxsOiBcIiNGRkZGRkZcIixcbiAgICAgIG9wYWNpdHk6IFwiMVwiXG4gICAgfSkpKTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/bdLogo.js\n"); /***/ }), /***/ "./src/ui/checkbox.js": /*!****************************!*\ !*** ./src/ui/checkbox.js ***! \****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_Checkbox; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_Checkbox extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n this.setInitialState();\n }\n\n setInitialState() {\n this.state = {\n checked: this.props.checked || false\n };\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"li\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"checkbox checkbox-3kaeSU da-checkbox\",\n onClick: this.onClick\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"checkbox-inner checkboxInner-3yjcPe da-checkboxInner\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"input\", {\n className: \"checkboxElement-1qV33p da-checkboxElement\",\n checked: this.state.checked,\n onChange: () => {},\n type: \"checkbox\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"span\", null)), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"span\", null, this.props.text)));\n }\n\n onClick() {\n this.props.onChange(this.props.id, !this.state.checked);\n this.setState({\n checked: !this.state.checked\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY2hlY2tib3guanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2NoZWNrYm94LmpzPzIzN2IiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19DaGVja2JveCBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcyk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zLnRleHQpKSk7XG4gIH1cblxuICBvbkNsaWNrKCkge1xuICAgIHRoaXMucHJvcHMub25DaGFuZ2UodGhpcy5wcm9wcy5pZCwgIXRoaXMuc3RhdGUuY2hlY2tlZCk7XG4gICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICBjaGVja2VkOiAhdGhpcy5zdGF0ZS5jaGVja2VkXG4gICAgfSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/checkbox.js\n"); /***/ }), /***/ "./src/ui/components/dropdown.jsx": /*!****************************************!*\ !*** ./src/ui/components/dropdown.jsx ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Select; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _icons_downarrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../icons/downarrow */ \"./src/ui/icons/downarrow.jsx\");\n\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Select extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n open: false,\n value: this.props.value || this.props.options[0].value\n };\n this.dropdown = React.createRef();\n this.onChange = this.onChange.bind(this);\n this.showMenu = this.showMenu.bind(this);\n this.hideMenu = this.hideMenu.bind(this);\n }\n\n showMenu(event) {\n event.preventDefault();\n this.setState({\n open: true\n }, () => {\n document.addEventListener(\"click\", this.hideMenu);\n });\n }\n\n hideMenu() {\n this.setState({\n open: false\n }, () => {\n document.removeEventListener(\"click\", this.hideMenu);\n });\n }\n\n onChange(value) {\n this.setState({\n value\n });\n if (this.props.onChange) this.props.onChange(value);\n }\n\n get selected() {\n return this.props.options.find(o => o.value == this.state.value);\n }\n\n get options() {\n const selected = this.selected;\n return React.createElement(\"div\", {\n className: \"bd-select-options\"\n }, this.props.options.map(opt => React.createElement(\"div\", {\n className: `bd-select-option${selected.value == opt.value ? \" selected\" : \"\"}`,\n onClick: this.onChange.bind(this, opt.value)\n }, opt.label)));\n }\n\n render() {\n const style = this.props.style == \"transparent\" ? \" bd-select-transparent\" : \"\";\n const isOpen = this.state.open ? \" menu-open\" : \"\";\n return React.createElement(\"div\", {\n className: `bd-select${style}${isOpen}`,\n onClick: this.showMenu,\n ref: this.dropdown\n }, React.createElement(\"div\", {\n className: \"bd-select-value\"\n }, this.selected.label), React.createElement(_icons_downarrow__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: \"bd-select-arrow\"\n }), this.state.open && this.options);\n }\n\n} // return
\n// \n//
\n//
\n//
{this.selected.label}
\n// \n//
\n//
\n// {this.state.open && this.options}\n//
;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29tcG9uZW50cy9kcm9wZG93bi5qc3guanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2NvbXBvbmVudHMvZHJvcGRvd24uanN4PzE0YTEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uLy4uL21vZHVsZXMvdjJcIjtcbmltcG9ydC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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/components/dropdown.jsx\n"); /***/ }), /***/ "./src/ui/components/search.jsx": /*!**************************************!*\ !*** ./src/ui/components/search.jsx ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Search; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _icons_search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../icons/search */ \"./src/ui/icons/search.jsx\");\n\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Search extends React.Component {\n render() {\n return React.createElement(\"div\", {\n className: \"bd-search-wrapper\"\n }, React.createElement(\"input\", {\n onChange: this.props.onChange,\n onKeyDown: this.props.onKeyDown,\n type: \"text\",\n className: \"bd-search\",\n placeholder: this.props.placeholder,\n maxLength: \"50\"\n }), React.createElement(_icons_search__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29tcG9uZW50cy9zZWFyY2guanN4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9jb21wb25lbnRzL3NlYXJjaC5qc3g/ZDQ3NSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFNlYXJjaEljb24gZnJvbSBcIi4uL2ljb25zL3NlYXJjaFwiO1xuY29uc3QgUmVhY3QgPSBCRFYyLlJlYWN0O1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgU2VhcmNoIGV4dGVuZHMgUmVhY3QuQ29tcG9uZW50IHtcbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiBSZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJiZC1zZWFyY2gtd3JhcHBlclwiXG4gICAgfSwgUmVhY3QuY3JlYXRlRWxlbWVudChcImlucHV0XCIsIHtcbiAgICAgIG9uQ2hhbmdlOiB0aGlzLnByb3BzLm9uQ2hhbmdlLFxuICAgICAgb25LZXlEb3duOiB0aGlzLnByb3BzLm9uS2V5RG93bixcbiAgICAgIHR5cGU6IFwidGV4dFwiLFxuICAgICAgY2xhc3NOYW1lOiBcImJkLXNlYXJjaFwiLFxuICAgICAgcGxhY2Vob2xkZXI6IHRoaXMucHJvcHMucGxhY2Vob2xkZXIsXG4gICAgICBtYXhMZW5ndGg6IFwiNTBcIlxuICAgIH0pLCBSZWFjdC5jcmVhdGVFbGVtZW50KFNlYXJjaEljb24sIG51bGwpKTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/components/search.jsx\n"); /***/ }), /***/ "./src/ui/components/switch.jsx": /*!**************************************!*\ !*** ./src/ui/components/switch.jsx ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Switch; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Switch extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: this.props.checked\n };\n this.onChange = this.onChange.bind(this);\n }\n\n onChange() {\n if (this.props.disabled) return;\n this.props.onChange(!this.state.checked);\n this.setState({\n checked: !this.state.checked\n });\n }\n\n render() {\n const enabledClass = this.props.disabled ? \" bd-switch-disabled\" : \"\";\n const checkedClass = this.state.checked ? \" bd-switch-checked\" : \"\";\n return React.createElement(\"div\", {\n className: `bd-switch` + enabledClass + checkedClass\n }, React.createElement(\"input\", {\n type: \"checkbox\",\n id: this.props.id,\n className: `bd-checkbox`,\n disabled: this.props.disabled,\n checked: this.state.checked,\n onChange: this.onChange\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWk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aXRjaGAgKyBlbmFibGVkQ2xhc3MgKyBjaGVja2VkQ2xhc3NcbiAgICB9LCBSZWFjdC5jcmVhdGVFbGVtZW50KFwiaW5wdXRcIiwge1xuICAgICAgdHlwZTogXCJjaGVja2JveFwiLFxuICAgICAgaWQ6IHRoaXMucHJvcHMuaWQsXG4gICAgICBjbGFzc05hbWU6IGBiZC1jaGVja2JveGAsXG4gICAgICBkaXNhYmxlZDogdGhpcy5wcm9wcy5kaXNhYmxlZCxcbiAgICAgIGNoZWNrZWQ6IHRoaXMuc3RhdGUuY2hlY2tlZCxcbiAgICAgIG9uQ2hhbmdlOiB0aGlzLm9uQ2hhbmdlXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/components/switch.jsx\n"); /***/ }), /***/ "./src/ui/contentColumn.js": /*!*********************************!*\ !*** ./src/ui/contentColumn.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_ContentColumn; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_ContentColumn extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n static get displayName() {\n return \"ContentColumn\";\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h2\", {\n className: \"ui-form-title h2 margin-reset margin-bottom-20\"\n }, this.props.title), this.props.children);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29udGVudENvbHVtbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvY29udGVudENvbHVtbi5qcz9kNWMzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfQ29udGVudENvbHVtbiBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHN0YXRpYyBnZXQgZGlzcGxheU5hbWUoKSB7XG4gICAgcmV0dXJuIFwiQ29udGVudENvbHVtblwiO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1xuICAgICAgY2xhc3NOYW1lOiBcImNvbnRlbnRDb2x1bW4tMmhySVlIIGNvbnRlbnRDb2x1bW5EZWZhdWx0LTFWUWtHTSBjb250ZW50LWNvbHVtbiBkZWZhdWx0XCJcbiAgICB9LCBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJoMlwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwidWktZm9ybS10aXRsZSBoMiBtYXJnaW4tcmVzZXQgbWFyZ2luLWJvdHRvbS0yMFwiXG4gICAgfSwgdGhpcy5wcm9wcy50aXRsZSksIHRoaXMucHJvcHMuY2hpbGRyZW4pO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/contentColumn.js\n"); /***/ }), /***/ "./src/ui/cssEditor.js": /*!*****************************!*\ !*** ./src/ui/cssEditor.js ***! \*****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_CssEditor; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _modules_domtools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modules/domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _settingsTitle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ \"./src/ui/checkbox.js\");\n/* harmony import */ var _cssEditorDetached__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cssEditorDetached */ \"./src/ui/cssEditorDetached.js\");\n\n\n\n\n\n\n\n\nclass V2C_CssEditor extends _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n const self = this;\n self.props.lines = 0;\n self.setInitialState();\n self.attach = self.attach.bind(self);\n self.detachedEditor = _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_cssEditorDetached__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n attach: self.attach\n });\n self.onClick = self.onClick.bind(self);\n self.updateCss = self.updateCss.bind(self);\n self.saveCss = self.saveCss.bind(self);\n self.detach = self.detach.bind(self);\n }\n\n setInitialState() {\n this.state = {\n detached: this.props.detached || _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].editorDetached\n };\n }\n\n componentDidMount() {\n // this.updateLineCount();\n this.editor = ace.edit(\"bd-customcss-editor\");\n this.editor.setTheme(\"ace/theme/monokai\");\n this.editor.session.setMode(\"ace/mode/css\");\n this.editor.setShowPrintMargin(false);\n this.editor.setFontSize(14);\n this.editor.on(\"change\", () => {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"]) return;\n this.saveCss();\n this.updateCss();\n });\n }\n\n componentWillUnmount() {\n this.editor.destroy();\n }\n\n componentDidUpdate(prevProps, prevState) {\n const self = this;\n\n if (prevState.detached && !self.state.detached) {\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactDom.unmountComponentAtNode(self.detachedRoot);\n }\n }\n\n codeMirror() {}\n\n get options() {\n return {\n lineNumbers: true,\n mode: \"css\",\n indentUnit: 4,\n theme: \"material\",\n scrollbarStyle: \"simple\"\n };\n }\n\n get css() {\n const _ccss = _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getBDData(\"bdcustomcss\");\n\n let ccss = \"\";\n\n if (_ccss && _ccss !== \"\") {\n ccss = atob(_ccss);\n }\n\n return ccss;\n }\n\n updateLineCount() {\n const lineCount = this.refs.editor.value.split(\"\\n\").length;\n if (lineCount == this.props.lines) return;\n this.refs.lines.textContent = Array.from(new Array(lineCount), (_, i) => i + 1).join(\".\\n\") + \".\";\n this.props.lines = lineCount;\n }\n\n render() {\n const self = this;\n const {\n detached\n } = self.state;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\",\n style: {\n padding: \"60px 40px 0px\"\n }\n }, detached && _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"editor-detached\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Custom CSS Editor\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"h3\", null, \"Editor Detached\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n className: \"btn btn-primary\",\n onClick: () => {\n self.attach();\n }\n }, \"Attach\")), !detached && _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n text: \"Custom CSS Editor\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"editor-wrapper\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-editor\",\n className: \"editor\",\n ref: \"editor\"\n }, self.css)), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-attach-controls\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"ul\", {\n className: \"checkbox-group\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_checkbox__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n id: \"live-update\",\n text: \"Live Update\",\n onChange: this.onChange,\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"]\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-detach-controls-button\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"3px 0 0 3px\",\n borderRight: \"1px solid #3f4146\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"update\");\n }\n }, \"Update\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"0\",\n borderLeft: \"1px solid #2d2d2d\",\n borderRight: \"1px solid #2d2d2d\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"save\");\n }\n }, \"Save\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"0 3px 3px 0\",\n borderLeft: \"1px solid #3f4146\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"detach\");\n }\n }, \"Detach\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n style: {\n fontSize: \"10px\",\n marginLeft: \"5px\"\n }\n }, \"Unsaved changes are lost on detach\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"help-text\"\n }, \"Press \", _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"code\", {\n className: \"inline\"\n }, \"ctrl\"), \"+\", _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n className: \"inline\"\n }, \",\"), \" with the editor focused to access the editor's settings.\")))));\n }\n\n onClick(arg) {\n const self = this;\n\n switch (arg) {\n case \"update\":\n self.updateCss();\n break;\n\n case \"save\":\n self.saveCss();\n break;\n\n case \"detach\":\n self.detach();\n break;\n }\n }\n\n onChange(id, checked) {\n switch (id) {\n case \"live-update\":\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"] = checked;\n _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_1__[\"default\"].saveSettings();\n break;\n }\n }\n\n updateCss() {\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].removeStyle(\"customcss\");\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].addStyle(\"customcss\", this.editor.session.getValue());\n }\n\n saveCss() {\n _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setBDData(\"bdcustomcss\", btoa(this.editor.session.getValue()));\n }\n\n detach() {\n const self = this;\n self.setState({\n detached: true\n });\n const droot = self.detachedRoot;\n\n if (!droot) {\n console.log(\"FAILED TO INJECT ROOT: .app\");\n return;\n }\n\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactDom.render(self.detachedEditor, droot);\n }\n\n get detachedRoot() {\n const _root = _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#bd-customcss-detach-container\");\n\n if (!_root) {\n if (!this.injectDetachedRoot()) return null;\n return this.detachedRoot;\n }\n\n return _root;\n }\n\n injectDetachedRoot() {\n const app = _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\".app, .app-2rEoOp\");\n if (!app) return false;\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].insertAfter(_modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
`), app);\n return true;\n }\n\n attach() {\n const self = this;\n self.setState({\n detached: false\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY3NzRWRpdG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9jc3NFZGl0b3IuanM/MDYxOCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5nc0Nvb2tpZSB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IFNldHRpbmdzIGZyb20gXCIuLi9tb2R1bGVzL3NldHRpbmdzUGFuZWxcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuLi9tb2R1bGVzL2RhdGFTdG9yZVwiO1xuaW1wb3J0IERPTSBmcm9tIFwiLi4vbW9kdWxlcy9kb210b29sc1wiO1xuaW1wb3J0IFNldHRpbmdzVGl0bGUgZnJvbSBcIi4vc2V0dGluZ3NUaXRsZVwiO1xuaW1wb3J0IENoZWNrYm94IGZyb20gXCIuL2NoZWNrYm94XCI7XG5pbXBvcnQgVjJDX0Nzc0VkaXRvckRldGFjaGVkIGZyb20gXCIuL2Nzc0VkaXRvckRldGFjaGVkXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfQ3NzRWRpdG9yIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgIHNlbGYucHJvcHMubGluZXMgPSAwO1xuICAgIHNlbGYuc2V0SW5pdGlhbFN0YXRlKCk7XG4gICAgc2VsZi5hdHRhY2ggPSBzZWxmL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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/cssEditor.js\n"); /***/ }), /***/ "./src/ui/cssEditorDetached.js": /*!*************************************!*\ !*** ./src/ui/cssEditorDetached.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_CssEditorDetached; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _modules_domtools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modules/domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./checkbox */ \"./src/ui/checkbox.js\");\n\n\n\n\n\n\nclass V2C_CssEditorDetached extends _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n const self = this;\n self.onClick = self.onClick.bind(self);\n self.updateCss = self.updateCss.bind(self);\n self.saveCss = self.saveCss.bind(self);\n self.onChange = self.onChange.bind(self);\n }\n\n componentDidMount() {\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].addClass(_modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#app-mount\"), \"bd-detached-editor\");\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].editorDetached = true; // this.updateLineCount();\n\n this.editor = ace.edit(\"bd-customcss-editor-detached\");\n this.editor.setTheme(\"ace/theme/monokai\");\n this.editor.session.setMode(\"ace/mode/css\");\n this.editor.setShowPrintMargin(false);\n this.editor.setFontSize(14);\n this.editor.on(\"change\", () => {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"]) return;\n this.saveCss();\n this.updateCss();\n });\n }\n\n componentWillUnmount() {\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].removeClass(_modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#app-mount\"), \"bd-detached-editor\");\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].editorDetached = false;\n this.editor.destroy();\n }\n\n updateLineCount() {\n const lineCount = this.refs.editor.value.split(\"\\n\").length;\n if (lineCount == this.props.lines) return;\n this.refs.lines.textContent = Array.from(new Array(lineCount), (_, i) => i + 1).join(\".\\n\") + \".\";\n this.props.lines = lineCount;\n }\n\n get options() {\n return {\n lineNumbers: true,\n mode: \"css\",\n indentUnit: 4,\n theme: \"material\",\n scrollbarStyle: \"simple\"\n };\n }\n\n get css() {\n const _ccss = _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getBDData(\"bdcustomcss\");\n\n let ccss = \"\";\n\n if (_ccss && _ccss !== \"\") {\n ccss = atob(_ccss);\n }\n\n return ccss;\n }\n\n get root() {\n const _root = _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#bd-customcss-detach-container\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.detachedRoot;\n }\n\n return _root;\n }\n\n injectRoot() {\n const app = _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\".app, .app-2rEoOp\");\n if (!app) return false;\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].insertAfter(_modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].createElement(`
`), app);\n return true;\n }\n\n render() {\n const self = this;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bd-detached-css-editor\",\n id: \"bd-customcss-detach-editor\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-innerpane\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"editor-wrapper\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-editor-detached\",\n className: \"editor\",\n ref: \"editor\"\n }, self.css)), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-attach-controls\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"ul\", {\n className: \"checkbox-group\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_checkbox__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n id: \"live-update\",\n text: \"Live Update\",\n onChange: self.onChange,\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"]\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n id: \"bd-customcss-detach-controls-button\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"3px 0 0 3px\",\n borderRight: \"1px solid #3f4146\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"update\");\n }\n }, \"Update\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"0\",\n borderLeft: \"1px solid #2d2d2d\",\n borderRight: \"1px solid #2d2d2d\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"save\");\n }\n }, \"Save\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"button\", {\n style: {\n borderRadius: \"0 3px 3px 0\",\n borderLeft: \"1px solid #3f4146\"\n },\n className: \"btn btn-primary\",\n onClick: () => {\n self.onClick(\"attach\");\n }\n }, \"Attach\"), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n style: {\n fontSize: \"10px\",\n marginLeft: \"5px\"\n }\n }, \"Unsaved changes are lost on attach\")))));\n }\n\n onChange(id, checked) {\n switch (id) {\n case \"live-update\":\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-css-0\"] = checked;\n _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_1__[\"default\"].saveSettings();\n break;\n }\n }\n\n onClick(id) {\n const self = this;\n\n switch (id) {\n case \"attach\":\n if (_modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].query(\"#editor-detached\")) self.props.attach();\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactDom.unmountComponentAtNode(self.root);\n self.root.remove();\n break;\n\n case \"update\":\n self.updateCss();\n break;\n\n case \"save\":\n self.saveCss();\n break;\n }\n }\n\n updateCss() {\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].removeStyle(\"customcss\");\n _modules_domtools__WEBPACK_IMPORTED_MODULE_4__[\"default\"].addStyle(\"customcss\", this.editor.session.getValue());\n }\n\n saveCss() {\n _modules_dataStore__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setBDData(\"bdcustomcss\", btoa(this.editor.session.getValue()));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY3NzRWRpdG9yRGV0YWNoZWQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2Nzc0VkaXRvckRldGFjaGVkLmpzPzBkMDIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raWUgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBTZXR0aW5ncyBmcm9tIFwiLi4vbW9kdWxlcy9zZXR0aW5nc1BhbmVsXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IERhdGFTdG9yZSBmcm9tIFwiLi4vbW9kdWxlcy9kYXRhU3RvcmVcIjtcbmltcG9ydCBET00gZnJvbSBcIi4uL21vZHVsZXMvZG9tdG9vbHNcIjtcbmltcG9ydCBDaGVja2JveCBmcm9tIFwiLi9jaGVja2JveFwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX0Nzc0VkaXRvckRldGFjaGVkIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgIHNlbGYub25DbGljayA9IHNlbGYub25DbGljay5iaW5kKHNlbGYpO1xuICAgIHNlbGYudXBkYXRlQ3NzID0gc2VsZi51cGRhdGVDc3MuYmluZCh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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/cssEditorDetached.js\n"); /***/ }), /***/ "./src/ui/errorBoundary.js": /*!*********************************!*\ !*** ./src/ui/errorBoundary.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BDErrorBoundary; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass BDErrorBoundary extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.state = {\n hasError: false\n };\n }\n\n componentDidCatch() {\n this.setState({\n hasError: true\n });\n }\n\n render() {\n if (this.state.hasError) return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"react-error\"\n }, \"Component Error\");\n return this.props.children;\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvZXJyb3JCb3VuZGFyeS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvZXJyb3JCb3VuZGFyeS5qcz82Y2RhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBCREVycm9yQm91bmRhcnkgZXh0ZW5kcyBCRFYyLnJlYWN0Q29tcG9uZW50IHtcbiAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICBzdXBlcihwcm9wcyk7XG4gICAgdGhpcy5zdGF0ZSA9IHtcbiAgICAgIGhhc0Vycm9yOiBmYWxzZVxuICAgIH07XG4gIH1cblxuICBjb21wb25lbnREaWRDYXRjaCgpIHtcbiAgICB0aGlzLnNldFN0YXRlKHtcbiAgICAgIGhhc0Vycm9yOiB0cnVlXG4gICAgfSk7XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgaWYgKHRoaXMuc3RhdGUuaGFzRXJyb3IpIHJldHVybiBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1xuICAgICAgY2xhc3NOYW1lOiBcInJlYWN0LWVycm9yXCJcbiAgICB9LCBcIkNvbXBvbmVudCBFcnJvclwiKTtcbiAgICByZXR1cm4gdGhpcy5wcm9wcy5jaGlsZHJlbjtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/errorBoundary.js\n"); /***/ }), /***/ "./src/ui/icons/delete.jsx": /*!*********************************!*\ !*** ./src/ui/icons/delete.jsx ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Delete; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Delete extends React.Component {\n render() {\n const size = this.props.size || \"24px\";\n return React.createElement(\"svg\", {\n className: this.props.className || \"\",\n fill: \"#FFFFFF\",\n viewBox: \"0 0 24 24\",\n style: {\n width: size,\n height: size\n },\n onClick: this.props.onClick\n }, React.createElement(\"path\", {\n fill: \"none\",\n d: \"M0 0h24v24H0V0z\"\n }), React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z\"\n }), React.createElement(\"path\", {\n fill: \"none\",\n d: \"M0 0h24v24H0z\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvZGVsZXRlLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvaWNvbnMvZGVsZXRlLmpzeD8yYWE5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5jb25zdCBSZWFjdCA9IEJEVjIuUmVhY3Q7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBEZWxldGUgZXh0ZW5kcyBSZWFjdC5Db21wb25lbnQge1xuICByZW5kZXIoKSB7XG4gICAgY29uc3Qgc2l6ZSA9IHRoaXMucHJvcHMuc2l6ZSB8fCBcIjI0cHhcIjtcbiAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChcInN2Z1wiLCB7XG4gICAgICBjbGFzc05hbWU6IHRoaXMucHJvcHMuY2xhc3NOYW1lIHx8IFwiXCIsXG4gICAgICBmaWxsOiBcIiNGRkZGRkZcIixcbiAgICAgIHZpZXdCb3g6IFwiMCAwIDI0IDI0XCIsXG4gICAgICBzdHlsZToge1xuICAgICAgICB3aWR0aDogc2l6ZSxcbiAgICAgICAgaGVpZ2h0OiBzaXplXG4gICAgICB9LFxuICAgICAgb25DbGljazogdGhpcy5wcm9wcy5vbkNsaWNrXG4gICAgfSwgUmVhY3QuY3JlYXRlRWxlbWVudChcInBhdGhcIiwge1xuICAgICAgZmlsbDogXCJub25lXCIsXG4gICAgICBkOiBcIk0wIDBoMjR2MjRIMFYwelwiXG4gICAgfSksIFJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJwYXRoXCIsIHtcbiAgICAgIGQ6IFwiTTYgMTljMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjdINnYxMnptMi40Ni03LjEybDEuNDEtMS40MUwxMiAxMi41OWwyLjEyLTIuMTIgMS40MSAxLjQxTDEzLjQxIDE0bDIuMTIgMi4xMi0xLjQxIDEuNDFMMTIgMTUuNDFsLTIuMTIgMi4xMi0xLjQxLTEuNDFMMTAuNTkgMTRsLTIuMTMtMi4xMnpNMTUuNSA0bC0xLTFoLTVsLTEgMUg1djJoMTRWNHpcIlxuICAgIH0pLCBSZWFjdC5jcmVhdGVFbGVtZW50KFwicGF0aFwiLCB7XG4gICAgICBmaWxsOiBcIm5vbmVcIixcbiAgICAgIGQ6IFwiTTAgMGgyNHYyNEgwelwiXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/icons/delete.jsx\n"); /***/ }), /***/ "./src/ui/icons/downarrow.jsx": /*!************************************!*\ !*** ./src/ui/icons/downarrow.jsx ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DownArrow; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass DownArrow extends React.Component {\n render() {\n const size = this.props.size || \"16px\";\n return React.createElement(\"svg\", {\n className: this.props.className || \"\",\n fill: \"#FFFFFF\",\n viewBox: \"0 0 24 24\",\n style: {\n width: size,\n height: size\n }\n }, React.createElement(\"path\", {\n d: \"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvZG93bmFycm93LmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvaWNvbnMvZG93bmFycm93LmpzeD9hMTcxIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5jb25zdCBSZWFjdCA9IEJEVjIuUmVhY3Q7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBEb3duQXJyb3cgZXh0ZW5kcyBSZWFjdC5Db21wb25lbnQge1xuICByZW5kZXIoKSB7XG4gICAgY29uc3Qgc2l6ZSA9IHRoaXMucHJvcHMuc2l6ZSB8fCBcIjE2cHhcIjtcbiAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChcInN2Z1wiLCB7XG4gICAgICBjbGFzc05hbWU6IHRoaXMucHJvcHMuY2xhc3NOYW1lIHx8IFwiXCIsXG4gICAgICBmaWxsOiBcIiNGRkZGRkZcIixcbiAgICAgIHZpZXdCb3g6IFwiMCAwIDI0IDI0XCIsXG4gICAgICBzdHlsZToge1xuICAgICAgICB3aWR0aDogc2l6ZSxcbiAgICAgICAgaGVpZ2h0OiBzaXplXG4gICAgICB9XG4gICAgfSwgUmVhY3QuY3JlYXRlRWxlbWVudChcInBhdGhcIiwge1xuICAgICAgZDogXCJNOC4xMiA5LjI5TDEyIDEzLjE3bDMuODgtMy44OGMuMzktLjM5IDEuMDItLjM5IDEuNDEgMCAuMzkuMzkuMzkgMS4wMiAwIDEuNDFsLTQuNTkgNC41OWMtLjM5LjM5LTEuMDIuMzktMS40MSAwTDYuNyAxMC43Yy0uMzktLjM5LS4zOS0xLjAyIDAtMS40MS4zOS0uMzggMS4wMy0uMzkgMS40MiAwelwiXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/icons/downarrow.jsx\n"); /***/ }), /***/ "./src/ui/icons/edit.jsx": /*!*******************************!*\ !*** ./src/ui/icons/edit.jsx ***! \*******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Edit; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Edit extends React.Component {\n render() {\n const size = this.props.size || \"24px\";\n return React.createElement(\"svg\", {\n className: this.props.className || \"\",\n viewBox: \"0 0 24 24\",\n fill: \"#FFFFFF\",\n style: {\n width: size,\n height: size\n },\n onClick: this.props.onClick\n }, React.createElement(\"path\", {\n d: \"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"\n }), React.createElement(\"path\", {\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvZWRpdC5qc3guanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2ljb25zL2VkaXQuanN4PzNiNDciXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uLy4uL21vZHVsZXMvdjJcIjtcbmNvbnN0IFJlYWN0ID0gQkRWMi5SZWFjdDtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEVkaXQgZXh0ZW5kcyBSZWFjdC5Db21wb25lbnQge1xuICByZW5kZXIoKSB7XG4gICAgY29uc3Qgc2l6ZSA9IHRoaXMucHJvcHMuc2l6ZSB8fCBcIjI0cHhcIjtcbiAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChcInN2Z1wiLCB7XG4gICAgICBjbGFzc05hbWU6IHRoaXMucHJvcHMuY2xhc3NOYW1lIHx8IFwiXCIsXG4gICAgICB2aWV3Qm94OiBcIjAgMCAyNCAyNFwiLFxuICAgICAgZmlsbDogXCIjRkZGRkZGXCIsXG4gICAgICBzdHlsZToge1xuICAgICAgICB3aWR0aDogc2l6ZSxcbiAgICAgICAgaGVpZ2h0OiBzaXplXG4gICAgICB9LFxuICAgICAgb25DbGljazogdGhpcy5wcm9wcy5vbkNsaWNrXG4gICAgfSwgUmVhY3QuY3JlYXRlRWxlbWVudChcInBhdGhcIiwge1xuICAgICAgZDogXCJNMyAxNy4yNVYyMWgzLjc1TDE3LjgxIDkuOTRsLTMuNzUtMy43NUwzIDE3LjI1ek0yMC43MSA3LjA0Yy4zOS0uMzkuMzktMS4wMiAwLTEuNDFsLTIuMzQtMi4zNGMtLjM5LS4zOS0xLjAyLS4zOS0xLjQxIDBsLTEuODMgMS44MyAzLjc1IDMuNzUgMS44My0xLjgzelwiXG4gICAgfSksIFJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJwYXRoXCIsIHtcbiAgICAgIGQ6IFwiTTAgMGgyNHYyNEgwelwiLFxuICAgICAgZmlsbDogXCJub25lXCJcbiAgICB9KSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/icons/edit.jsx\n"); /***/ }), /***/ "./src/ui/icons/history.jsx": /*!**********************************!*\ !*** ./src/ui/icons/history.jsx ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return History; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n{\n /* \r\n \r\n \r\n */\n}\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass History extends React.Component {\n render() {\n const size = this.props.size || \"18px\";\n return React.createElement(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"#FFFFFF\",\n className: this.props.className || \"\",\n style: {\n width: size,\n height: size\n },\n onClick: this.props.onClick\n }, React.createElement(\"path\", {\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), React.createElement(\"path\", {\n d: \"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvaGlzdG9yeS5qc3guanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2ljb25zL2hpc3RvcnkuanN4PzgzNzEiXSwic291cmNlc0NvbnRlbnQiOlsie1xuICAvKiA8c3ZnIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIndoaXRlXCIgd2lkdGg9XCIxOHB4XCIgaGVpZ2h0PVwiMThweFwiPlxyXG4gICAgIDxwYXRoIGQ9XCJNMCAwaDI0djI0SDB6XCIgZmlsbD1cIm5vbmVcIi8+XHJcbiAgICAgPHBhdGggZD1cIk0xMyAzYy00Ljk3IDAtOSA0LjAzLTkgOUgxbDMuODkgMy44OS4wNy4xNEw5IDEySDZjMC0zLjg3IDMuMTMtNyA3LTdzNyAzLjEzIDcgNy0zLjEzIDctNyA3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Ny0zLjEzIDctNyA3Yy0xLjkzIDAtMy42OC0uNzktNC45NC0yLjA2bC0xLjQyIDEuNDJDOC4yNyAxOS45OSAxMC41MSAyMSAxMyAyMWM0Ljk3IDAgOS00LjAzIDktOXMtNC4wMy05LTktOXptLTEgNXY1bDQuMjggMi41NC43Mi0xLjIxLTMuNS0yLjA4VjhIMTJ6XCJcbiAgICB9KSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/icons/history.jsx\n"); /***/ }), /***/ "./src/ui/icons/search.jsx": /*!*********************************!*\ !*** ./src/ui/icons/search.jsx ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Search; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].React;\nclass Search extends React.Component {\n render() {\n const size = this.props.size || \"16px\";\n return React.createElement(\"svg\", {\n className: this.props.className || \"\",\n fill: \"#FFFFFF\",\n viewBox: \"0 0 24 24\",\n style: {\n width: size,\n height: size\n }\n }, React.createElement(\"path\", {\n fill: \"none\",\n d: \"M0 0h24v24H0V0z\"\n }), React.createElement(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvc2VhcmNoLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvaWNvbnMvc2VhcmNoLmpzeD9jM2E5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5jb25zdCBSZWFjdCA9IEJEVjIuUmVhY3Q7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBTZWFyY2ggZXh0ZW5kcyBSZWFjdC5Db21wb25lbnQge1xuICByZW5kZXIoKSB7XG4gICAgY29uc3Qgc2l6ZSA9IHRoaXMucHJvcHMuc2l6ZSB8fCBcIjE2cHhcIjtcbiAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChcInN2Z1wiLCB7XG4gICAgICBjbGFzc05hbWU6IHRoaXMucHJvcHMuY2xhc3NOYW1lIHx8IFwiXCIsXG4gICAgICBmaWxsOiBcIiNGRkZGRkZcIixcbiAgICAgIHZpZXdCb3g6IFwiMCAwIDI0IDI0XCIsXG4gICAgICBzdHlsZToge1xuICAgICAgICB3aWR0aDogc2l6ZSxcbiAgICAgICAgaGVpZ2h0OiBzaXplXG4gICAgICB9XG4gICAgfSwgUmVhY3QuY3JlYXRlRWxlbWVudChcInBhdGhcIiwge1xuICAgICAgZmlsbDogXCJub25lXCIsXG4gICAgICBkOiBcIk0wIDBoMjR2MjRIMFYwelwiXG4gICAgfSksIFJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJwYXRoXCIsIHtcbiAgICAgIGQ6IFwiTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6XCJcbiAgICB9KSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/icons/search.jsx\n"); /***/ }), /***/ "./src/ui/publicservers/layer.js": /*!***************************************!*\ !*** ./src/ui/publicservers/layer.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_Layer; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_domtools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../modules/domtools */ \"./src/modules/domtools.js\");\n\n\nclass V2C_Layer extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.keyupListener = this.keyupListener.bind(this);\n }\n\n keyupListener(e) {\n if (e.which === 27) {\n _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactDom.unmountComponentAtNode(this.refs.root.parentNode);\n }\n }\n\n componentDidMount() {\n window.addEventListener(\"keyup\", this.keyupListener);\n const thisNode = _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].query(`#${this.props.id}`);\n _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].animate({\n duration: 200,\n update: function (progress) {\n thisNode.style.transform = `scale(${1.1 - 0.1 * progress}) translateZ(0px)`;\n thisNode.style.opacity = progress;\n\n if (progress == 1) {\n setImmediate(() => {\n thisNode.style.transform = \"\";\n thisNode.style.opacity = \"\";\n });\n }\n }\n });\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"keyup\", this.keyupListener);\n const thisNode = _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].query(`#${this.props.id}`);\n _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].animate({\n duration: 200,\n update: function (progress) {\n thisNode.style.transform = `scale(${1.1 - 0.1 * (1 - progress)}) translateZ(0px)`;\n thisNode.style.opacity = 1 - progress;\n\n if (progress == 1) {\n setImmediate(() => {\n thisNode.remove();\n });\n }\n }\n });\n const layer = _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].query(\".publicServersOpen\");\n layer.classList.remove(\"publicServersOpen\");\n _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].animate({\n duration: 200,\n update: function (progress) {\n layer.style.transform = `scale(${0.07 * progress + 0.93}) translateZ(0px)`;\n layer.style.opacity = progress;\n\n if (progress == 1) {\n setImmediate(() => {\n layer.style.transform = \"\";\n layer.style.opacity = \"\";\n });\n }\n }\n });\n }\n\n componentWillMount() {\n const layer = _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].query(\"[class*=\\\"layer-\\\"]\");\n layer.classList.add(\"publicServersOpen\");\n _modules_domtools__WEBPACK_IMPORTED_MODULE_1__[\"default\"].animate({\n duration: 200,\n update: function (progress) {\n layer.style.transform = `scale(${0.07 * (1 - progress) + 0.93}) translateZ(0px)`;\n layer.style.opacity = 1 - progress;\n }\n });\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"layer bd-layer layer-3QrUeG\",\n id: this.props.id,\n ref: \"root\",\n style: {\n opacity: 0,\n transform: \"scale(1.1) translateZ(0px)\"\n }\n }, this.props.children);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcHVibGljc2VydmVycy9sYXllci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvcHVibGljc2VydmVycy9sYXllci5qcz9lNDFkIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgRE9NIGZyb20gXCIuLi8uLi9tb2R1bGVzL2RvbXRvb2xzXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfTGF5ZXIgZXh0ZW5kcyBCRFYyLnJlYWN0Q29tcG9uZW50IHtcbiAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICBzdXBlcihwcm9wcyk7XG4gICAgdGhpcy5rZXl1cExpc3RlbmVyID0gdGhpcy5rZXl1cExpc3RlbmVyLmJpbmQodGhpcyk7XG4gIH1cblxuICBrZXl1cExpc3RlbmVyKGUpIHtcbiAgICBpZiAoZS53aGljaCA9PT0gMjcpIHtcbiAgICAgIEJEVjIucmVhY3REb20udW5tb3VudENvbXBvbmVudEF0Tm9kZSh0aGlzLnJlZnMucm9vdC5wYXJlbnROb2RlKTtcbiAgICB9XG4gIH1cblxuICBjb21wb25lbnREaWRN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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/publicservers/layer.js\n"); /***/ }), /***/ "./src/ui/publicservers/publicServers.js": /*!***********************************************!*\ !*** ./src/ui/publicservers/publicServers.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_PublicServers; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _settingsTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _tabBarSeparator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tabBarSeparator */ \"./src/ui/tabBarSeparator.js\");\n/* harmony import */ var _tabBarHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tabBarHeader */ \"./src/ui/tabBarHeader.js\");\n/* harmony import */ var _tabBarItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tabBarItem */ \"./src/ui/tabBarItem.js\");\n/* harmony import */ var _serverCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./serverCard */ \"./src/ui/publicservers/serverCard.js\");\n/* harmony import */ var _sidebarView__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sidebarView */ \"./src/ui/publicservers/sidebarView.js\");\n\n\n\n\n\n\n\n\nclass V2C_PublicServers extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.setInitialState();\n this.close = this.close.bind(this);\n this.changeCategory = this.changeCategory.bind(this);\n this.search = this.search.bind(this);\n this.searchKeyDown = this.searchKeyDown.bind(this);\n this.checkConnection = this.checkConnection.bind(this);\n this.join = this.join.bind(this);\n this.connect = this.connect.bind(this);\n this.GuildStore = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].WebpackModules.findByUniqueProperties([\"getGuilds\"]);\n this.AvatarDefaults = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].WebpackModules.findByUniqueProperties([\"getUserAvatarURL\", \"DEFAULT_AVATARS\"]);\n this.InviteActions = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n this.SortedGuildStore = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].WebpackModules.findByUniqueProperties([\"getSortedGuilds\"]);\n }\n\n componentDidMount() {\n this.checkConnection();\n }\n\n setInitialState() {\n this.state = {\n selectedCategory: -1,\n title: \"Loading...\",\n loading: true,\n servers: [],\n next: null,\n connection: {\n state: 0,\n user: null\n }\n };\n }\n\n close() {\n _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactDom.unmountComponentAtNode(document.getElementById(this.props.rootId));\n }\n\n search(query, clear) {\n const self = this;\n\n const request = __webpack_require__(/*! request */ \"request\");\n\n request.get({\n url: `${self.endPoint}${query}${query ? \"&schema=new\" : \"?schema=new\"}`,\n json: true\n }, function (err, resp, data) {\n if (err) {\n return self.setState({\n loading: false,\n title: \"Failed to load servers. Check console for details\"\n });\n }\n\n let servers = data.results.reduce((arr, server) => {\n server.joined = false;\n arr.push(server); // arr.push();\n\n return arr;\n }, []);\n\n if (!clear) {\n servers = self.state.servers.concat(servers);\n } else {//servers.unshift(self.bdServer);\n }\n\n let end = data.size + data.from;\n data.next = `?from=${end}`;\n if (self.state.term) data.next += `&term=${self.state.term}`;\n if (self.state.selectedCategory) data.next += `&category=${self.categoryButtons[self.state.selectedCategory]}`;\n\n if (end >= data.total) {\n end = data.total;\n data.next = null;\n }\n\n let title = `Showing 1-${end} of ${data.total} results in ${self.categoryButtons[self.state.selectedCategory]}`;\n if (self.state.term) title += ` for ${self.state.term}`;\n self.setState({\n loading: false,\n title: title,\n servers: servers,\n next: data.next\n });\n\n if (clear) {\n //console.log(self);\n self.refs.sbv.refs.contentScroller.scrollTop = 0;\n }\n });\n }\n\n async join(serverCard) {\n if (serverCard.props.pinned) return this.InviteActions.acceptInvite(serverCard.props.invite_code);\n await fetch(`${this.joinEndPoint}/${serverCard.props.server.identifier}`, {\n method: \"GET\",\n credentials: \"include\",\n mode: \"cors\",\n headers: {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\"\n }\n });\n serverCard.setState({\n joined: true\n });\n }\n\n connect() {\n const self = this;\n const options = self.windowOptions;\n options.x = Math.round(window.screenX + window.innerWidth / 2 - options.width / 2);\n options.y = Math.round(window.screenY + window.innerHeight / 2 - options.height / 2);\n self.joinWindow = new (window.require(\"electron\").remote.BrowserWindow)(options);\n const url = \"https://auth.discordservers.com/connect?scopes=guilds.join&previousUrl=https://auth.discordservers.com/info\";\n self.joinWindow.webContents.on(\"did-navigate\", (event, url) => {\n if (url != \"https://auth.discordservers.com/info\") return;\n self.joinWindow.close();\n self.checkConnection();\n });\n self.joinWindow.loadURL(url);\n }\n\n get windowOptions() {\n return {\n width: 500,\n height: 550,\n backgroundColor: \"#282b30\",\n show: true,\n resizable: false,\n maximizable: false,\n minimizable: false,\n alwaysOnTop: true,\n frame: false,\n center: false,\n webPreferences: {\n nodeIntegration: false\n }\n };\n }\n\n get bdServer() {\n const server = {\n name: \"BetterDiscord\",\n online: \"7500+\",\n members: \"20000+\",\n categories: [\"community\", \"programming\", \"support\"],\n description: \"Official BetterDiscord server for support etc\",\n identifier: \"86004744966914048\",\n iconUrl: \"https://cdn.discordapp.com/icons/86004744966914048/292e7f6bfff2b71dfd13e508a859aedd.webp\",\n nativejoin: true,\n invite_code: \"0Tmfo5ZbORCRqbAd\",\n pinned: true\n };\n const guildList = this.SortedGuildStore.getFlattenedGuildIds();\n const defaultList = this.AvatarDefaults.DEFAULT_AVATARS;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_serverCard__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n server: server,\n pinned: true,\n join: this.join,\n guildList: guildList,\n fallback: defaultList[Math.floor(Math.random() * 5)]\n });\n }\n\n get endPoint() {\n return \"https://search.discordservers.com\";\n }\n\n get joinEndPoint() {\n return \"https://j.discordservers.com\";\n }\n\n get connectEndPoint() {\n return \"https://join.discordservers.com/connect\";\n }\n\n async checkConnection() {\n const self = this;\n\n try {\n const response = await fetch(`https://auth.discordservers.com/info`, {\n method: \"GET\",\n credentials: \"include\",\n mode: \"cors\",\n headers: {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\"\n }\n });\n const data = await response.json();\n self.setState({\n selectedCategory: 0,\n connection: {\n state: 2,\n user: data\n }\n });\n self.search(\"\", true);\n } catch (error) {\n self.setState({\n title: \"Not connected to discordservers.com!\",\n loading: true,\n selectedCategory: -1,\n connection: {\n state: 1,\n user: null\n }\n });\n }\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_sidebarView__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n ref: \"sbv\"\n }, this.component);\n }\n\n get component() {\n return {\n sidebar: {\n component: this.sidebar\n },\n content: {\n component: this.content\n },\n tools: {\n component: _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tools__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n key: \"pt\",\n ref: \"tools\",\n onClick: this.close\n })\n }\n };\n }\n\n get sidebar() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"sidebar\",\n key: \"ps\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-tab-bar SIDE\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-tab-bar-header\",\n style: {\n fontSize: \"16px\"\n }\n }, \"Public Servers\"), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), this.searchInput, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarHeader__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n text: \"Categories\"\n }), this.categoryButtons.map((value, index) => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarItem__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n id: index,\n onClick: this.changeCategory,\n key: index,\n text: value,\n selected: this.state.selectedCategory === index\n });\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), this.footer, this.connection));\n }\n\n get searchInput() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-form-item\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-text-input flex-vertical\",\n style: {\n width: \"172px\",\n marginLeft: \"10px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"input\", {\n ref: \"searchinput\",\n onKeyDown: this.searchKeyDown,\n onChange: () => {},\n type: \"text\",\n className: \"input default\",\n placeholder: \"Search...\",\n maxLength: \"50\"\n })));\n }\n\n searchKeyDown(e) {\n const self = this;\n if (self.state.loading || e.which !== 13) return;\n self.setState({\n loading: true,\n title: \"Loading...\",\n term: e.target.value\n });\n let query = `?term=${e.target.value}`;\n\n if (self.state.selectedCategory !== 0) {\n query += `&category=${self.categoryButtons[self.state.selectedCategory]}`;\n }\n\n self.search(query, true);\n }\n\n get categoryButtons() {\n return [\"All\", \"FPS Games\", \"MMO Games\", \"Strategy Games\", \"MOBA Games\", \"RPG Games\", \"Tabletop Games\", \"Sandbox Games\", \"Simulation Games\", \"Music\", \"Community\", \"Language\", \"Programming\", \"Other\"];\n }\n\n changeCategory(id) {\n const self = this;\n if (self.state.loading) return;\n self.refs.searchinput.value = \"\";\n self.setState({\n loading: true,\n selectedCategory: id,\n title: \"Loading...\",\n term: null\n });\n\n if (id === 0) {\n self.search(\"\", true);\n return;\n }\n\n self.search(`?category=${self.categoryButtons[id]}`, true);\n }\n\n get content() {\n const self = this;\n const guildList = this.SortedGuildStore.getFlattenedGuildIds();\n const defaultList = this.AvatarDefaults.DEFAULT_AVATARS;\n if (self.state.connection.state === 1) return self.notConnected;\n return [_modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n ref: \"content\",\n key: \"pc\",\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: self.state.title\n }), self.bdServer, self.state.servers.map(server => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_serverCard__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n key: server.identifier,\n server: server,\n join: self.join,\n guildList: guildList,\n fallback: defaultList[Math.floor(Math.random() * 5)]\n });\n }), self.state.next && _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n type: \"button\",\n onClick: () => {\n if (self.state.loading) return;\n self.setState({\n loading: true\n });\n self.search(self.state.next, false);\n },\n className: \"ui-button filled brand small grow\",\n style: {\n width: \"100%\",\n marginTop: \"10px\",\n marginBottom: \"10px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\"\n }, self.state.loading ? \"Loading\" : \"Load More\")), self.state.servers.length > 0 && _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: self.state.title\n }))];\n }\n\n get notConnected() {\n const self = this; //return BDV2.react.createElement(SettingsTitle, { text: self.state.title });\n\n return [_modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n key: \"ncc\",\n ref: \"content\",\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h2\", {\n className: \"ui-form-title h2 margin-reset margin-bottom-20\"\n }, \"Not connected to discordservers.com!\", _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n onClick: self.connect,\n type: \"button\",\n className: \"ui-button filled brand small grow\",\n style: {\n display: \"inline-block\",\n minHeight: \"18px\",\n marginLeft: \"10px\",\n lineHeight: \"14px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\"\n }, \"Connect\"))), self.bdServer)];\n }\n\n get footer() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-tab-bar-header\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"a\", {\n href: \"https://discordservers.com\",\n target: \"_blank\"\n }, \"Discordservers.com\"));\n }\n\n get connection() {\n const self = this;\n const {\n connection\n } = self.state;\n if (connection.state !== 2) return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"span\", null);\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"span\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"span\", {\n style: {\n color: \"#b9bbbe\",\n fontSize: \"10px\",\n marginLeft: \"10px\"\n }\n }, \"Connected as: \", `${connection.user.username}#${connection.user.discriminator}`), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n style: {\n padding: \"5px 10px 0 10px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n style: {\n width: \"100%\",\n minHeight: \"20px\"\n },\n type: \"button\",\n className: \"ui-button filled brand small grow\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\",\n onClick: self.connect\n }, \"Reconnect\"))));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcHVibGljc2VydmVycy9wdWJsaWNTZXJ2ZXJzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/publicservers/publicServers.js\n"); /***/ }), /***/ "./src/ui/publicservers/serverCard.js": /*!********************************************!*\ !*** ./src/ui/publicservers/serverCard.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_ServerCard; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_ServerCard extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n if (!this.props.server.iconUrl) this.props.server.iconUrl = this.props.fallback;\n this.state = {\n imageError: false,\n joined: this.props.guildList.includes(this.props.server.identifier)\n };\n }\n\n render() {\n const {\n server\n } = this.props;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", // cardPrimary-1Hv-to\n {\n className: `card-3Qj_Yx cardPrimary-1Hv-to marginBottom8-AtZOdT bd-server-card${server.pinned ? \" bd-server-card-pinned\" : \"\"}`\n }, // BDV2.react.createElement(\n // \"div\",\n // { className: \"flex-1xMQg5 flex-1O1GKY horizontal-1ae9ci horizontal-2EEEnY flex-1O1GKY directionRow-3v3tfG justifyStart-2yIZo0 alignStretch-1hwxMa noWrap-3jynv6\" },\n _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"img\", {\n ref: \"img\",\n className: \"bd-server-image\",\n src: server.iconUrl,\n onError: this.handleError.bind(this)\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"flexChild-faoVW3 bd-server-content\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"flex-1xMQg5 flex-1O1GKY horizontal-1ae9ci horizontal-2EEEnY directionRow-3v3tfG noWrap-3jynv6 bd-server-header\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h5\", {\n className: \"h5-18_1nd defaultColor-1_ajX0 margin-reset bd-server-name\"\n }, server.name), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h5\", {\n className: \"h5-18_1nd defaultColor-1_ajX0 margin-reset bd-server-member-count\"\n }, server.members, \" Members\")), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"flex-1xMQg5 flex-1O1GKY horizontal-1ae9ci horizontal-2EEEnY directionRow-3v3tfG noWrap-3jynv6\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"scrollerWrap-2lJEkd scrollerThemed-2oenus themeGhostHairline-DBD-2d scrollerFade-1Ijw5y bd-server-description-container\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"scroller-2FKFPG scroller bd-server-description\"\n }, server.description))), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"flex-1xMQg5 flex-1O1GKY horizontal-1ae9ci horizontal-2EEEnY directionRow-3v3tfG noWrap-3jynv6 bd-server-footer\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"flexChild-faoVW3 bd-server-tags\",\n style: {\n flex: \"1 1 auto\"\n }\n }, server.categories.join(\", \")), this.state.joined && _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n type: \"button\",\n className: \"button-38aScr lookFilled-1Gx00P colorBrand-3pXr91 sizeMin-1mJd1x grow-q77ONN colorGreen-29iAKY\",\n style: {\n minHeight: \"12px\",\n marginTop: \"4px\",\n backgroundColor: \"#3ac15c\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\"\n }, \"Joined\")), server.error && _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n type: \"button\",\n className: \"button-38aScr lookFilled-1Gx00P colorBrand-3pXr91 sizeMin-1mJd1x grow-q77ONN disabled-9aF2ug\",\n style: {\n minHeight: \"12px\",\n marginTop: \"4px\",\n backgroundColor: \"#c13a3a\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\"\n }, \"Error\")), !server.error && !this.state.joined && _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"button\", {\n type: \"button\",\n className: \"button-38aScr lookFilled-1Gx00P colorBrand-3pXr91 sizeMin-1mJd1x grow-q77ONN\",\n style: {\n minHeight: \"12px\",\n marginTop: \"4px\"\n },\n onClick: () => {\n this.join();\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-button-contents\"\n }, \"Join\")))) // )\n );\n }\n\n handleError() {\n this.props.server.iconUrl = this.props.fallback;\n this.setState({\n imageError: true\n });\n }\n\n join() {\n this.props.join(this); //this.setState({joined: true});\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcHVibGljc2VydmVycy9zZXJ2ZXJDYXJkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9wdWJsaWNzZXJ2ZXJzL3NlcnZlckNhcmQuanM/MmE0ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX1NlcnZlckNhcmQgZXh0ZW5kcyBCRFYyLnJlYWN0Q29tcG9uZW50IHtcbiAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICBzdXBlcihwcm9wcyk7XG4gICAgaWYgKCF0aGlzLnByb3BzLnNlcnZlci5pY29uVXJsKSB0aGlzLnByb3BzLnNlcnZlci5pY29uVXJsID0gdGhpcy5wcm9wcy5mYWxsYmFjaztcbiAgICB0aGlzLnN0YXRlID0ge1xuICAgICAgaW1hZ2VFcnJvcjogZmFsc2UsXG4gICAgICBqb2luZWQ6IHRoaXMucHJvcHMuZ3VpbGRMaXN0LmluY2x1ZGVzKHRoaXMucHJvcHMuc2VydmVyLmlkZW50aWZpZXIpXG4gICAgfTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICBjb25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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/publicservers/serverCard.js\n"); /***/ }), /***/ "./src/ui/publicservers/sidebarView.js": /*!*********************************************!*\ !*** ./src/ui/publicservers/sidebarView.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SidebarView; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scroller */ \"./src/ui/scroller.js\");\n\n\nclass V2C_SidebarView extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n sidebar,\n content,\n tools\n } = this.props.children;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"standardSidebarView-3F1I7i ui-standard-sidebar-view\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"sidebarRegion-VFTUkN sidebar-region\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_scroller__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n key: \"sidebarScroller\",\n ref: \"sidebarScroller\",\n sidebar: true,\n fade: sidebar.fade || true,\n dark: sidebar.dark || true\n }, sidebar.component)), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"contentRegion-3nDuYy content-region\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"contentTransitionWrap-3hqOEW content-transition-wrap\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"scrollerWrap-2lJEkd firefoxFixScrollFlex-cnI2ix contentRegionScrollerWrap-3YZXdm content-region-scroller-wrap scrollerThemed-2oenus themeGhost-28MSn0 scrollerTrack-1ZIpsv\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"scroller-2FKFPG firefoxFixScrollFlex-cnI2ix contentRegionScroller-26nc1e content-region-scroller scroller\",\n ref: \"contentScroller\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, content.component), tools.component)))));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcHVibGljc2VydmVycy9zaWRlYmFyVmlldy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvcHVibGljc2VydmVycy9zaWRlYmFyVmlldy5qcz85OTE1Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgU2Nyb2xsZXIgZnJvbSBcIi4uL3Njcm9sbGVyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfU2lkZWJhclZpZXcgZXh0ZW5kcyBCRFYyLnJlYWN0Q29tcG9uZW50IHtcbiAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICBzdXBlcihwcm9wcyk7XG4gIH1cblxuICByZW5kZXIoKSB7XG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9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/publicservers/sidebarView.js\n"); /***/ }), /***/ "./src/ui/reloadIcon.js": /*!******************************!*\ !*** ./src/ui/reloadIcon.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_ReloadIcon; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_ReloadIcon extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"#dcddde\",\n className: \"bd-reload \" + this.props.className,\n onClick: this.props.onClick,\n style: {\n width: this.props.size || \"24px\",\n height: this.props.size || \"24px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n d: \"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n fill: \"none\",\n d: \"M0 0h24v24H0z\"\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcmVsb2FkSWNvbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFj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MTMgMTFoN1Y0bC0yLjM1IDIuMzV6XCJcbiAgICB9KSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwicGF0aFwiLCB7XG4gICAgICBmaWxsOiBcIm5vbmVcIixcbiAgICAgIGQ6IFwiTTAgMGgyNHYyNEgwelwiXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/reloadIcon.js\n"); /***/ }), /***/ "./src/ui/scroller.js": /*!****************************!*\ !*** ./src/ui/scroller.js ***! \****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_Scroller; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_Scroller extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n //scrollerWrap-2lJEkd scrollerThemed-2oenus themeGhostHairline-DBD-2d scrollerFade-1Ijw5y\n let wrapperClass = `scrollerWrap-2lJEkd scrollerThemed-2oenus themeGhostHairline-DBD-2d${this.props.fade ? \" scrollerFade-1Ijw5y\" : \"\"}`;\n let scrollerClass = \"scroller-2FKFPG scroller\";\n /* fuck */\n\n if (this.props.sidebar) scrollerClass = \"scroller-2FKFPG firefoxFixScrollFlex-cnI2ix sidebarRegionScroller-3MXcoP sidebar-region-scroller scroller\";\n\n if (this.props.contentColumn) {\n scrollerClass = \"scroller-2FKFPG firefoxFixScrollFlex-cnI2ix contentRegionScroller-26nc1e content-region-scroller scroller\";\n /* fuck */\n\n wrapperClass = \"scrollerWrap-2lJEkd firefoxFixScrollFlex-cnI2ix contentRegionScrollerWrap-3YZXdm content-region-scroller-wrap scrollerThemed-2oenus themeGhost-28MSn0 scrollerTrack-1ZIpsv\";\n }\n\n const {\n children\n } = this.props;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n key: \"scrollerwrap\",\n className: wrapperClass\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n key: \"scroller\",\n ref: \"scroller\",\n className: scrollerClass\n }, children));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2Nyb2xsZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Njcm9sbGVyLmpzPzQwNzciXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TY3JvbGxlciBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICAvL3Njcm9sbGVyV3JhcC0ybEpFa2Qgc2Nyb2xsZXJUaGVtZWQtMm9lbnVzIHRoZW1lR2hvc3RIYWlybGluZS1EQkQtMmQgc2Nyb2xsZXJGYWRlLTFJanc1eVxuICAgIGxldCB3cmFwcGVyQ2xhc3MgPSBgc2Nyb2xsZXJXcmFwLTJsSkVrZCB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VtZW50KFwiZGl2XCIsIHtcbiAgICAgIGtleTogXCJzY3JvbGxlcndyYXBcIixcbiAgICAgIGNsYXNzTmFtZTogd3JhcHBlckNsYXNzXG4gICAgfSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGtleTogXCJzY3JvbGxlclwiLFxuICAgICAgcmVmOiBcInNjcm9sbGVyXCIsXG4gICAgICBjbGFzc05hbWU6IHNjcm9sbGVyQ2xhc3NcbiAgICB9LCBjaGlsZHJlbikpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/scroller.js\n"); /***/ }), /***/ "./src/ui/sectionedSettingsPanel.js": /*!******************************************!*\ !*** ./src/ui/sectionedSettingsPanel.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SectionedSettingsPanel; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _settingsGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settingsGroup */ \"./src/ui/settingsGroup.js\");\n\n\nclass V2C_SectionedSettingsPanel extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, this.props.sections.map(section => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_settingsGroup__WEBPACK_IMPORTED_MODULE_1__[\"default\"], Object.assign({}, section, {\n onChange: this.props.onChange\n }));\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2VjdGlvbmVkU2V0dGluZ3NQYW5lbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2VjdGlvbmVkU2V0dGluZ3NQYW5lbC5qcz9hZjUyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgU2V0dGluZ3NHcm91cCBmcm9tIFwiLi9zZXR0aW5nc0dyb3VwXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfU2VjdGlvbmVkU2V0dGluZ3NQYW5lbCBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJjb250ZW50Q29sdW1uLTJocklZSCBjb250ZW50Q29sdW1uRGVmYXVsdC0xVlFrR00gY29udGVudC1jb2x1bW4gZGVmYXVsdFwiXG4gICAgfSwgdGhpcy5wcm9wcy5zZWN0aW9ucy5tYXAoc2VjdGlvbiA9PiB7XG4gICAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFNldHRpbmdzR3JvdXAsIE9iamVjdC5hc3NpZ24oe30sIHNlY3Rpb24sIHtcbiAgICAgICAgb25DaGFuZ2U6IHRoaXMucHJvcHMub25DaGFuZ2VcbiAgICAgIH0pKTtcbiAgICB9KSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/sectionedSettingsPanel.js\n"); /***/ }), /***/ "./src/ui/settingsGroup.js": /*!*********************************!*\ !*** ./src/ui/settingsGroup.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SettingsGroup; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _settingsTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./switch */ \"./src/ui/switch.js\");\n\n\n\n\nclass V2C_SettingsGroup extends _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n title,\n settings,\n button\n } = this.props;\n const buttonComponent = button ? _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"button\", {\n key: \"title-button\",\n className: \"bd-pfbtn\",\n onClick: button.onClick\n }, button.title) : null;\n return [_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: title\n }), buttonComponent, settings.map(setting => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_switch__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n id: setting.id,\n key: setting.id,\n data: setting,\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][setting.id],\n onChange: (id, checked) => {\n this.props.onChange(id, checked);\n }\n });\n })];\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2V0dGluZ3NHcm91cC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2V0dGluZ3NHcm91cC5qcz8zYzIzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFNldHRpbmdzVGl0bGUgZnJvbSBcIi4vc2V0dGluZ3NUaXRsZVwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9zd2l0Y2hcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TZXR0aW5nc0dyb3VwIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IH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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/settingsGroup.js\n"); /***/ }), /***/ "./src/ui/settingsPanel.js": /*!*********************************!*\ !*** ./src/ui/settingsPanel.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SettingsPanel; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _settingsTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./switch */ \"./src/ui/switch.js\");\n\n\n\n\nclass V2C_SettingsPanel extends _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n settings\n } = this.props;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_settingsTitle__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: this.props.title\n }), this.props.button && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"button\", {\n key: \"title-button\",\n className: \"bd-pfbtn\",\n onClick: this.props.button.onClick\n }, this.props.button.title), settings.map(setting => {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_switch__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n id: setting.id,\n key: setting.id,\n data: setting,\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][setting.id],\n onChange: (id, checked) => {\n this.props.onChange(id, checked);\n }\n });\n }));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2V0dGluZ3NQYW5lbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2V0dGluZ3NQYW5lbC5qcz81NzYwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFNldHRpbmdzVGl0bGUgZnJvbSBcIi4vc2V0dGluZ3NUaXRsZVwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9zd2l0Y2hcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TZXR0aW5nc1BhbmVsIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHNldHRpbmdzXG4gICAgfSA9IHRoaXMucHJvcHM7XG4gICAgcmV0dXJuIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwiY29udGVudENvbHVtbi0yaHJJWUggY29udGVudENvbHVtbkRl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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/settingsPanel.js\n"); /***/ }), /***/ "./src/ui/settingsTitle.js": /*!*********************************!*\ !*** ./src/ui/settingsTitle.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SettingsTitle; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_SettingsTitle extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n } //h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi da-h2 da-title da-size16 da-height20 da-weightSemiBold defaultColor-1_ajX0 da-defaultColor marginTop60-3PGbtK da-marginTop60 marginBottom20-32qID7 da-marginBottom20\n\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h2\", {\n className: \"ui-form-title h2 margin-reset margin-bottom-20 marginTop60-3PGbtK da-marginTop6\"\n }, this.props.text);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2V0dGluZ3NUaXRsZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2V0dGluZ3NUaXRsZS5qcz9iMjZmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfU2V0dGluZ3NUaXRsZSBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfSAvL2gyLTJnV0UtbyB0aXRsZS0zc1pXWVEgc2l6ZTE2LTE0Y0d6NSBoZWlnaHQyMC1tTzJlSU4gd2VpZ2h0U2VtaUJvbGQtTkpleHppIGRhLWgyIGRhLXRpdGxlIGRhLXNpemUxNiBkYS1oZWlnaHQyMCBkYS13ZWlnaHRTZW1pQm9sZCBkZWZhdWx0Q29sb3ItMV9halgwIGRhLWRlZmF1bHRDb2xvciBtYXJnaW5Ub3A2MC0zUEdidEsgZGEtbWFyZ2luVG9wNjAgbWFyZ2luQm90dG9tMjAtMzJxSUQ3IGRhLW1hcmdpbkJvdHRvbTIwXG5cblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImgyXCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS1mb3JtLXRpdGxlIGgyIG1hcmdpbi1yZXNldCBtYXJnaW4tYm90dG9tLTIwIG1hcmdpblRvcDYwLTNQR2J0SyBkYS1tYXJnaW5Ub3A2XCJcbiAgICB9LCB0aGlzLnByb3BzLnRleHQpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/settingsTitle.js\n"); /***/ }), /***/ "./src/ui/sidebar.js": /*!***************************!*\ !*** ./src/ui/sidebar.js ***! \***************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_SideBar; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _tabBarSeparator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tabBarSeparator */ \"./src/ui/tabBarSeparator.js\");\n/* harmony import */ var _tabBarHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tabBarHeader */ \"./src/ui/tabBarHeader.js\");\n/* harmony import */ var _tabBarItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tabBarItem */ \"./src/ui/tabBarItem.js\");\n\n\n\n\nclass V2C_SideBar extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n const si = document.querySelector(\"[class*=side-] > [class*=selected]\");\n if (si) this.scn = si.className;\n const ns = document.querySelector(\"[class*=side-] > [class*='item-']:not([class*=selected])\");\n if (ns) this.nscn = ns.className;\n const tabs = document.querySelectorAll(\"[class*='side-'] > [class*='item-']\");\n\n for (const element of tabs) {\n element.addEventListener(\"click\", () => {\n this.setState({\n selected: null\n });\n });\n }\n\n this.setInitialState();\n this.onClick = this.onClick.bind(this);\n this.setSelected = this.setSelected.bind(this);\n }\n\n setInitialState() {\n const self = this;\n self.state = {\n selected: null,\n items: self.props.items\n };\n const initialSelection = self.props.items.find(item => {\n return item.selected;\n });\n\n if (initialSelection) {\n self.state.selected = initialSelection.id;\n }\n }\n\n render() {\n const self = this;\n const {\n headerText\n } = self.props;\n const {\n items,\n selected\n } = self.state;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", null, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarHeader__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n text: headerText,\n button: this.props.headerButton\n }), items.map(item => {\n const {\n id,\n text\n } = item;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarItem__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n key: id,\n selected: selected === id,\n text: text,\n id: id,\n onClick: self.onClick\n });\n }));\n }\n\n setSelected(e) {\n e.target.className = this.scn;\n }\n\n onClick(id) {\n const si = document.querySelector(\"[class*=side] > [class*=selected]\");\n\n if (si) {\n si.removeEventListener(\"click\", this.setSelected);\n si.addEventListener(\"click\", this.setSelected);\n si.className = this.nscn;\n }\n\n this.setState({\n selected: null\n });\n this.setState({\n selected: id\n });\n if (this.props.onClick) this.props.onClick(id);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2lkZWJhci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2lkZWJhci5qcz9lYjY1Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgVGFiQmFyU2VwYXJhdG9yIGZyb20gXCIuL3RhYkJhclNlcGFyYXRvclwiO1xuaW1wb3J0IFRhYkJhckhlYWRlciBmcm9tIFwiLi90YWJCYXJIZWFkZXJcIjtcbmltcG9ydCBUYWJCYXJJdGVtIGZyb20gXCIuL3RhYkJhckl0ZW1cIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TaWRlQmFyIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIGNvbnN0IHNpID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rv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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/sidebar.js\n"); /***/ }), /***/ "./src/ui/switch.js": /*!**************************!*\ !*** ./src/ui/switch.js ***! \**************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return SwitchItem; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\n\n\nclass SwitchItem extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onChange = this.onChange.bind(this);\n }\n\n onChange() {\n this.props.checked = !this.props.checked;\n this.props.onChange(this.props.id, this.props.checked);\n }\n\n render() {\n const {\n text,\n info\n } = this.props.data;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-vertical flex-justify-start flex-align-stretch flex-nowrap ui-switch-item\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-horizontal flex-justify-start flex-align-stretch flex-nowrap\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h3\", {\n className: \"ui-form-title h3 margin-reset margin-reset ui-flex-child\"\n }, text), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n onChange: this.onChange,\n checked: this.props.checked\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-form-text style-description margin-top-4\",\n style: {\n flex: \"1 1 auto\"\n }\n }, info));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc3dpdGNoLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9zd2l0Y2guanM/YjA2YSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9jb21wb25lbnRzL3N3aXRjaFwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgU3dpdGNoSXRlbSBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpO1xuICB9XG5cbiAgb25DaGFuZ2UoKSB7XG4gICAgdGhpcy5wcm9wcy5jaGVja2VkID0gIXRoaXMucHJvcHMuY2hlY2tlZDtcbiAgICB0aGlzLnByb3BzLm9uQ2hhbmdlKHRoaXMucHJvcHMuaWQsIHRoaXMucHJvcHMuY2hlY2tlZCk7XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgY29uc3Qge1xuICAgICAgdGV4dCxcbiAgICAgIGluZm9cbiAgICB9ID0gdGhpcy5wcm9wcy5kYXRhO1xuIC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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/switch.js\n"); /***/ }), /***/ "./src/ui/tabBarHeader.js": /*!********************************!*\ !*** ./src/ui/tabBarHeader.js ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_TabBarHeader; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_TabBarHeader extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-tab-bar-header\"\n }, this.props.text, this.props.button);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdGFiQmFySGVhZGVyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS90YWJCYXJIZWFkZXIuanM/MTM0ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX1RhYkJhckhlYWRlciBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS10YWItYmFyLWhlYWRlclwiXG4gICAgfSwgdGhpcy5wcm9wcy50ZXh0LCB0aGlzLnByb3BzLmJ1dHRvbik7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/tabBarHeader.js\n"); /***/ }), /***/ "./src/ui/tabBarItem.js": /*!******************************!*\ !*** ./src/ui/tabBarItem.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_TabBarItem; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_TabBarItem extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.setInitialState();\n this.onClick = this.onClick.bind(this);\n }\n\n setInitialState() {\n this.state = {\n selected: this.props.selected || false\n };\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: `ui-tab-bar-item${this.props.selected ? \" selected\" : \"\"}`,\n onClick: this.onClick\n }, this.props.text);\n }\n\n onClick() {\n if (this.props.onClick) {\n this.props.onClick(this.props.id);\n }\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdGFiQmFySXRlbS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvdGFiQmFySXRlbS5qcz81YzZhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfVGFiQmFySXRlbSBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLnNldEluaXRpYWxTdGF0ZSgpO1xuICAgIHRoaXMub25DbGljayA9IHRoaXMub25DbGljay5iaW5kKHRoaXMpO1xuICB9XG5cbiAgc2V0SW5pdGlhbFN0YXRlKCkge1xuICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICBzZWxlY3RlZDogdGhpcy5wcm9wcy5zZWxlY3RlZCB8fCBmYWxzZVxuICAgIH07XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICBjbGFzc05hbWU6IGB1aS10YWItYmFyLWl0ZW0ke3RoaXMucHJvcHMuc2VsZWN0ZWQgPyBcIiBzZWxlY3RlZFwiIDogXCJcIn1gLFxuICAgICAgb25DbGljazogdGhpcy5vbkNsaWNrXG4gICAgfSwgdGhpcy5wcm9wcy50ZXh0KTtcbiAgfVxuXG4gIG9uQ2xpY2soKSB7XG4gICAgaWYgKHRoaXMucHJvcHMub25DbGljaykge1xuICAgICAgdGhpcy5wcm9wcy5vbkNsaWNrKHRoaXMucHJvcHMuaWQpO1xuICAgIH1cbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/tabBarItem.js\n"); /***/ }), /***/ "./src/ui/tabBarSeparator.js": /*!***********************************!*\ !*** ./src/ui/tabBarSeparator.js ***! \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_TabBarSeparator; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_TabBarSeparator extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-tab-bar-separator margin-top-8 margin-bottom-8\"\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdGFiQmFyU2VwYXJhdG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS90YWJCYXJTZXBhcmF0b3IuanM/MzI0MiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX1RhYkJhclNlcGFyYXRvciBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS10YWItYmFyLXNlcGFyYXRvciBtYXJnaW4tdG9wLTggbWFyZ2luLWJvdHRvbS04XCJcbiAgICB9KTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/tabBarSeparator.js\n"); /***/ }), /***/ "./src/ui/tools.js": /*!*************************!*\ !*** ./src/ui/tools.js ***! \*************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_Tools; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _xSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xSvg */ \"./src/ui/xSvg.js\");\n\n\nclass V2C_Tools extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onClick = this.onClick.bind(this);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"tools-container toolsContainer-1edPuj\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"tools tools-3-3s-N\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"container-1sFeqf\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"btn-close closeButton-1tv5uR\",\n onClick: this.onClick\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_xSvg__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null)), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"esc-text keybind-KpFkfr\"\n }, \"ESC\"))));\n }\n\n onClick() {\n if (this.props.onClick) {\n this.props.onClick();\n }\n\n const closeButton = document.querySelector(\".closeButton-1tv5uR\");\n if (closeButton) closeButton.click();\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Rvb2xzLmpzPzA3ZWQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBYU3ZnIGZyb20gXCIuL3hTdmdcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19Ub29scyBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2xpY2sgPSB0aGlzLm9uQ2xpY2suYmluZCh0aGlzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ0b29scy1jb250YWluZXIgd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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/tools.js\n"); /***/ }), /***/ "./src/ui/tooltip.js": /*!***************************!*\ !*** ./src/ui/tooltip.js ***! \***************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return EmulatedTooltip; });\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _modules_webpackModules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/webpackModules */ \"./src/modules/webpackModules.js\");\n/**\r\n * Tooltip that automatically show and hide themselves on mouseenter and mouseleave events.\r\n * Will also remove themselves if the node to watch is removed from DOM through\r\n * a MutationObserver.\r\n *\r\n * Note this is not using Discord's internals but normal DOM manipulation and emulates\r\n * Discord's own tooltips as closely as possible.\r\n *\r\n * @module EmulatedTooltip\r\n * @version 0.0.1\r\n */\n\n\nconst TooltipClasses = _modules_webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"tooltip\", \"tooltipBlack\");\nconst TooltipLayers = _modules_webpackModules__WEBPACK_IMPORTED_MODULE_1__[\"default\"].findByProps(\"layer\", \"layerContainer\");\n\nconst getClass = function (sideOrColor) {\n const upperCase = sideOrColor[0].toUpperCase() + sideOrColor.slice(1);\n const tooltipClass = TooltipClasses[`tooltip${upperCase}`];\n if (tooltipClass) return tooltipClass;\n return null;\n};\n\nconst classExists = function (sideOrColor) {\n return getClass(sideOrColor) ? true : false;\n};\n\nconst toPx = function (value) {\n return `${value}px`;\n};\n/*
\r\n
\r\n
\r\n User Settings\r\n
\r\n
*/\n\n\nclass EmulatedTooltip {\n /**\r\n *\r\n * @constructor\r\n * @param {(HTMLElement|jQuery)} node - DOM node to monitor and show the tooltip on\r\n * @param {string} tip - string to show in the tooltip\r\n * @param {object} options - additional options for the tooltip\r\n * @param {string} [options.style=black] - correlates to the discord styling/colors (black, brand, green, grey, red, yellow)\r\n * @param {string} [options.side=top] - can be any of top, right, bottom, left\r\n * @param {boolean} [options.preventFlip=false] - prevents moving the tooltip to the opposite side if it is too big or goes offscreen\r\n * @param {boolean} [options.disabled=false] - whether the tooltip should be disabled from showing on hover\r\n */\n constructor(node, text, options = {}) {\n const {\n style = \"black\",\n side = \"top\",\n preventFlip = false,\n disabled = false\n } = options;\n this.node = node instanceof jQuery ? node[0] : node;\n this.label = text;\n this.style = style.toLowerCase();\n this.side = side.toLowerCase();\n this.preventFlip = preventFlip;\n this.disabled = disabled;\n if (!classExists(this.side)) return _modules_utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].err(\"EmulatedTooltip\", `Side ${this.side} does not exist.`);\n if (!classExists(this.style)) return _modules_utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].err(\"EmulatedTooltip\", `Style ${this.style} does not exist.`);\n this.element = document.createElement(\"div\");\n this.element.className = TooltipLayers.layer;\n this.tooltipElement = document.createElement(\"div\");\n this.tooltipElement.className = `${TooltipClasses.tooltip} ${getClass(this.style)}`;\n this.labelElement = document.createTextNode(\"TEST\");\n const pointerElement = document.createElement(\"div\");\n pointerElement.className = TooltipClasses.tooltipPointer;\n this.tooltipElement.append(pointerElement);\n this.tooltipElement.append(this.labelElement);\n this.element.append(this.tooltipElement);\n this.node.addEventListener(\"mouseenter\", () => {\n if (this.disabled) return;\n this.show();\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n const nodes = Array.from(mutation.removedNodes);\n const directMatch = nodes.indexOf(this.node) > -1;\n const parentMatch = nodes.some(parent => parent.contains(this.node));\n\n if (directMatch || parentMatch) {\n this.hide();\n observer.disconnect();\n }\n });\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true\n });\n });\n this.node.addEventListener(\"mouseleave\", () => {\n this.hide();\n });\n }\n /** Container where the tooltip will be appended. */\n\n\n get container() {\n return document.querySelector(\".popouts-2bnG9Z ~ .layerContainer-yqaFcK\");\n }\n /** Boolean representing if the tooltip will fit on screen above the element */\n\n\n get canShowAbove() {\n return this.node.getBoundingClientRect().top - this.element.offsetHeight >= 0;\n }\n /** Boolean representing if the tooltip will fit on screen below the element */\n\n\n get canShowBelow() {\n return this.node.getBoundingClientRect().top + this.node.offsetHeight + this.element.offsetHeight <= _modules_utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].screenHeight;\n }\n /** Boolean representing if the tooltip will fit on screen to the left of the element */\n\n\n get canShowLeft() {\n return this.node.getBoundingClientRect().left - this.element.offsetWidth >= 0;\n }\n /** Boolean representing if the tooltip will fit on screen to the right of the element */\n\n\n get canShowRight() {\n return this.node.getBoundingClientRect().left + this.node.offsetWidth + this.element.offsetWidth <= _modules_utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].screenWidth;\n }\n /** Hides the tooltip. Automatically called on mouseleave. */\n\n\n hide() {\n this.element.remove();\n this.tooltipElement.className = this._className;\n }\n /** Shows the tooltip. Automatically called on mouseenter. Will attempt to flip if position was wrong. */\n\n\n show() {\n this.tooltipElement.className = `${TooltipClasses.tooltip} ${getClass(this.style)}`;\n this.labelElement.textContent = this.label;\n this.container.append(this.element);\n\n if (this.side == \"top\") {\n if (this.canShowAbove || !this.canShowAbove && this.preventFlip) this.showAbove();else this.showBelow();\n }\n\n if (this.side == \"bottom\") {\n if (this.canShowBelow || !this.canShowBelow && this.preventFlip) this.showBelow();else this.showAbove();\n }\n\n if (this.side == \"left\") {\n if (this.canShowLeft || !this.canShowLeft && this.preventFlip) this.showLeft();else this.showRight();\n }\n\n if (this.side == \"right\") {\n if (this.canShowRight || !this.canShowRight && this.preventFlip) this.showRight();else this.showLeft();\n }\n }\n /** Force showing the tooltip above the node. */\n\n\n showAbove() {\n this.tooltipElement.addClass(getClass(\"top\"));\n this.element.style.setProperty(\"top\", toPx(this.node.getBoundingClientRect().top - this.element.offsetHeight - 10));\n this.centerHorizontally();\n }\n /** Force showing the tooltip below the node. */\n\n\n showBelow() {\n this.tooltipElement.addClass(getClass(\"bottom\"));\n this.element.style.setProperty(\"top\", toPx(this.node.getBoundingClientRect().top + this.node.offsetHeight + 10));\n this.centerHorizontally();\n }\n /** Force showing the tooltip to the left of the node. */\n\n\n showLeft() {\n this.tooltipElement.addClass(getClass(\"left\"));\n this.element.style.setProperty(\"left\", toPx(this.node.getBoundingClientRect().left - this.element.offsetWidth - 10));\n this.centerVertically();\n }\n /** Force showing the tooltip to the right of the node. */\n\n\n showRight() {\n this.tooltipElement.addClass(getClass(\"right\"));\n this.element.style.setProperty(\"left\", toPx(this.node.getBoundingClientRect().left + this.node.offsetWidth + 10));\n this.centerVertically();\n }\n\n centerHorizontally() {\n const nodecenter = this.node.getBoundingClientRect().left + this.node.offsetWidth / 2;\n this.element.style.setProperty(\"left\", toPx(nodecenter - this.element.offsetWidth / 2));\n }\n\n centerVertically() {\n const nodecenter = this.node.getBoundingClientRect().top + this.node.offsetHeight / 2;\n this.element.style.setProperty(\"top\", toPx(nodecenter - this.element.offsetHeight / 2));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHRpcC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvdG9vbHRpcC5qcz85NDllIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiBUb29sdGlwIHRoYXQgYXV0b21hdGljYWxseSBzaG93IGFuZCBoaWRlIHRoZW1zZWx2ZXMgb24gbW91c2VlbnRlciBhbmQgbW91c2VsZWF2ZSBldmVudHMuXHJcbiAqIFdpbGwgYWxz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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/tooltip.js\n"); /***/ }), /***/ "./src/ui/tooltipWrap.js": /*!*******************************!*\ !*** ./src/ui/tooltipWrap.js ***! \*******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tooltip */ \"./src/ui/tooltip.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (class extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n async componentDidMount() {\n const {\n style = \"black\",\n side = \"top\",\n text = \"\"\n } = this.props;\n this.node = _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactDom.findDOMNode(this);\n this.tooltip = new _tooltip__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.node, text, {\n style,\n side\n });\n }\n\n componentWillUnmount() {\n this.tooltip.hide();\n delete this.tooltip;\n }\n\n render() {\n return this.props.children;\n }\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHRpcFdyYXAuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Rvb2x0aXBXcmFwLmpzPzk5ZTEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBUb29sdGlwIGZyb20gXCIuL3Rvb2x0aXBcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgYXN5bmMgY29tcG9uZW50RGlkTW91bnQoKSB7XG4gICAgY29uc3Qge1xuICAgICAgc3R5bGUgPSBcImJsYWNrXCIsXG4gICAgICBzaWRlID0gXCJ0b3BcIixcbiAgICAgIHRleHQgPSBcIlwiXG4gICAgfSA9IHRoaXMucHJvcHM7XG4gICAgdGhpcy5ub2RlID0gQkRWMi5yZWFjdERvbS5maW5kRE9NTm9kZSh0aGlzKTtcbiAgICB0aGlzLnRvb2x0aXAgPSBuZXcgVG9vbHRpcCh0aGlzLm5vZGUsIHRleHQsIHtcbiAgICAgIHN0eWxlLFxuICAgICAgc2lkZVxuICAgIH0pO1xuICB9XG5cbiAgY29tcG9uZW50V2lsbFVubW91bnQoKSB7XG4gICAgdGhpcy50b29sdGlwLmhpZGUoKTtcbiAgICBkZWxldGUgdGhpcy50b29sdGlwO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiB0aGlzLnByb3BzLmNoaWxkcmVuO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/tooltipWrap.js\n"); /***/ }), /***/ "./src/ui/xSvg.js": /*!************************!*\ !*** ./src/ui/xSvg.js ***! \************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2C_XSvg; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_XSvg extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 12 12\",\n style: {\n width: \"18px\",\n height: \"18px\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"g\", {\n className: \"background\",\n fill: \"none\",\n fillRule: \"evenodd\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n d: \"M0 0h12v12H0\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"path\", {\n className: \"fill\",\n fill: \"#dcddde\",\n d: \"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6\"\n })));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkveFN2Zy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkveFN2Zy5qcz84MDhjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfWFN2ZyBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/xSvg.js\n"); /***/ }), /***/ "electron": /*!****************************************!*\ !*** external "require(\"electron\")" ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("electron"); /***/ }), /***/ "events": /*!**************************************!*\ !*** external "require(\"events\")" ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("events"); /***/ }), /***/ "fs": /*!**********************************!*\ !*** external "require(\"fs\")" ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("fs"); /***/ }), /***/ "mkdirp": /*!**************************************!*\ !*** external "require(\"mkdirp\")" ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("mkdirp"); /***/ }), /***/ "module": /*!*************************!*\ !*** external "module" ***! \*************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("module"); /***/ }), /***/ "path": /*!************************************!*\ !*** external "require(\"path\")" ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("path"); /***/ }), /***/ "request": /*!***************************************!*\ !*** external "require(\"request\")" ***! \***************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("request"); /***/ }), /***/ "rimraf": /*!**************************************!*\ !*** external "require(\"rimraf\")" ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("rimraf"); /***/ }), /***/ "yauzl": /*!*************************************!*\ !*** external "require(\"yauzl\")" ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = require("yauzl"); /***/ }) /******/ })["default"];