BetterDiscordApp-v1/js/main.js

900 lines
726 KiB
JavaScript

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: 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__, \"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 minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.0\";\nconst bbdChangelog = {\n description: \"There's some pretty big things in this one, and even bigger things coming.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**RepoControls** is now integrated into BD and everyone can enjoy sorting and searching their plugins and themes.\", \"BandagedBD has undergone an internal restructure--it's no longer one messy file but *several*. Users shouldn't see any breaking changes (hopefully).\", \"**Plugin Developers:** You'll begin (or continue for some) to see deprecation notices for several BD globals. Please take these seriously and update your plugins to use `BdApi`, the globals **_will_** be removed. If you find the API to be missing something that you could do before, please message me in BD2's <#603225817262194699> chat.\"]\n }, {\n title: \"Minor Stuff\",\n type: \"improved\",\n items: [\"**BD Blue** is now the default accent color for BBD elements in settings. Themes can customize it easily through some new variables: `--bd-blue`, `--bd-blue-hover`, `--bd-blue-active`\", \"Some improvements have been made to the plugins and themes pages that should hopefully prevent plugins from causing errors when displaying.\"]\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\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: true,\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};\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjLzBnbG9iYWxzLmpzPzAwZDIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdmFyIHNldHRpbm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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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 Object.defineProperty(window, key, {\n get() {\n _modules_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].warn(\"Deprecation Notice\", `\"${key}\" may 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\nclass CoreWrapper {\n constructor(bdConfig) {\n this.mainCore = new _modules_core__WEBPACK_IMPORTED_MODULE_14__[\"default\"](bdConfig);\n }\n\n init() {\n // deprecateGlobal(\"mainCore\", this.mainCore);\n this.mainCore.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2luZGV4LmpzP2JmNDUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGxvY2FsU3RvcmFnZUZpeCBmcm9tIFwiLi9sb2NhbFN0b3JhZ2VGaXhcIjtcbmltcG9ydCBsb2FkaW5nSWNvbiBmcm9tIFwiLi9sb2FkaW5nSWNvblwiO1xubG9jYWxTdG9yYWdlRml4KCk7XG5sb2FkaW5nSWNvbigpO1xuXG5jb25zdCBkZXByZWNhdGVHbG9iYWwgPSAoa2V5LCB2YWx1ZSkgPT4ge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkod2luZG93LCBrZXksIHtcbiAgICBnZXQoKSB7XG4gICAgICBVdGlscy53YXJuKFwiRGVwcmVjYXRpb24gTm90aWNlXCIsIGBcIiR7a2V5fVwiIG1heSBiZSByZW1vdmVkIGluIGZ1dHVyZSB2ZXJzaW9ucy4gUGxlYXNlIG9ubHkgdXNlIEJkQX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3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/index.js\n");
/***/ }),
/***/ "./src/loadingIcon.js":
/*!****************************!*\
!*** ./src/loadingIcon.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 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/MTUzMyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoKSB7XG4gIGNvbnN0IGNvbnRlbnRXaW5kb3dHZXR0ZXIgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEhUTUxJRnJhbWVFbGVtZW50LnByb3RvdHlwZSwgXCJjb250ZW50V2luZG93XCIpLmdldDtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEhUTUxJRnJhbWVFbGVtZW50LnByb3RvdHlwZSwgXCJjb250ZW50V2luZG93XCIsIHtcbiAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgIGNvbnN0IG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ICAgY29uc3QgdXJsID0gYXJndW1lbnRzWzFdO1xuICAgIGlmICh1cmwudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyhcImFwaS93ZWJob29rc1wiKSkgcmV0dXJuIG51bGw7XG4gICAgcmV0dXJuIFJlZmxlY3QuYXBwbHkob09wZW4sIHRoaXMsIGFyZ3VtZW50cyk7XG4gIH07XG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy8yNGhvdXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvMjRob3VyLmpzPzc4OWYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raWUgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuL3YyXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcbmV4cG9ydCBkZWZhdWx0IG5ldyBjbGFzcyBURkhvdXIge1xuICBpbmplY3QyNEhvdXIoKSB7XG4gICAgaWYgKHRoaXMuY2FuY2VsMjRIb3VyKSByZXR1cm47XG4gICAgY29uc3QgdHdl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cbiAgICAgIGFmdGVyOiBjb252ZXJ0XG4gICAgfSk7IC8vIENhbGxlZCBpbiBDb21wYWN0IG1vZGVcblxuICAgIHRoaXMuY2FuY2VsMjRIb3VyID0gKCkgPT4ge1xuICAgICAgY2FuY2VsQ296eSgpO1xuICAgICAgY2FuY2VsQ29tcGFjdCgpO1xuICAgIH07IC8vIENhbmNlbCBib3RoXG5cbiAgfVxuXG4gIHJlbW92ZTI0SG91cigpIHtcbiAgICBpZiAodGhpcy5jYW5jZWwyNEhvdXIpIHRoaXMuY2FuY2VsMjRIb3VyKCk7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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\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 if (this._windowConfigFile) return this._windowConfigFile;\n\n const electron = __webpack_require__(/*! electron */ \"electron\").remote.app;\n\n const path = __webpack_require__(/*! path */ \"path\");\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\", \"config.json\");\n const location = path.resolve(base, \"..\", \"app\", \"config.json\");\n\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const realLocation = fs.existsSync(location) ? location : fs.existsSync(roamingLocation) ? roamingLocation : null;\n if (!realLocation) return this._windowConfigFile = null;\n return this._windowConfigFile = realLocation;\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 if (!this.WindowConfigFile) return {}; // Tempfix until new injection on other platforms\n\n return require(this.WindowConfigFile);\n};\n\nBdApi.getWindowPreference = function (key) {\n if (!this.WindowConfigFile) return undefined; // Tempfix until new injection on other platforms\n\n return this.getAllWindowPreferences()[key];\n};\n\nBdApi.setWindowPreference = function (key, value) {\n if (!this.WindowConfigFile) return; // Tempfix until new injection on other platforms\n\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const prefs = this.getAllWindowPreferences();\n prefs[key] = value;\n delete require.cache[this.WindowConfigFile];\n fs.writeFileSync(this.WindowConfigFile, JSON.stringify(prefs, null, 4));\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.injectCSS = function (id, css) {\n $(\"head\").append($(\"<style>\", {\n id: _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].escapeID(id),\n text: css\n }));\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.clearCSS = function (id) {\n $(\"#\" + _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].escapeID(id)).remove();\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.linkJS = function (id, url) {\n $(\"head\").append($(\"<script>\", {\n id: _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].escapeID(id),\n src: url,\n type: \"text/javascript\"\n }));\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.unlinkJS = function (id) {\n $(\"#\" + _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].escapeID(id)).remove();\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 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 const ModalStack = BdApi.findModuleByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const AlertModal = BdApi.findModuleByPrototypes(\"handleCancel\", \"handleSubmit\", \"handleMinorConfirm\");\n if (!ModalStack || !AlertModal) return _core__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(title, content);\n ModalStack.push(function (props) {\n return BdApi.React.createElement(AlertModal, Object.assign({\n title: title,\n body: content\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<string|ReactElement>)} children - a single or mixed array of react elements and strings. Everything is wrapped in Discord's `TextElement` 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 const ModalStack = BdApi.findModuleByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const TextElement = BdApi.findModuleByProps(\"Sizes\", \"Weights\");\n const ConfirmationModal = BdApi.findModule(m => m.defaultProps && m.key && m.key() == \"confirm-modal\");\n if (!ModalStack || !ConfirmationModal || !TextElement) return _core__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(title, content);\n const {\n onConfirm,\n onCancel,\n confirmText,\n cancelText,\n danger = false\n } = options;\n if (typeof content == \"string\") content = TextElement({\n color: TextElement.Colors.PRIMARY,\n children: [content]\n });else if (Array.isArray(content)) content = TextElement({\n color: TextElement.Colors.PRIMARY,\n children: content\n });\n content = [content];\n\n const emptyFunction = () => {};\n\n ModalStack.push(function (props) {\n return BdApi.React.createElement(ConfirmationModal, Object.assign({\n header: title,\n children: content,\n red: danger,\n confirmText: confirmText ? confirmText : \"Okay\",\n cancelText: cancelText ? cancelText : \"Cancel\",\n onConfirm: onConfirm ? onConfirm : emptyFunction,\n onCancel: onCancel ? onCancel : emptyFunction\n }, props));\n });\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 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\"]);\nObject.freeze(BdApi);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BdApi);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEFwaS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9iZEFwaS5qcz9hOWEzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHBsdWdpbkNvb2tpZSwgdGhlbWVDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMsIHNldHRpbmdzQ29va2llLCBzZXR0aW5ncywgYmRFbW90ZXMgfSBmcm9tIFwiLi4vM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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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 tokens.every(t => contains.call(this, t));\n };\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jbGFzc05vcm1hbGl6ZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvY2xhc3NOb3JtYWxpemVyLmpzP2JmMTkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFdlYnBhY2tNb2R1bGVzIGZyb20gXCIuL3dlYnBhY2tNb2R1bGVzXCI7XG5jb25zdCBub3JtYWxpemVkUHJlZml4ID0gXCJkYVwiO1xuY29uc3QgcmFuZENsYXNzID0gbmV3IFJlZ0V4c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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jb2xvcmVkVGV4dC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9jb2xvcmVkVGV4dC5qcz9lMjk3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi92MlwiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQ29sb3JlZFRleHQge1xuICBpbmplY3RDb2xvcmVkVGV4dCgpIHtcbiAgICBpZiAodGhpcy5jYW5jZWxDb2xvcmVkVGV4dCkgcmV0dXJuO1xuICAgIGlmICghQkRWMi5NZXNzYWdlQ29tcG9uZW50KSByZXR1cm47XG4gICAgdGhpcy5jYW5jZWxDb2xvcmVkVGV4dCA9IFV0aWxzLm1vbmtleVBhdGNoKEJEVjIuTWVzc2FnZUNvbXBvbmVudCwgXCJkZWZhdWx0XCIsIHtcbiAgICAgIGJlZm9yZTogZGF0YSA9PiB7XG4gICAgICAgIGNvbnN0IHByb3BzID0gZGF0YS5t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NhZ2VDb250ZW50LnR5cGUudHlwZSwgb3JpZ2luYWxUeXBlKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuXG4gIHJlbW92ZUNvbG9yZWRUZXh0KCkge1xuICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXCIubWFya3VwLTJCT3ctalwiKS5mb3JFYWNoKGVsZW0gPT4ge1xuICAgICAgZWxlbS5zdHlsZS5zZXRQcm9wZXJ0eShcImNvbG9yXCIsIFwiXCIpO1xuICAgIH0pO1xuICB9XG5cbn0oKTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jb250ZW50TWFuYWdlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9jb250ZW50T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cIkNvdWxkIG5vdCBiZSBjb21waWxlZC5cIixcbiAgICAgICAgZXJyb3I6IHtcbiAgICAgICAgICBtZXNzYWdlOiBlcnJvci5tZXNzYWdlLFxuICAgICAgICAgIHN0YWNrOiBlcnJvci5zdGFja1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cblxuICAgIGNvbnN0IGNvbnRlbnQgPSBfX25vbl93ZWJwYWNrX3JlcXVpcmVfXyhwYXRoLnJlc29sdmUoYmFzZUZvbGRlciwgZmlsZW5hbWUpKTtcblxuICAgIGNvbnRlbnQuaWQgPSBVdGlscy5lc2NhcGVJRChjb250ZW50Lm5hbWUpO1xuXG4gICAgaWYgKGlzUGx1Z2luKSB7XG4gICAgICBpZiAoIWNvbnRlbnQudHlwZSkgcmV0dXJuO1xuXG4gICAgICB0cnkge1xuICAgICAgICBjb250ZW50LnBsdWdpbiA9IG5ldyBjb250ZW50LnR5cGUoKTtcbiAgICAgICAgZGVsZXRlIGJkcGx1Z2luc1tjb250ZW50LnBsdWdpbi5nZXROYW1lKCldO1xuICAgICAgICBiZHBsdWdpbnNbY29udGVudC5wbHVnaW4uZ2V0TmFtZSgpXSA9IGNvbnRlbnQ7XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIG5hbWU6IGZpbGVuYW1lLFxuICAgICAgICAgIGZpbGU6IGZpbGVuYW1lLFxuICAgICAgICAgIG1lc3NhZ2U6IFwiQ291bGQgbm90IGJlIGNvbnN0cnVjdGVkLlwiLFxuICAgICAgICAgIGVycm9yOiB7XG4gICAgICAgICAgICBtZXNzYWdlOiBlcnJvci5tZXNzYWdlLFxuICAgICAgICAgICAgc3RhY2s6IGVycm9yLnN0YWNrXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBkZWxldGUgYmR0aGVtZXNbY29udGVudC5uYW1lXTtcbiAgICAgIGJkdGhlbWVzW2NvbnRlbn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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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 _ui_bdLogo__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/bdLogo */ \"./src/ui/bdLogo.js\");\n\n\n\n // import publicServersModule from \"./publicServers\";\n// import voiceMode from \"./voiceMode\";\n// import dMode from \"./devMode\";\n\n\n\n\n\n\n\n\n\nfunction Core(config) {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"], config);\n}\n\nCore.prototype.init = async function () {\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\"] + \").<br><br> Please download the latest version from <a href='https://github.com/rauenzi/BetterDiscordApp/releases/latest' target='_blank'>GitHub</a>\");\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\"].alert(\"Update Available\", `\n An update for BandagedBD is available (${latestLocalVersion})! Please Reinstall!<br /><br />\n <a href='https://github.com/rauenzi/BetterDiscordApp/releases/latest' target='_blank'>Download Installer</a>\n `);\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing Settings\");\n this.initSettings(); // emoteModule = new EmoteModule();\n // quickEmoteMenu = new QuickEmoteMenu();\n\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 }); // publicServersModule = new V2_PublicServers();\n // voiceMode = new VoiceMode();\n // dMode = new devMode();\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\"); // settingsPanel = new V2_SettingsPanel();\n\n _settingsPanel__WEBPACK_IMPORTED_MODULE_5__[\"default\"].initializeSettings();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Plugins\"); // pluginModule = new PluginModule();\n\n _pluginModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"].loadPlugins();\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Themes\"); // themeModule = new ThemeModule();\n\n _themeModule__WEBPACK_IMPORTED_MODULE_7__[\"default\"].loadThemes();\n $(\"#customcss\").detach().appendTo(document.head);\n window.addEventListener(\"beforeunload\", function () {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-dc-0\"]) document.querySelector(\".btn.btn-disconnect\").click();\n });\n _emoteModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].autoCapitalize();\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};\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 $(document).ready(function () {\n setTimeout(checkForGuilds, 100);\n });\n });\n};\n\nCore.prototype.injectExternals = async function () {\n await _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].injectJs(\"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 $(\"<style id=\\\"customcss\\\">\").text(atob(_dataStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getBDData(\"bdcustomcss\"))).appendTo(document.head);\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 const ModalStack = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const ChangelogClasses = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"fixed\", \"improved\");\n const TextElement = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"Sizes\", \"Weights\");\n const FlexChild = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"Child\");\n const Titles = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].findByProps(\"Tags\", \"default\");\n const Changelog = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.defaultProps && m.defaultProps.selectable == false);\n const MarkdownParser = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"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_4__[\"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.PRIMARY,\n className: ChangelogClasses.date\n }, subtitle));\n };\n\n const renderFooter = () => {\n const Anchor = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"default\"].find(m => m.displayName == \"Anchor\");\n const AnchorClasses = _webpackModules__WEBPACK_IMPORTED_MODULE_9__[\"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_4__[\"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.PRIMARY\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\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 || !Anchor) 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 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(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_10__[\"default\"], {\n size: \"16px\",\n className: \"bd-social-logo\"\n })));\n return returnVal;\n };\n\n children[children.length - 2].type = newOne;\n const BBDLink = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(Anchor, {\n className: \"bd-social-link\",\n href: \"https://twitter.com/BandagedBD\",\n title: \"BandagedBD\",\n target: \"_blank\"\n }, \"BandagedBD\");\n const AuthorLink = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].React.createElement(Anchor, {\n className: \"bd-social-link\",\n href: \"https://twitter.com/ZackRauen\",\n title: \"Zerebos\",\n target: \"_blank\"\n }, \"Zerebos\");\n const additional = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(\"div\", {\n className: \"colorMuted-HdFt4q size12-3cLvbJ\"\n }, [BBDLink, ` ${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdVersion\"]} by `, AuthorLink]);\n const injector = _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(\"div\", {\n className: \"colorMuted-HdFt4q size12-3cLvbJ\"\n }, [\"BBD Injector\", ` ${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdConfig\"].version} by `, AuthorLink]);\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.push(injector);\n returnVal.props.children.push(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\n/* harmony default export */ __webpack_exports__[\"default\"] = (Core);//# sourceURL=[module]\n//# sourceMappingURL=data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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9kYXRhU3RvcmUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvZGF0YVN0b3JlLmpzPzg1ZGIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmRDb25maWcgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IENvbnRlbnRNYW5hZ2VyIGZyb20gXCIuL2NvbnRlbnRNYW5hZ2VyXCI7XG5cbmNvbnN0IGZzID0gcmVxdWlyZShcImZzXCIpO1xuXG5jb25zdCBwYXRoID0gcmVxdWlyZShcInBhdGhcIik7XG5cbmNvbnN0IHJlbGVhc2VDaGFubmVsID0gRGlzY29yZE5hdGl2ZS5nbG9iYWxzLnJlbGVhc2VDaGFubmVsO1xuZXhwb3J0IGRlZmF1bHQgbmV3IGNsYXNzIERhdGFTdG9yZSB7XG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHRoaXMuZGF0YSA9IHtcbiAgICAgIHNldHRpbmdzOiB7XG4gICAgICAgIHN0YWJsZToge30sXG4gICAgICAgIGNhbmFyeToge30sXG4gICAgICAgIHB0Yjoge31cbiAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMucGx1Z2luRGF0YSA9IHt9O1xuICB9XG5cbiAgaW5pdGlhbGl6ZSgpIHtcbiAgICB0cnkge1xuICAg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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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 _v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n\n\nfunction devMode() {}\n\ndevMode.prototype.enable = function (selectorMode) {\n const self = this;\n this.disable();\n $(document).on(\"keydown.bdDevmode\", function (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 if (!selectorMode) return;\n $(document).on(\"contextmenu.bdDevmode\", function (e) {\n self.lastSelector = self.getSelector(e.toElement);\n\n function attach() {\n let cm = $(\".contextMenu-HLZMGh\");\n\n if (cm.length <= 0) {\n cm = $(\"<div class=\\\"contextMenu-HLZMGh bd-context-menu\\\"></div>\");\n cm.addClass($(\".app, .app-2rEoOp\").hasClass(\"theme-dark\") ? \"theme-dark\" : \"theme-light\");\n cm.appendTo(\".app, .app-2rEoOp\");\n cm.css(\"top\", e.clientY);\n cm.css(\"left\", e.clientX);\n $(document).on(\"click.bdDevModeCtx\", () => {\n cm.remove();\n $(document).off(\".bdDevModeCtx\");\n });\n $(document).on(\"contextmenu.bdDevModeCtx\", () => {\n cm.remove();\n $(document).off(\".bdDevModeCtx\");\n });\n $(document).on(\"keyup.bdDevModeCtx\", e => {\n if (e.keyCode === 27) {\n cm.remove();\n $(document).off(\".bdDevModeCtx\");\n }\n });\n }\n\n const cmo = $(\"<div/>\", {\n \"class\": \"itemGroup-1tL0uz\"\n });\n const cmi = $(\"<div/>\", {\n \"class\": \"item-1Yvehc\",\n \"click\": function () {\n _v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].NativeModule.copy(self.lastSelector);\n cm.hide();\n }\n }).append($(\"<span/>\", {\n text: \"Copy Selector\"\n }));\n cmo.append(cmi);\n cm.append(cmo);\n if (cm.hasClass(\"undefined\")) cm.css(\"top\", \"-=\" + cmo.outerHeight());\n }\n\n setImmediate(attach);\n e.stopPropagation();\n });\n};\n\ndevMode.prototype.getRules = function (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\ndevMode.prototype.getSelector = function (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\ndevMode.prototype.disable = function () {\n $(document).off(\"keydown.bdDevmode\");\n $(document).off(\"contextmenu.bdDevmode\");\n $(document).off(\"contextmenu.bdDevModeCtx\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new devMode());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ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AkKGRvY3VtZW50KS5vZmYoXCJrZXlkb3duLmJkRGV2bW9kZVwiKTtcbiAgJChkb2N1bWVudCkub2ZmKFwiY29udGV4dG1lbnUuYmREZXZtb2RlXCIpO1xuICAkKGRvY3VtZW50KS5vZmYoXCJjb250ZXh0bWVudS5iZERldk1vZGVDdHhcIik7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgZGV2TW9kZSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/devMode.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 this.disableAutoCapitalize();\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 $.getJSON(`https://rauenzi.github.io/BetterDiscordApp/data/emotefilter.json`, function (data) {\n resolve(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bemotes\"].concat(data.blacklist));\n });\n });\n};\n\nEmoteModule.prototype.autoCapitalize = function () {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-es-4\"] || this.autoCapitalizeActive) return;\n $(\"body\").on(\"keyup.bdac change.bdac paste.bdac\", $(\".channelTextArea-rNsIhG textarea:first\"), () => {\n const text = $(\".channelTextArea-rNsIhG textarea:first\").val();\n if (text == undefined) return;\n const lastWord = text.split(\" \").pop();\n\n if (lastWord.length > 3) {\n if (lastWord == \"danSgame\") return;\n const ret = this.capitalize(lastWord.toLowerCase());\n\n if (ret !== null && ret !== undefined) {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].insertText(_utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getTextArea()[0], text.replace(lastWord, ret));\n }\n }\n });\n this.autoCapitalizeActive = true;\n};\n\nEmoteModule.prototype.capitalize = function (value) {\n const res = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchGlobal;\n\n for (const p in res) {\n if (res.hasOwnProperty(p) && value == (p + \"\").toLowerCase()) {\n return p;\n }\n }\n};\n\nEmoteModule.prototype.disableAutoCapitalize = function () {\n this.autoCapitalizeActive = false;\n $(\"body\").off(\".bdac\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new EmoteModule());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9lbW90ZU1vZHVsZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9lbW90ZU1vZHVsZS5qcz9hMzdmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJkQ29uZmlnLCBzZXR0aW5nc0Nvb2tpZSwgYmVtb3RlcywgYmRFbW90ZVNldHRpbmdJRHMsIGJkRW1vdGVzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IEJERW1vdGUgZnJvbSBcIi4uL3VpL2JkRW1vdGVcIjtcblxuZnVuY3Rpb24gRW1vdGVNb2R1bGUoKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCBcImNhdGVnb3JpZXNcIiwge1xuICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgY29uc3QgY2F0cyA9IFtdO1xuXG4gICAgICBmb3IgKGNvbnN0IGN1cnJlbnQgaW4gYmRFbW90ZVNldHRpbmdJRHMpIHtcbiAgICAgICAgaWYgKHNldHRpbmdzQ29va2llW2JkRW1vdGVTZXR0aW5nSURzW2N1cnJlbnRdXSkgY2F0cy5wdXNoKGN1cnJlbnQpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gY2F0cztcbiAgICB9XG4gIH0pO1xufVxuXG5FbW90ZU1vZHVsZS5wcm90b3R5cGUuaW5pdCA9IGFzeW5jIGZ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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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\nfunction PluginModule() {}\n\nPluginModule.prototype.loadPlugins = function () {\n this.loadPluginData();\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdpluginErrors\"].concat(_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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9wbHVnaW5Nb2R1bGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2luTW9kdWxlLmpzP2FhN2YiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmRwbHVnaW5FcnJvcnMsIHBsdWdpbkNvb2tpZSwgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2lucyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IENvbnRlbnRNYW5hZ2VyIGZyb20gXCIuL2NvbnRlbnRNYW5hZ2VyXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IEJERXZlbnRzIGZyb20gXCIuL2JkRXZlbnRzXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcblxuZnVuY3Rpb24gUGx1Z2luTW9kdWxlKCkge31cblxuUGx1Z2luTW9kdWxlLnByb3RvdHlwZS5sb2FkUGx1Z2lucyA9IGZ1bmN0aW9uICgpIHtcbiAgdGhpcy5sb2FkUGx1Z2luRGF0YSgpO1xuICBiZHBsdWdpbkVycm9ycy5jb25jYXQoQ29udGVudE1hbmFnZXIubG9hZFBsdWdpbnMoKSk7XG4gIGNvbnN0IHBsdWdpbnMgPSBPYmplY3Qua2V5cyhiZHBsdWdpbnMpO1xuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgcGx1Z2lucy5sZW5ndGg7IGkrKykge1xuICAgIGxldCBwbHVnaW4sI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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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 _ui_publicServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/publicServers */ \"./src/ui/publicServers.js\");\n/* harmony import */ var _ui_layer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/layer */ \"./src/ui/layer.js\");\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_layer__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n rootId: \"pubslayerroot\",\n id: \"pubslayer\",\n children: _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_ui_publicServers__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n rootId: \"pubslayerroot\"\n })\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 if (!$(\".layers, .layers-3iHuyZ\").length) return false;\n $(\".layers, .layers-3iHuyZ\").append($(\"<div/>\", {\n id: \"pubslayerroot\"\n }));\n return true;\n }\n\n render() {\n // BdApi.alert(\"Broken\", \"Sorry but the Public Servers modules is currently broken, I recommend disabling this feature for now.\");\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 = $(\"<div/>\", {\n \"class\": _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].guildClasses.listItem,\n \"id\": \"bd-pub-li\",\n \"style\": _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"] ? \"\" : \"display: none;\"\n }).append($(\"<div/>\", {\n \"class\": \"wrapper-25eVIn \" + _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].guildClasses.circleButtonMask,\n \"text\": \"public\",\n \"id\": \"bd-pub-button\",\n \"click\": () => {\n this.render();\n }\n }));\n return btn;\n }\n\n _appendButton() {\n if ($(\"#bd-pub-li\").length) return;\n const wrapper = _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].guildClasses.wrapper.split(\" \")[0];\n const guilds = $(`.${wrapper} .scroller-2FKFPG >:first-child`);\n guilds.after(this.button);\n }\n\n addButton() {\n if (this.guildPatch) return;\n const GuildList = _webpackModules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].findByDisplayName(\"Guilds\");\n this.guildPatch = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].monkeyPatch(GuildList.prototype, \"render\", {\n after: this._appendButton\n });\n\n this._appendButton();\n }\n\n removeButton() {\n this.guildPatch();\n delete this.guildPatch;\n $(\"#bd-pub-li\").remove();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9wdWJsaWNTZXJ2ZXJzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9tb2R1bGVzL3B1YmxpY1NlcnZlcnMuanM/ZTBlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5nc0Nvb2tpZSB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmltcG9ydCB3ZWJwYWNrTW9kdWxlcyBmcm9tIFwiLi93ZWJwYWNrTW9kdWxlc1wiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5pbXBvcnQgVjJDX1B1YmxpY1NlcnZlcnMgZnJvbSBcIi4uL3VpL3B1YmxpY1NlcnZlcnNcIjtcbmltcG9ydCBMYXllciBmcm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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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\n\n\n\n\nfunction QuickEmoteMenu() {}\n\nQuickEmoteMenu.prototype.init = function () {\n this.initialized = true;\n $(document).on(\"mousedown\", function (e) {\n if (e.target.id != \"rmenu\") $(\"#rmenu\").remove();\n });\n this.favoriteEmotes = {};\n const fe = _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBDData(\"bdfavemotes\");\n\n if (fe !== \"\" && fe !== null) {\n this.favoriteEmotes = JSON.parse(atob(fe));\n }\n\n let qmeHeader = \"\";\n qmeHeader += \"<div id=\\\"bda-qem\\\">\";\n qmeHeader += \" <button class=\\\"active\\\" id=\\\"bda-qem-twitch\\\" onclick='quickEmoteMenu.switchHandler(this); return false;'>Twitch</button>\";\n qmeHeader += \" <button id=\\\"bda-qem-favourite\\\" onclick='quickEmoteMenu.switchHandler(this); return false;'>Favourite</button>\";\n qmeHeader += \" <button id=\\\"bda-qem-emojis\\\" onclick='quickEmoteMenu.switchHandler(this); return false;'>Emojis</buttond>\";\n qmeHeader += \"</div>\";\n this.qmeHeader = qmeHeader;\n let teContainer = \"\";\n teContainer += \"<div id=\\\"bda-qem-twitch-container\\\">\";\n teContainer += \" <div class=\\\"scroller-wrap scrollerWrap-2lJEkd fade\\\">\";\n teContainer += \" <div class=\\\"scroller scroller-2FKFPG\\\">\";\n teContainer += \" <div class=\\\"emote-menu-inner\\\">\";\n let url = \"\";\n\n for (const emote in _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchGlobal) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchGlobal.hasOwnProperty(emote)) {\n url = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdEmotes\"].TwitchGlobal[emote];\n teContainer += \"<div class=\\\"emote-container\\\">\";\n teContainer += \" <img class=\\\"emote-icon\\\" alt=\\\"\\\" src=\\\"\" + url + \"\\\" title=\\\"\" + emote + \"\\\">\";\n teContainer += \" </img>\";\n teContainer += \"</div>\";\n }\n }\n\n teContainer += \" </div>\";\n teContainer += \" </div>\";\n teContainer += \" </div>\";\n teContainer += \"</div>\";\n this.teContainer = teContainer;\n let faContainer = \"\";\n faContainer += \"<div id=\\\"bda-qem-favourite-container\\\">\";\n faContainer += \" <div class=\\\"scroller-wrap scrollerWrap-2lJEkd fade\\\">\";\n faContainer += \" <div class=\\\"scroller scroller-2FKFPG\\\">\";\n faContainer += \" <div class=\\\"emote-menu-inner\\\">\";\n\n for (const emote in this.favoriteEmotes) {\n url = this.favoriteEmotes[emote];\n faContainer += \"<div class=\\\"emote-container\\\">\";\n faContainer += \" <img class=\\\"emote-icon\\\" alt=\\\"\\\" src=\\\"\" + url + \"\\\" title=\\\"\" + emote + \"\\\" oncontextmenu='quickEmoteMenu.favContext(event, this);'>\";\n faContainer += \" </img>\";\n faContainer += \"</div>\";\n }\n\n faContainer += \" </div>\";\n faContainer += \" </div>\";\n faContainer += \" </div>\";\n faContainer += \"</div>\";\n this.faContainer = faContainer;\n};\n\nQuickEmoteMenu.prototype.favContext = function (e, em) {\n e.stopPropagation();\n const menu = $(\"<div>\", {\n \"id\": \"removemenu\",\n \"data-emoteid\": $(em).prop(\"title\"),\n \"text\": \"Remove\",\n \"class\": \"bd-context-menu context-menu theme-dark\"\n });\n menu.css({\n top: e.pageY - $(\"#bda-qem-favourite-container\").offset().top,\n left: e.pageX - $(\"#bda-qem-favourite-container\").offset().left\n });\n $(em).parent().append(menu);\n const self = this;\n menu.on(\"click\", function (e) {\n e.preventDefault();\n e.stopPropagation();\n $(this).remove();\n delete self.favoriteEmotes[$(this).data(\"emoteid\")];\n self.updateFavorites();\n return false;\n });\n return false;\n};\n\nQuickEmoteMenu.prototype.switchHandler = function (e) {\n this.switchQem($(e).attr(\"id\"));\n};\n\nQuickEmoteMenu.prototype.switchQem = function (id) {\n const twitch = $(\"#bda-qem-twitch\");\n const fav = $(\"#bda-qem-favourite\");\n const emojis = $(\"#bda-qem-emojis\");\n twitch.removeClass(\"active\");\n fav.removeClass(\"active\");\n emojis.removeClass(\"active\");\n $(\".emojiPicker-3m1S-j\").hide();\n $(\"#bda-qem-favourite-container\").hide();\n $(\"#bda-qem-twitch-container\").hide();\n\n switch (id) {\n case \"bda-qem-twitch\":\n twitch.addClass(\"active\");\n $(\"#bda-qem-twitch-container\").show();\n break;\n\n case \"bda-qem-favourite\":\n fav.addClass(\"active\");\n $(\"#bda-qem-favourite-container\").show();\n break;\n\n case \"bda-qem-emojis\":\n emojis.addClass(\"active\");\n $(\".emojiPicker-3m1S-j\").show();\n $(\".emojiPicker-3m1S-j input\").focus();\n break;\n }\n\n this.lastTab = id;\n const emoteIcon = $(\".emote-icon\");\n emoteIcon.off();\n emoteIcon.on(\"click\", function () {\n const emote = $(this).attr(\"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[0], ta.val().slice(-1) == \" \" ? ta.val() + emote : ta.val() + \" \" + emote);\n }\n });\n};\n\nQuickEmoteMenu.prototype.obsCallback = function (elem) {\n if (!this.initialized) return;\n const e = $(elem);\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-es-9\"]) {\n e.addClass(\"bda-qme-hidden\");\n } else {\n e.removeClass(\"bda-qme-hidden\");\n }\n\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-es-0\"]) return;\n e.prepend(this.qmeHeader);\n e.append(this.teContainer);\n e.append(this.faContainer);\n\n if (this.lastTab == undefined) {\n this.lastTab = \"bda-qem-emojis\";\n }\n\n this.switchQem(this.lastTab);\n};\n\nQuickEmoteMenu.prototype.favorite = function (name, url) {\n if (!this.favoriteEmotes.hasOwnProperty(name)) {\n this.favoriteEmotes[name] = url;\n }\n\n this.updateFavorites();\n};\n\nQuickEmoteMenu.prototype.updateFavorites = function () {\n let faContainer = \"\";\n faContainer += \"<div id=\\\"bda-qem-favourite-container\\\">\";\n faContainer += \" <div class=\\\"scroller-wrap scrollerWrap-2lJEkd fade\\\">\";\n faContainer += \" <div class=\\\"scroller scroller-2FKFPG\\\">\";\n faContainer += \" <div class=\\\"emote-menu-inner\\\">\";\n\n for (const emote in this.favoriteEmotes) {\n const url = this.favoriteEmotes[emote];\n faContainer += \"<div class=\\\"emote-container\\\">\";\n faContainer += \" <img class=\\\"emote-icon\\\" alt=\\\"\\\" src=\\\"\" + url + \"\\\" title=\\\"\" + emote + \"\\\" oncontextmenu=\\\"quickEmoteMenu.favContext(event, this);\\\">\";\n faContainer += \" </img>\";\n faContainer += \"</div>\";\n }\n\n faContainer += \" </div>\";\n faContainer += \" </div>\";\n faContainer += \" </div>\";\n faContainer += \"</div>\";\n this.faContainer = faContainer;\n $(\"#bda-qem-favourite-container\").replaceWith(faContainer);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setBDData(\"bdfavemotes\", btoa(JSON.stringify(this.favoriteEmotes)));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new QuickEmoteMenu());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9xdWlja0Vtb3RlTWVudS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9xdWlja0Vtb3RlTWVudS5qcz8zMWIwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llLCBiZEVtb3RlcyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IERhdGFTdG9yZSBmcm9tIFwiLi9kYXRhU3RvcmVc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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/quickEmoteMenu.js\n");
/***/ }),
/***/ "./src/modules/settingsPanel.js":
/*!**************************************!*\
!*** ./src/modules/settingsPanel.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 _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsPanelSidebar */ \"./src/modules/settingsPanelSidebar.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _pluginModule__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _themeModule__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _coloredText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./coloredText */ \"./src/modules/coloredText.js\");\n/* harmony import */ var _24hour__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./24hour */ \"./src/modules/24hour.js\");\n/* harmony import */ var _publicServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./publicServers */ \"./src/modules/publicServers.js\");\n/* harmony import */ var _voiceMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./voiceMode */ \"./src/modules/voiceMode.js\");\n/* harmony import */ var _emoteModule__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./emoteModule */ \"./src/modules/emoteModule.js\");\n/* harmony import */ var _classNormalizer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _devMode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./devMode */ \"./src/modules/devMode.js\");\n/* harmony import */ var _quickEmoteMenu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./quickEmoteMenu */ \"./src/modules/quickEmoteMenu.js\");\n/* harmony import */ var _ui_tools__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _ui_reloadIcon__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ui/reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n/* harmony import */ var _ui_scroller__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../ui/scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _ui_list__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../ui/list */ \"./src/ui/list.js\");\n/* harmony import */ var _ui_pluginCard__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../ui/pluginCard */ \"./src/ui/pluginCard.js\");\n/* harmony import */ var _ui_themeCard__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../ui/themeCard */ \"./src/ui/themeCard.js\");\n/* harmony import */ var _ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../ui/sectionedSettingsPanel */ \"./src/ui/sectionedSettingsPanel.js\");\n/* harmony import */ var _ui_settingsPanel__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../ui/settingsPanel */ \"./src/ui/settingsPanel.js\");\n/* harmony import */ var _ui_cssEditor__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../ui/cssEditor */ \"./src/ui/cssEditor.js\");\n/* harmony import */ var _ui_contentColumn__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../ui/contentColumn */ \"./src/ui/contentColumn.js\");\n/* harmony import */ var _ui_errorBoundary__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../ui/errorBoundary */ \"./src/ui/errorBoundary.js\");\n/* harmony import */ var _ui_addonlist__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../ui/addonlist */ \"./src/ui/addonlist.jsx\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_SettingsPanel {\n constructor() {\n const self = this;\n self.sideBarOnClick = self.sideBarOnClick.bind(self);\n self.onChange = self.onChange.bind(self);\n self.updateSettings = this.updateSettings.bind(self);\n self.sidebar = new _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"](self.sideBarOnClick);\n this.buildPluginProps = this.buildPluginProps.bind(this);\n }\n\n get root() {\n const _root = $(\"#bd-settingspane-container\");\n\n if (!_root.length) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root[0];\n }\n\n injectRoot() {\n if (!$(\".layer-3QrUeG .standardSidebarView-3F1I7i, .layer-3QrUeG .ui-standard-sidebar-view\").length) return false;\n const root = $(\"<div/>\", {\n \"class\": \"contentRegion-3nDuYy content-region\",\n \"id\": \"bd-settingspane-container\"\n });\n $(\".layer-3QrUeG .standardSidebarView-3F1I7i, .layer-3QrUeG .ui-standard-sidebar-view\").append(root);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].onRemoved(root[0], () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(root[0]);\n });\n return true;\n }\n\n get coreSettings() {\n const settings = this.getSettings(\"core\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get emoteSettings() {\n return this.getSettings(\"emote\");\n }\n\n getSettings(category) {\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 === category && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n sideBarOnClick(id) {\n const self = this;\n $(\".contentRegion-3nDuYy, .content-region\").first().hide();\n $(self.root).show();\n\n switch (id) {\n case \"core\":\n self.renderCoreSettings();\n break;\n\n case \"emotes\":\n self.renderEmoteSettings();\n break;\n\n case \"customcss\":\n self.renderCustomCssEditor();\n break;\n\n case \"plugins\":\n self.renderPluginPane();\n break;\n\n case \"themes\":\n self.renderThemePane();\n break;\n }\n }\n\n onClick() {}\n\n onChange(id, checked) {\n this.updateSettings(id, checked);\n }\n\n updateSettings(id, enabled) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id] = enabled; // if (id == \"bda-gs-b\") {\n // if (enabled) $(\"body\").addClass(\"bd-blue\");\n // else $(\"body\").removeClass(\"bd-blue\");\n // }\n\n if (id == \"bda-gs-2\") {\n if (enabled) $(\"body\").addClass(\"bd-minimal\");else $(\"body\").removeClass(\"bd-minimal\");\n }\n\n if (id == \"bda-gs-3\") {\n if (enabled) $(\"body\").addClass(\"bd-minimal-chan\");else $(\"body\").removeClass(\"bd-minimal-chan\");\n }\n\n if (id == \"bda-gs-1\") {\n if (enabled) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();else _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].removeButton();\n }\n\n if (id == \"bda-gs-4\") {\n if (enabled) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].enable();else _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].disable();\n }\n\n if (id == \"bda-gs-5\") {\n if (enabled) $(\"#app-mount\").addClass(\"bda-dark\");else $(\"#app-mount\").removeClass(\"bda-dark\");\n }\n\n if (enabled && id == \"bda-gs-6\") _24hour__WEBPACK_IMPORTED_MODULE_10__[\"default\"].inject24Hour();\n\n if (id == \"bda-gs-7\") {\n if (enabled) _coloredText__WEBPACK_IMPORTED_MODULE_9__[\"default\"].injectColoredText();else _coloredText__WEBPACK_IMPORTED_MODULE_9__[\"default\"].removeColoredText();\n }\n\n if (id == \"bda-es-4\") {\n if (enabled) _emoteModule__WEBPACK_IMPORTED_MODULE_13__[\"default\"].autoCapitalize();else _emoteModule__WEBPACK_IMPORTED_MODULE_13__[\"default\"].disableAutoCapitalize();\n }\n\n if (id == \"fork-ps-4\") {\n if (enabled) _classNormalizer__WEBPACK_IMPORTED_MODULE_14__[\"default\"].start();else _classNormalizer__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stop();\n }\n\n if (id == \"fork-ps-5\") {\n if (enabled) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n } else {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"theme\");\n }\n }\n\n if (id == \"fork-wp-1\") {} // BdApi.setWindowPreference(\"transparent\", enabled);\n // if (enabled) BdApi.setWindowPreference(\"backgroundColor\", null);\n // else BdApi.setWindowPreference(\"backgroundColor\", \"#2f3136\");\n\n /*if (_c[\"fork-wp-2\"]) {\r\n const current = BdApi.getWindowPreference(\"frame\");\r\n if (current != _c[\"fork-wp-2\"]) BdApi.setWindowPreference(\"frame\", _c[\"fork-wp-2\"]);\r\n }*/\n\n\n if (id == \"bda-gs-8\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_15__[\"default\"].enable(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]);else _devMode__WEBPACK_IMPORTED_MODULE_15__[\"default\"].disable();\n }\n\n if (id == \"fork-dm-1\") {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_15__[\"default\"].enable(enabled);\n }\n\n this.saveSettings();\n }\n\n async initializeSettings() {\n // if (settingsCookie[\"bda-gs-b\"]) $(\"body\").addClass(\"bd-blue\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-2\"]) $(\"body\").addClass(\"bd-minimal\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-3\"]) $(\"body\").addClass(\"bd-minimal-chan\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-4\"]) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-5\"]) $(\"#app-mount\").addClass(\"bda-dark\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) _24hour__WEBPACK_IMPORTED_MODULE_10__[\"default\"].inject24Hour();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"]) _coloredText__WEBPACK_IMPORTED_MODULE_9__[\"default\"].injectColoredText();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-es-4\"]) _emoteModule__WEBPACK_IMPORTED_MODULE_13__[\"default\"].autoCapitalize();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-4\"]) _classNormalizer__WEBPACK_IMPORTED_MODULE_14__[\"default\"].start();\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"]) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_15__[\"default\"].enable(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]);\n this.saveSettings();\n }\n\n saveSettings() {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"settings\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"]);\n }\n\n loadSettings() {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"settings\"));\n }\n\n renderSidebar() {\n const self = this;\n $(\"[class*='side-'] > [class*='item-']\").off(\"click.v2settingspanel\").on(\"click.v2settingspanel\", () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(self.root);\n $(self.root).hide();\n $(\".contentRegion-3nDuYy, .content-region\").first().show();\n });\n self.sidebar.render();\n }\n\n get coreComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true,\n children: [_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n key: \"cspanel\",\n onChange: this.onChange,\n sections: this.coreSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"tools\"\n })]\n });\n }\n\n get emoteComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true,\n children: [_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_settingsPanel__WEBPACK_IMPORTED_MODULE_25__[\"default\"], {\n key: \"espanel\",\n title: \"Emote Settings\",\n onChange: this.onChange,\n settings: this.emoteSettings,\n button: {\n title: \"Clear Emote Cache\",\n onClick: () => {\n _emoteModule__WEBPACK_IMPORTED_MODULE_13__[\"default\"].clearEmoteData();\n _emoteModule__WEBPACK_IMPORTED_MODULE_13__[\"default\"].init();\n _quickEmoteMenu__WEBPACK_IMPORTED_MODULE_16__[\"default\"].init();\n }\n }\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"tools\"\n })]\n });\n }\n\n get customCssComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true,\n children: [_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_cssEditor__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n key: \"csseditor\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"tools\"\n })]\n });\n }\n\n contentComponent(type) {\n const componentElement = this.getAddonList(type);\n const prefix = type.replace(\"s\", \"\");\n const settingsList = this;\n\n class ContentList extends _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.Component {\n constructor(props) {\n super(props);\n this.onChange = this.onChange.bind(this);\n }\n\n componentDidMount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${prefix}-unloaded`, this.onChange);\n }\n\n componentWillUnmount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${prefix}-unloaded`, this.onChange);\n }\n\n onChange() {\n settingsList.sideBarOnClick(type);\n }\n\n render() {\n return componentElement;\n }\n\n }\n\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(ContentList);\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n buildPluginProps(key) {\n const plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][key].plugin;\n return Object.assign({}, _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][key], {\n name: this.getString(plugin.getName()),\n author: this.getString(plugin.getAuthor()),\n description: this.getString(plugin.getDescription()),\n version: this.getString(plugin.getVersion()),\n getSettingsPanel: plugin.getSettingsPanel && plugin.getSettingsPanel.bind(plugin)\n });\n }\n\n getAddonList(type) {\n const isPlugins = type === \"plugins\";\n const list = isPlugins ? Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]).map(this.buildPluginProps) : Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_addonlist__WEBPACK_IMPORTED_MODULE_29__[\"default\"], {\n type,\n list\n });\n }\n\n renderCoreSettings() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.coreComponent, root);\n }\n\n renderEmoteSettings() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.emoteComponent, root);\n }\n\n renderCustomCssEditor() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.customCssComponent, root);\n }\n\n renderPluginPane() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.contentComponent(\"plugins\"), root);\n }\n\n renderThemePane() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.contentComponent(\"themes\"), root);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy9tb2R1bGVzL3NldHRpbmdzUGFuZWwuanM/NTdiMCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5ncywgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBEYXRhU3RvcmUgZnJvbSBcIi4vZGF0YVN0b3JlXCI7XG5pbXBvcnQgVjJfU2V0dGluZ3NQYW5lbF9TaWRlYmFyIGZyb20gXCIuL3NldHRpbmdzUGFuZWxTaWRlYmFyXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuL3YyXCI7XG5pbXBvcnQgQ29udGVudE1hbmFnZXIgZnJvbSBcIi4vY29udGVudE1hbmFnZXJcIjtcbmltcG9ydCBCREV2ZW50cyBmcm9tIFwiLi9iZEV2ZW50c1wiO1xuaW1wb3J0IHBsdWdpbk1vZHVsZSBmcm9tIFwiLi9wbHVnaW5Nb2R1bGVcIjtcbmltcG9ydCB0aGVtZU1vZ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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/settingsPanel.js\n");
/***/ }),
/***/ "./src/modules/settingsPanelSidebar.js":
/*!*********************************************!*\
!*** ./src/modules/settingsPanelSidebar.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 V2_SettingsPanel_Sidebar; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _ui_sidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/sidebar */ \"./src/ui/sidebar.js\");\n\n\n\nclass V2_SettingsPanel_Sidebar {\n constructor(onClick) {\n this.onClick = onClick;\n }\n\n get items() {\n return [{\n text: \"Settings\",\n id: \"core\"\n }, {\n text: \"Emotes\",\n id: \"emotes\"\n }, {\n text: \"Plugins\",\n id: \"plugins\"\n }, {\n text: \"Themes\",\n id: \"themes\"\n }, {\n text: \"Custom CSS\",\n id: \"customcss\"\n }];\n }\n\n get component() {\n return _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"span\", null, _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_ui_sidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n onClick: this.onClick,\n headerText: \"Bandaged BD\",\n items: this.items\n }));\n }\n\n get root() {\n const _root = $(\"#bd-settings-sidebar\");\n\n if (!_root.length) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root[0];\n }\n\n injectRoot() {\n const changeLog = $(\"[class*='side-'] > [class*='item-']:not([class*=Danger])\").last();\n if (!changeLog.length) return false;\n $(\"<span/>\", {\n id: \"bd-settings-sidebar\"\n }).insertBefore(changeLog.prev());\n return true;\n }\n\n render() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: [class*='side-'] > [class*='item-']:not([class*=Danger])\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactDom.render(this.component, root);\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsU2lkZWJhci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsU2lkZWJhci5qcz85ZTA2Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmlt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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/settingsPanelSidebar.js\n");
/***/ }),
/***/ "./src/modules/themeModule.js":
/*!************************************!*\
!*** ./src/modules/themeModule.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\nfunction ThemeModule() {}\n\nThemeModule.prototype.loadThemes = function () {\n this.loadThemeData();\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemeErrors\"].concat(_contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadThemes());\n const themes = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n\n for (let i = 0; i < themes.length; i++) {\n const theme = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][themes[i]];\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme.name]) _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme.name] = false;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme.name]) $(\"head\").append($(\"<style>\", {\n id: theme.id,\n text: unescape(theme.css)\n }));\n }\n\n for (const theme in _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"]) {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme]) delete _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme];\n }\n\n this.saveThemeData(); // if (settingsCookie[\"fork-ps-5\"]) ContentManager.watchContent(\"theme\");\n};\n\nThemeModule.prototype.enableTheme = function (name, reload = false) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][name] = true;\n this.saveThemeData();\n const theme = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][name];\n $(\"head\").append($(\"<style>\", {\n id: theme.id,\n text: unescape(theme.css)\n }));\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme.name} v${theme.version} has been applied.`);\n};\n\nThemeModule.prototype.enable = function (name, reload = false) {\n return this.enableTheme(name, reload);\n};\n\nThemeModule.prototype.disableTheme = function (name, reload = false) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][name] = false;\n this.saveThemeData();\n const theme = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][name];\n $(`#${theme.id}`).remove();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"] && !reload) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme.name} v${theme.version} has been disabled.`);\n};\n\nThemeModule.prototype.disable = function (name, reload = false) {\n return this.disableTheme(name, reload);\n};\n\nThemeModule.prototype.toggleTheme = function (theme) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme]) this.disableTheme(theme);else this.enableTheme(theme);\n};\n\nThemeModule.prototype.toggle = function (name, reload = false) {\n return this.toggleTheme(name, reload);\n};\n\nThemeModule.prototype.loadTheme = function (filename) {\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadContent(filename, \"theme\");\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n themes: [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. It may not have been 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 theme = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]).find(p => p.filename == filename);\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${theme.name} v${theme.version} was loaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme.name} v${theme.version} was loaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"theme-loaded\", theme.name);\n};\n\nThemeModule.prototype.unloadTheme = function (filenameOrName) {\n const bdtheme = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][filenameOrName];\n if (!bdtheme) return;\n const theme = bdtheme.name;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme]) this.disableTheme(theme, true);\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].unloadContent(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].filename, \"theme\");\n delete _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme];\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n themes: [error]\n });\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme} 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\", `${theme} could not be unloaded. It may have not been loaded yet.`, error);\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${theme} was unloaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme} was unloaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"theme-unloaded\", theme);\n};\n\nThemeModule.prototype.delete = function (filenameOrName) {\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][filenameOrName];\n if (!bdplugin) return;\n this.unloadTheme(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\nThemeModule.prototype.reloadTheme = function (filenameOrName) {\n const bdtheme = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][filenameOrName];\n if (!bdtheme) return this.loadTheme(filenameOrName);\n const theme = bdtheme.name;\n const error = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reloadContent(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].filename, \"theme\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][theme]) this.disableTheme(theme, true), this.enableTheme(theme, true);\n\n if (error) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-1\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showContentErrors({\n themes: [error]\n });\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme} could not be reloaded.`, {\n type: \"error\"\n });\n return _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].err(\"ContentManager\", `${theme} could not be reloaded.`, error);\n }\n\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].log(\"ContentManager\", `${theme} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].version} was reloaded.`);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-2\"]) _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].showToast(`${theme} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].version} was reloaded.`, {\n type: \"success\"\n });\n _bdEvents__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dispatch(\"theme-reloaded\", theme);\n};\n\nThemeModule.prototype.reload = function (name) {\n return this.reloadTheme(name);\n};\n\nThemeModule.prototype.edit = function (filenameOrName) {\n const bdplugin = Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]).find(p => p.filename == filenameOrName) || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][filenameOrName];\n if (!bdplugin) return;\n\n const fullPath = __webpack_require__(/*! path */ \"path\").resolve(_contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].themesFolder, bdplugin.filename);\n\n __webpack_require__(/*! electron */ \"electron\").shell.openItem(`${fullPath}`);\n};\n\nThemeModule.prototype.updateThemeList = function () {\n const results = _contentManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"].loadNewContent(\"theme\");\n\n for (const filename of results.added) this.loadTheme(filename);\n\n for (const name of results.removed) this.unloadTheme(name);\n};\n\nThemeModule.prototype.loadThemeData = function () {\n const saved = _dataStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSettingGroup(\"themes\");\n\n if (saved) {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"], saved);\n }\n};\n\nThemeModule.prototype.saveThemeData = function () {\n _dataStore__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setSettingGroup(\"themes\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"]);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new ThemeModule());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy90aGVtZU1vZHVsZS5qcy5qcyIsInNvdXJjZ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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/themeModule.js\n");
/***/ }),
/***/ "./src/modules/utils.js":
/*!******************************!*\
!*** ./src/modules/utils.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 Utils; });\nclass Utils {\n /** Document/window width */\n static get screenWidth() {\n return Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n /** Document/window height */\n\n\n static get screenHeight() {\n return Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n }\n\n static stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n\n return content;\n }\n\n static getTextArea() {\n return $(\".channelTextArea-rNsIhG textarea\");\n }\n\n static insertText(textarea, text) {\n textarea.focus();\n textarea.selectionStart = 0;\n textarea.selectionEnd = textarea.value.length;\n document.execCommand(\"insertText\", false, text);\n }\n\n static injectCss(uri) {\n $(\"<link/>\", {\n type: \"text/css\",\n rel: \"stylesheet\",\n href: uri\n }).appendTo($(\"head\"));\n }\n\n static injectJs(uri) {\n return new Promise(resolve => {\n $(\"<script/>\", {\n type: \"text/javascript\",\n src: uri,\n onload: resolve\n }).appendTo($(\"body\"));\n });\n }\n\n static escapeID(id) {\n return id.replace(/^[^a-z]+|[^\\w-]+/gi, \"-\");\n }\n\n static log(moduleName, message) {\n console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, \"color: #3a71c1; font-weight: 700;\", \"color: #3a71c1;\", \"\");\n }\n\n static warn(moduleName, message) {\n console.warn(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, \"color: #E8A400; font-weight: 700;\", \"color: #E8A400;\", \"\");\n }\n\n static err(moduleName, message, error) {\n console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, \"color: red; font-weight: 700;\", \"color: red;\", \"\");\n\n if (error) {\n console.groupCollapsed(\"%cError: \" + error.message, \"color: red;\");\n console.error(error.stack);\n console.groupEnd();\n }\n }\n\n static escape(s) {\n return s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n }\n\n static testJSON(data) {\n try {\n return JSON.parse(data);\n } catch (err) {\n return false;\n }\n }\n\n static isEmpty(obj) {\n if (obj == null || obj == undefined || obj == \"\") return true;\n if (typeof obj !== \"object\") return false;\n if (Array.isArray(obj)) return obj.length == 0;\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) return false;\n }\n\n return true;\n }\n\n static suppressErrors(method, message) {\n return (...params) => {\n try {\n return method(...params);\n } catch (e) {\n this.err(\"SuppressedError\", \"Error occurred in \" + message, e);\n }\n };\n }\n\n static monkeyPatch(what, methodName, options) {\n const {\n before,\n after,\n instead,\n once = false,\n silent = false,\n force = false\n } = options;\n const displayName = options.displayName || what.displayName || what[methodName].displayName || what.name || what.constructor.displayName || what.constructor.name;\n if (!silent) console.log(\"patch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n\n if (!what[methodName]) {\n if (force) what[methodName] = function () {};else return console.error(methodName, \"does not exist for\", displayName); // eslint-disable-line no-console\n }\n\n const origMethod = what[methodName];\n\n const cancel = () => {\n if (!silent) console.log(\"unpatch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n\n what[methodName] = origMethod;\n };\n\n what[methodName] = function () {\n const data = {\n thisObject: this,\n methodArguments: arguments,\n cancelPatch: cancel,\n originalMethod: origMethod,\n callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)\n };\n\n if (instead) {\n const tempRet = Utils.suppressErrors(instead, \"`instead` callback of \" + what[methodName].displayName)(data);\n if (tempRet !== undefined) data.returnValue = tempRet;\n } else {\n if (before) Utils.suppressErrors(before, \"`before` callback of \" + what[methodName].displayName)(data);\n data.callOriginalMethod();\n if (after) Utils.suppressErrors(after, \"`after` callback of \" + what[methodName].displayName)(data);\n }\n\n if (once) cancel();\n return data.returnValue;\n };\n\n Object.assign(what[methodName], origMethod);\n what[methodName].__monkeyPatched = true;\n what[methodName].displayName = displayName;\n\n if (!what[methodName].__originalMethod) {\n what[methodName].__originalMethod = origMethod;\n\n what[methodName].toString = function () {\n return origMethod.toString();\n };\n }\n\n return cancel;\n }\n\n static onRemoved(node, callback) {\n const observer = new MutationObserver(mutations => {\n for (let m = 0; m < mutations.length; m++) {\n const mutation = mutations[m];\n const nodes = Array.from(mutation.removedNodes);\n const directMatch = nodes.indexOf(node) > -1;\n const parentMatch = nodes.some(parent => parent.contains(node));\n\n if (directMatch || parentMatch) {\n observer.disconnect();\n callback();\n }\n }\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true\n });\n }\n\n static getNestedProp(obj, path) {\n return path.split(/\\s?\\.\\s?/).reduce(function (obj, prop) {\n return obj && obj[prop];\n }, obj);\n }\n /**\r\n * This shows a toast similar to android towards the bottom of the screen.\r\n *\r\n * @param {string} content The string to show in the toast.\r\n * @param {object} options Options object. Optional parameter.\r\n * @param {string} options.type Changes the type of the toast stylistically and semantically. Choices: \"\", \"info\", \"success\", \"danger\"/\"error\", \"warning\"/\"warn\". Default: \"\"\r\n * @param {boolean} options.icon Determines whether the icon should show corresponding to the type. A toast without type will always have no icon. Default: true\r\n * @param {number} options.timeout Adjusts the time (in ms) the toast should be shown for before disappearing automatically. Default: 3000\r\n */\n\n\n static showToast(content, options = {}) {\n // if (!bdConfig.deferLoaded) return;\n if (!document.querySelector(\".bd-toasts\")) {\n const toastWrapper = document.createElement(\"div\");\n toastWrapper.classList.add(\"bd-toasts\");\n const boundingElement = document.querySelector(\".chat-3bRxxu form, #friends, .noChannel-Z1DQK7, .activityFeed-28jde9\");\n toastWrapper.style.setProperty(\"left\", boundingElement ? boundingElement.getBoundingClientRect().left + \"px\" : \"0px\");\n toastWrapper.style.setProperty(\"width\", boundingElement ? boundingElement.offsetWidth + \"px\" : \"100%\");\n toastWrapper.style.setProperty(\"bottom\", (document.querySelector(\".chat-3bRxxu form\") ? document.querySelector(\".chat-3bRxxu form\").offsetHeight : 80) + \"px\");\n document.querySelector(\".app, .app-2rEoOp\").appendChild(toastWrapper);\n }\n\n const {\n type = \"\",\n icon = true,\n timeout = 3000\n } = options;\n const toastElem = document.createElement(\"div\");\n toastElem.classList.add(\"bd-toast\");\n if (type) toastElem.classList.add(\"toast-\" + type);\n if (type && icon) toastElem.classList.add(\"icon\");\n toastElem.innerText = content;\n document.querySelector(\".bd-toasts\").appendChild(toastElem);\n setTimeout(() => {\n toastElem.classList.add(\"closing\");\n setTimeout(() => {\n toastElem.remove();\n if (!document.querySelectorAll(\".bd-toasts .bd-toast\").length) document.querySelector(\".bd-toasts\").remove();\n }, 300);\n }, timeout);\n }\n\n static alert(title, content) {\n const modal = $(`<div class=\"bd-modal-wrapper theme-dark\">\n <div class=\"bd-backdrop backdrop-1wrmKB\"></div>\n <div class=\"bd-modal modal-1UGdnR\">\n <div class=\"bd-modal-inner inner-1JeGVc\">\n <div class=\"header header-1R_AjF\">\n <div class=\"title\">${title}</div>\n </div>\n <div class=\"bd-modal-body\">\n <div class=\"scroller-wrap fade\">\n <div class=\"scroller\">\n ${content}\n </div>\n </div>\n </div>\n <div class=\"footer footer-2yfCgX footer-3rDWdC footer-2gL1pp\">\n <button type=\"button\">Okay</button>\n </div>\n </div>\n </div>\n </div>`);\n modal.find(\".footer button\").on(\"click\", () => {\n modal.addClass(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.find(\".bd-backdrop\").on(\"click\", () => {\n modal.addClass(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.appendTo(\"#app-mount\");\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 = $(`<div class=\"bd-modal-wrapper theme-dark\">\n <div class=\"bd-backdrop backdrop-1wrmKB\"></div>\n <div class=\"bd-modal bd-content-modal modal-1UGdnR\">\n <div class=\"bd-modal-inner inner-1JeGVc\">\n <div class=\"header header-1R_AjF\"><div class=\"title\">Content Errors</div></div>\n <div class=\"bd-modal-body\">\n <div class=\"tab-bar-container\">\n <div class=\"tab-bar TOP\">\n <div class=\"tab-bar-item\">Plugins</div>\n <div class=\"tab-bar-item\">Themes</div>\n </div>\n </div>\n <div class=\"table-header\">\n <div class=\"table-column column-name\">Name</div>\n <div class=\"table-column column-message\">Message</div>\n <div class=\"table-column column-error\">Error</div>\n </div>\n <div class=\"scroller-wrap fade\">\n <div class=\"scroller\">\n \n </div>\n </div>\n </div>\n <div class=\"footer footer-2yfCgX\">\n <button type=\"button\">Okay</button>\n </div>\n </div>\n </div>\n </div>`);\n\n function generateTab(errors) {\n const container = $(`<div class=\"errors\">`);\n\n for (const err of errors) {\n const error = $(`<div class=\"error\">\n <div class=\"table-column column-name\">${err.name ? err.name : err.file}</div>\n <div class=\"table-column column-message\">${err.message}</div>\n <div class=\"table-column column-error\"><a class=\"error-link\" href=\"\">${err.error ? err.error.message : \"\"}</a></div>\n </div>`);\n container.append(error);\n\n if (err.error) {\n error.find(\"a\").on(\"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.find(\".tab-bar-item\").on(\"click\", e => {\n e.preventDefault();\n modal.find(\".tab-bar-item\").removeClass(\"selected\");\n $(e.target).addClass(\"selected\");\n modal.find(\".scroller\").empty().append(tabs[$(e.target).index()]);\n });\n modal.find(\".footer button\").on(\"click\", () => {\n modal.addClass(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.find(\".bd-backdrop\").on(\"click\", () => {\n modal.addClass(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.appendTo(\"#app-mount\");\n if (pluginErrors.length) modal.find(\".tab-bar-item\")[0].click();else modal.find(\".tab-bar-item\")[1].click();\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy91dGlscy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy91dGlscy5qcz9jMGY3Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGNsYXNzIFV0aWxzIHtcbiAgLyoqIERvY3VtZW50L3dpbmRvdyB3aWR0aCAqL1xuICBzdGF0aWMgZ2V0IHNjcmVlbldpZHRoKCkge1xuICAgIHJldHVybiBNYXRoLm1heChkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuY2xpZW50V2lkdGgsIHdpbmRvdy5pbm5lcldpZHRoIHx8IDApO1xuICB9XG4gIC8qKiBEb2N1bWVudC93aW5kb3cgaGVpZ2h0ICovXG5cblxuICBzdGF0aWMgZ2V0IHNjcmVlbkhlaWdodCgpIHtcbiAgICByZXR1cm4gTWF0aC5tYXgoZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudEhlaWdodCwgd2luZG93LmlubmVySGVpZ2h0IHx8IDApO1xuICB9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A8ZGl2IGNsYXNzPVwiYmQtbW9kYWwtYm9keVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNjcm9sbGVyLXdyYXAgZmFkZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke2NvbnRlbnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmb290ZXIgZm9vdGVyLTJ5ZkNnWCBmb290ZXItM3JEV2RDIGZvb3Rlci0yZ0wxcHBcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiPk9rYXk8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+YCk7XG4gICAgbW9kYWwuZmluZChcIi5mb290ZXIgYnV0dG9uXCIpLm9uKFwiY2xpY2tcIiwgKCkgPT4ge1xuICAgICAgbW9kYWwuYWRkQ2xhc3MoXCJjbG9zaW5nXCIpO1xuICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgIG1vZGFsLnJlbW92ZSgpO1xuICAgICAgfSwgMzAwKTtcbiAgICB9KTtcbiAgICBtb2RhbC5maW5kKFwiLmJkLWJhY2tkcm9wXCIpLm9uKFwiY2x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bGFzcz1cImJkLW1vZGFsLWJvZHlcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyLWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyIFRPUFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFiLWJhci1pdGVtXCI+UGx1Z2luczwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFiLWJhci1pdGVtXCI+VGhlbWVzPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1oZWFkZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1uYW1lXCI+TmFtZTwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW1lc3NhZ2VcIj5NZXNzYWdlPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tZXJyb3JcIj5FcnJvcjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXItd3JhcCBmYWRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNjcm9sbGVyXCI+XG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmb290ZXIgZm9vdGVyLTJ5ZkNnWFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCI+T2theTwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gKTtcblxuICAgIGZ1bmN0aW9uIGdlbmVyYXRlVGFiKGVycm9ycykge1xuICAgICAgY29uc3QgY29udGFpbmVyID0gJChgPGRpdiBjbGFzcz1cImVycm9yc1wiPmApO1xuXG4gICAgICBmb3IgKGNvbnN0IGVyciBvZiBlcnJvcnMpIHtcbiAgICAgICAgY29uc3QgZXJyb3IgPSAkKGA8ZGl2IGNsYXNzPVwiZXJyb3JcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW5hbWVcIj4ke2Vyci5uYW1lID8gZXJyLm5hbWUgOiBlcnIuZmlsZX08L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW1lc3NhZ2VcIj4ke2Vyci5tZXNzYWdlfTwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tZXJyb3JcIj48YSBjbGFzcz1cImVycm9yLWxpbmtcIiBocmVmPVwiXCI+JHtlcnIuZXJyb3IgPyBlcnIuZXJyb3IubWVzc2FnZSA6IFwiXCJ9PC9hPjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gKTtcbiAgICAgICAgY29udGFpbmVyLmFwcGVuZChlcnJvcik7XG5cbiAgICAgICAgaWYgKGVyci5lcnJvcikge1xuICAgICAgICAgIGVycm9yLmZpbmQoXCJhXCIpLm9uKFwiY2xpY2tcIiwgZSA9PiB7XG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBVdGlscy5lcnIoXCJDb250ZW50TWFuYWdlclwiLCBgRXJyb3IgZGV0YWlscyBmb3IgJHtlcnIubmFtZSA/IGVyci5uYW1lIDogZXJyLmZpbGV9LmAsIGVyci5lcnJvcik7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGNvbnRhaW5lcjtcbiAgICB9XG5cbiAgICBjb25zdCB0YWJzID0gW2dlbmVyYXRlVGFiKHBsdWdpbkVycm9ycyksIGdlbmVyYXRlVGFiKHRoZW1lRXJyb3JzKV07XG4gICAgbW9kYWwuZmluZChcIi50YWItYmFyLWl0ZW1cIikub24oXCJjbGlja1wiLCBlID0+IHtcbiAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgIG1vZGFsLmZpbmQoXCIudGFiLWJhci1pdGVtXCIpLnJlbW92ZUNsYXNzKFwic2VsZWN0ZWRcIik7XG4gICAgICAkKGUudGFyZ2V0KS5hZGRDbGFzcyhcInNlbGVjdGVkXCIpO1xuICAgICAgbW9kYWwuZmluZChcIi5zY3JvbGxlclwiKS5lb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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/utils.js\n");
/***/ }),
/***/ "./src/modules/v2.js":
/*!***************************!*\
!*** ./src/modules/v2.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\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 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 return new Proxy(theModule, {\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;\n return obj[func];\n }\n });\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+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3QgcHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGhlTW9kdWxlLmNsZWFyIC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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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__);\nfunction VoiceMode() {}\n\nVoiceMode.prototype.enable = function () {\n $(\".scroller.guild-channels ul\").first().css(\"display\", \"none\");\n $(\".scroller.guild-channels header\").first().css(\"display\", \"none\");\n $(\".app.flex-vertical, .app-2rEoOp\").first().css(\"overflow\", \"hidden\");\n $(\".chat-3bRxxu\").first().css(\"visibility\", \"hidden\").css(\"min-width\", \"0px\");\n $(\".flex-vertical.channels-wrap\").first().css(\"flex-grow\", \"100000\");\n $(\".guild-header .btn.btn-hamburger\").first().css(\"visibility\", \"hidden\");\n};\n\nVoiceMode.prototype.disable = function () {\n $(\".scroller.guild-channels ul\").first().css(\"display\", \"\");\n $(\".scroller.guild-channels header\").first().css(\"display\", \"\");\n $(\".app.flex-vertical, .app-2rEoOp\").first().css(\"overflow\", \"\");\n $(\".chat-3bRxxu\").first().css(\"visibility\", \"\").css(\"min-width\", \"\");\n $(\".flex-vertical.channels-wrap\").first().css(\"flex-grow\", \"\");\n $(\".guild-header .btn.btn-hamburger\").first().css(\"visibility\", \"\");\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new VoiceMode());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92b2lj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HMgaGVhZGVyXCIpLmZpcnN0KCkuY3NzKFwiZGlzcGxheVwiLCBcIlwiKTtcbiAgJChcIi5hcHAuZmxleC12ZXJ0aWNhbCwgLmFwcC0yckVvT3BcIikuZmlyc3QoKS5jc3MoXCJvdmVyZmxvd1wiLCBcIlwiKTtcbiAgJChcIi5jaGF0LTNiUnh4dVwiKS5maXJzdCgpLmNzcyhcInZpc2liaWxpdHlcIiwgXCJcIikuY3NzKFwibWluLXdpZHRoXCIsIFwiXCIpO1xuICAkKFwiLmZsZXgtdmVydGljYWwuY2hhbm5lbHMtd3JhcFwiKS5maXJzdCgpLmNzcyhcImZsZXgtZ3Jvd1wiLCBcIlwiKTtcbiAgJChcIi5ndWlsZC1oZWFkZXIgLmJ0bi5idG4taGFtYnVyZ2VyXCIpLmZpcnN0KCkuY3NzKFwidmlzaWJpbGl0eVwiLCBcIlwiKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IG5ldyBWb2ljZU1vZGUoKTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy93ZWJwYWNrTW9kdWxlcy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy93ZWJwYWNrTW9kdWxlcy5qcz9iNDBkIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbn0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG5kZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuY29uc3QgZmluZCA9IGZpbHRlciA9PiB7XG4gIGZvciAoY29uc3QgaSBpbiByZXEuYykge1xuICAgIGlmIChyZXEuYy5oYXNPd25Qcm9wZXJ0eShpKSkge1xuICAgICAgY29uc3QgbSA9IHJlcS5jW2ldL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bmNvbnN0IGZpbmRCeURpc3BsYXlOYW1lID0gZGlzcGxheU5hbWUgPT4gZmluZChtb2R1bGUgPT4gbW9kdWxlLmRpc3BsYXlOYW1lID09PSBkaXNwbGF5TmFtZSk7XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgZmluZCxcbiAgZmluZEFsbCxcbiAgZmluZEJ5UHJvcHMsXG4gIGZpbmRCeVByb3RvdHlwZXMsXG4gIGZpbmRCeURpc3BsYXlOYW1lXG59OyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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 _xSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./xSvg */ \"./src/ui/xSvg.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _icons_edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icons/edit */ \"./src/ui/icons/edit.jsx\");\n/* harmony import */ var _icons_delete__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./icons/delete */ \"./src/ui/icons/delete.jsx\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\n/* harmony import */ var _tooltipWrap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n\n\n\n\n\n\n\n\n\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].React;\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 = typeof this.props.addon.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\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 = $(_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactDom.findDOMNode(this));\n const container = thisNode.parents(\".scroller\");\n if (!isHidden(container[0], thisNode[0])) return;\n container.animate({\n scrollTop: thisNode.offset().top - container.offset().top + container.scrollTop() - 30\n }, 300);\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n get settingsComponent() {\n const name = this.getString(this.props.addon.name);\n\n try {\n this.settingsPanel = this.props.addon.getSettingsPanel();\n } catch (err) {\n _modules_utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].err(\"Plugins\", \"Unable to get settings panel for \" + this.props.addon.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 }, _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_3__[\"default\"], null)), typeof this.settingsPanel === \"object\" && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n id: `plugin-settings-${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-${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 += ` ${_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].anchorClasses.anchor} ${_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].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_8__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: title\n }, React.createElement(\"div\", {\n className: \"bd-addon-button\",\n onClick: action\n }, children)); // return <Tooltip color=\"black\" position=\"top\" text={title}>\n // {(props) => {\n // return <div {...props} className=\"bd-icon\" onClick={action}>{children}</div>;\n // }}\n // </Tooltip>;\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.props.addon.name);\n this.props.enabled = !this.props.enabled;\n }\n\n edit() {\n this.props.edit(this.props.addon.name);\n }\n\n delete() {\n this.props.remove(this.props.addon.name);\n }\n\n reload() {\n this.props.reload(this.props.addon.name);\n }\n\n render() {\n if (this.state.settings) return this.settingsComponent;\n const {\n name,\n author,\n description,\n version,\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(name, version, {\n name: 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_5__[\"default\"], {\n className: \"bd-icon\"\n }), this.edit), this.props.remove && this.makeButton(\"Delete\", React.createElement(_icons_delete__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: \"bd-icon\"\n }), this.delete), this.props.reload && this.makeButton(\"Reload\", React.createElement(_reloadIcon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"bd-icon\"\n }), this.reload), React.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n onChange: this.onChange,\n checked: this.props.enabled\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 }, description)), this.footer);\n }\n\n} // get settingsComponent() {\n// const addon = this.props.addon;\n// const name = this.getString(addon.name);\n// try { this.settingsPanel = this.props.getSettingsPanel(); }\n// catch (err) { Logger.stacktrace(\"Addon Settings\", \"Unable to get settings panel for \" + name + \".\", err); }\n// const props = {id: `${name}-settings`, className: \"addon-settings\", ref: this.panelRef};\n// if (typeof(settingsPanel) == \"string\") props.dangerouslySetInnerHTML = this.settingsPanel;\n// return <div className=\"bd-addon-card settings-open bd-switch-item\">\n// <div className=\"bd-close\" onClick={this.closeSettings}><CloseButton /></div>\n// <div {...props}>{this.settingsPanel instanceof React.Component ? this.settingsPanel : null}</div>\n// </div>;\n// }\n// componentDidUpdate() {\n// if (!this.state.settingsOpen) return;\n// if (this.settingsPanel instanceof Node) this.panelRef.current.appendChild(this.settingsPanel);\n// // if (!SettingsCookie[\"fork-ps-3\"]) return;\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// const panel = $(this.panelRef.current);\n// const container = panel.parents(\".scroller-2FKFPG\");\n// if (!isHidden(container[0], panel[0])) return;\n// container.animate({\n// scrollTop: panel.offset().top - container.offset().top + container.scrollTop() - 30\n// }, 300);\n// }//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25jYXJkLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYWRkb25jYXJkLmpzeD9lYTY4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuLi9tb2R1bGVzL3V0aWxzXCI7XG5pbXBvcnQgWFN2ZyBmcm9tIFwiLi94U3ZnXCI7XG5pbXBvcnQgUmVsb2FkSWNvbiBmcm9tIFwiLi9yZWxvYWRJY29uXCI7XG5pbXBvcnQgRWRpdEljb24gZnJvbSBcIi4vaWNvbnMvZWRpdFwiO1xuaW1wb3J0IERlbGV0ZUljb24gZnJvbSBcIi4vaWNvbnMvZGVsZX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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/addoncard.jsx\n");
/***/ }),
/***/ "./src/ui/addonlist.jsx":
/*!******************************!*\
!*** ./src/ui/addonlist.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: addon.name,\n enabled: this.cookie[addon.name],\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 getAddons() {\n const sortedAddons = this.props.list.sort((a, b) => {\n const first = a[this.state.sort];\n const second = 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 = sortedAddons.map(addon => {\n if (this.state.query) {\n let matches = addon.name.toLocaleLowerCase().includes(this.state.query);\n matches = matches || addon.author.toLocaleLowerCase().includes(this.state.query);\n matches = matches || addon.description.toLocaleLowerCase().includes(this.state.query);\n matches = matches || addon.version.toLocaleLowerCase().includes(this.state.query);\n if (!matches) return null;\n }\n\n const props = this.getProps(addon);\n return 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 return rendered;\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().filter(c => c);\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYWRkb25saXN0LmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYWRkb25saXN0LmpzeD80OGQxIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIF9leHRlbmRzKCkgeyBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgeyB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldOyBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7IGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7IHRhcmdldFtrZXldID0gc291cmNlW2tleV07IH0gfSB9IHJldHVybiB0YXJnZXQ7IH07IHJldHVybiBfZXh0ZW5kcy5hcHBseSh0aGlzLCBhcmd1bWVudHMpOyB9XG5cbmltcG9ydCBFcnJvckJvdW5kYXJ5IGZyb20gXCIuL2Vycm9yQm91bmRhcnlcIjtcbmltcG9ydCBDb250ZW50Q29sdW1uIGZyb20gXCIuL2NvbnRlbnRDb2x1bW5cIjtcbmltcG9ydCBUb29scyBmcm9tIFwiLi90b29sc1wiO1xuaW1wb3J0IFJlbG9hZEljb24gZnJvbSBcIi4vcmVsb2FkSWNvblwiO1xuaW1wb3J0IEFkZG9uQ2FyZCBmcm9tIFwiLi9hZGRvbmNhcmRcIjtcbmltcG9ydCBTY3JvbGxlciBmcm9tIFwiLi9zY3JvbGxlclwiO1xuaW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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvYmRFbW90ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvYmRFbW90ZS5qcz84NjQ5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgcXVpY2tFbW90ZU1lbnUgZnJvbSBcIi4uL21vZHVsZXMvcXVpY2tFbW90ZU1lbnVcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBCREVtb3RlIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIGNvbnN0IGlzRmF2ID0gcXVpY2tFbW90ZU1lbnUgJiYgcXVpY2tFbW90ZU1lbnUuZmF2b3JpdGVFbW90ZXMgJiYgcXVpY2tFbW90ZU1lbnUuZmF2b3JpdGVFbW90ZXNbdGhpcy5sYWJlbF0gPyB0cnVlIDogZmFsc2U7XG4gICAgdGh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Byb3BzLnVybCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICAgICAgICBpc0Zhdm9yaXRlOiAhdGhpcy5zdGF0ZS5pc0Zhdm9yaXRlXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pKTtcbiAgICB9KTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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/MzYxYiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgQkRMb2dvIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwic3ZnXCIsIHtcbiAgICAgIGhlaWdodDogXCIxMDAlXCIsXG4gICAgICB3aWR0aDogdGhpcy5wcm9wcy5zaXplIHx8IFwiMTZweFwiLFxuICAgICAgY2xhc3NOYW1lOiBcImJkLWxvZ28gXCIgKyB0aGlzLnByb3BzLmNsYXNzTmFtZSxcbiAgICAgIHN0eWxlOiB7XG4gICAgICAgIGZpbGxSdWxlOiBcImV2ZW5vZGRcIixcbiAgICAgICAgY2xpcFJ1bGU6IFwiZXZlbm9kZFwiLFxuICAgICAg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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY2hlY2tib3guanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2NoZWNrYm94LmpzPzIzN2IiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19DaGVja2JveCBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2xpY2sgPSB0aGlzLm9uQ2xpY2suYmluZCh0aGlzKTtcbiAgICB0aGlzLnNldEluaXRpYWxTdGF0ZSgpO1xuICB9XG5cbiAgc2V0SW5pdGlhbFN0YXRlKCkge1xuICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICBjaGVja2VkOiB0aGlzLnByb3BzLmNoZWNrZWQgfHwgZmFsc2VcbiAgICB9O1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJsaVwiLCBudWxsLCBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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 <div className=\"bd-select-wrap\">\n// <label className=\"bd-label\">{this.props.label}</label>\n// <div className={`bd-select${style}${isOpen}`} onClick={this.showMenu} ref={this.dropdown}>\n// <div className=\"bd-select-controls\">\n// <div className=\"bd-select-value\">{this.selected.label}</div>\n// <Arrow className=\"bd-select-arrow\" />\n// </div>\n// </div>\n// {this.state.open && this.options}\n// </div>;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29tcG9uZW50cy9kcm9wZG93bi5qc3guanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2NvbXBvbmVudHMvZHJvcGRvd24uanN4PzE0YTEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uLy4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBBcnJvdyBmcm9tIFwiLi4vaWNvbnMvZG93bmFycm93XCI7XG5jb25zdCBSZWFjdCA9IEJEVjIuUmVhY3Q7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBTZWxlY3QgZXh0ZW5kcyBSZWFjdC5Db21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLnN0YXRlID0ge1xuICAgICAgb3BlbjogZmFsc2Us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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29tcG9uZW50cy9z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OiIifQ==\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY29tcG9uZW50cy9zd2l0Y2guanN4LmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9jb21wb25lbnRzL3N3aXRjaC5qc3g/MWRkOCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vLi4vbW9kdWxlcy92MlwiO1xuY29uc3QgUmVhY3QgPSBCRFYyLlJlYWN0O1xuZXhwb3J0IGRlZmF1b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mxlZCxcbiAgICAgIGNoZWNrZWQ6IHRoaXMuc3RhdGUuY2hlY2tlZCxcbiAgICAgIG9uQ2hhbmdlOiB0aGlzLm9uQ2hhbmdlXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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 _settingsTitle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./checkbox */ \"./src/ui/checkbox.js\");\n/* harmony import */ var _cssEditorDetached__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cssEditorDetached */ \"./src/ui/cssEditorDetached.js\");\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_6__[\"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_4__[\"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_4__[\"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_5__[\"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 if ($(\"#customcss\").length == 0) {\n $(\"head\").append(\"<style id=\\\"customcss\\\"></style>\");\n }\n\n $(\"#customcss\").text(this.editor.session.getValue()).detach().appendTo(document.head);\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 = $(\"#bd-customcss-detach-container\");\n\n if (!_root.length) {\n if (!this.injectDetachedRoot()) return null;\n return this.detachedRoot;\n }\n\n return _root[0];\n }\n\n injectDetachedRoot() {\n if (!$(\".app, .app-2rEoOp\").length) return false;\n $(\"<div/>\", {\n id: \"bd-customcss-detach-container\"\n }).insertAfter($(\".app, .app-2rEoOp\"));\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/MDYxOCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5nc0Nvb2tpZSB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IFNldHRpbmdzIGZyb20gXCIuLi9tb2R1bGVzL3NldHRpbmdzUGFuZWxcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R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0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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 _checkbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./checkbox */ \"./src/ui/checkbox.js\");\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 $(\"#app-mount\").addClass(\"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 $(\"#app-mount\").removeClass(\"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 = $(\"#bd-customcss-detach-container\");\n\n if (!_root.length) {\n if (!this.injectRoot()) return null;\n return this.detachedRoot;\n }\n\n return _root[0];\n }\n\n injectRoot() {\n if (!$(\".app, .app-2rEoOp\").length) return false;\n $(\"<div/>\", {\n id: \"bd-customcss-detach-container\"\n }).insertAfter($(\".app, .app-2rEoOp\"));\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_4__[\"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 ($(\"#editor-detached\").length) 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 if ($(\"#customcss\").length == 0) {\n $(\"head\").append(\"<style id=\\\"customcss\\\"></style>\");\n }\n\n $(\"#customcss\").text(this.editor.session.getValue()).detach().appendTo(document.head);\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvY3NzRWRpdG9yRGV0YWNoZWQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2Nzc0VkaXRvckRldGFjaGVkLmpzPzBkMDIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raWUgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBTZXR0aW5ncyBmcm9tIFwiLi4vbW9kdWxlcy9zZXR0aW5nc1BhbmVsXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IERhdGFTdG9yZSBmcm9tIFwiLi4vbW9kdWxlcy9kYXRhU3RvcmVcIjtcbmltcG9ydCBDaGVja2JveCBmcm9tIFwiLi9jaGVja2JveFwiO1xuZXh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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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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CI6IiJ9\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvZGVsZXRlLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvaWNvbnMvZGVsZXRlLmpzeD8yYWE5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bG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VcIixcbiAgICAgIGQ6IFwiTTAgMGgyNHYyNEgwelwiXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvZWRpdC5qc3guanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2ljb25zL2VkaXQuanN4PzNiNDciXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uLy4uL21vZHVsZXMvdjJcIjtcbmNvbnN0I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290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/icons/edit.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvaWNvbnMvc2VhcmNoLmpzeC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvaWNvbnMvc2VhcmNoLmpzeD9jM2E5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi8uLi9tb2R1bGVzL3YyXCI7XG5jb25zdCBSZWFjdCA9IEJEVjIuUmVh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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/icons/search.jsx\n");
/***/ }),
/***/ "./src/ui/layer.js":
/*!*************************!*\
!*** ./src/ui/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\nclass V2C_Layer extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n }\n\n componentDidMount() {\n $(window).on(`keyup.${this.props.id}`, e => {\n if (e.which === 27) {\n _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactDom.unmountComponentAtNode(this.refs.root.parentNode);\n }\n });\n $(`#${this.props.id}`).animate({\n opacity: 1\n }, {\n step: function (now) {\n $(this).css(\"transform\", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);\n },\n duration: 200,\n done: () => {\n $(`#${this.props.id}`).css(\"opacity\", \"\").css(\"transform\", \"\");\n }\n });\n }\n\n componentWillUnmount() {\n $(window).off(`keyup.${this.props.id}`);\n $(`#${this.props.id}`).animate({\n opacity: 0\n }, {\n step: function (now) {\n $(this).css(\"transform\", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);\n },\n duration: 200,\n done: () => {\n $(`#${this.props.rootId}`).remove();\n }\n });\n $(\"[class*=\\\"layer-\\\"]\").removeClass(\"publicServersOpen\").animate({\n opacity: 1\n }, {\n step: function (now) {\n $(this).css(\"transform\", `scale(${0.07 * now + 0.93}) translateZ(0px)`);\n },\n duration: 200,\n done: () => {\n $(\"[class*=\\\"layer-\\\"]\").css(\"opacity\", \"\").css(\"transform\", \"\");\n }\n });\n }\n\n componentWillMount() {\n $(\"[class*=\\\"layer-\\\"]\").addClass(\"publicServersOpen\").animate({\n opacity: 0\n }, {\n step: function (now) {\n $(this).css(\"transform\", `scale(${0.07 * now + 0.93}) translateZ(0px)`);\n },\n duration: 200\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvbGF5ZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL2xheWVyLmpzP2RmNTMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19MYXllciBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIGNvbXBvbmVudERpZE1vdW50KCkge1xuICAgICQod2luZG93KS5vbihga2V5dXAuJHt0aGlzLnByb3BzLmlkfWAsIGUgPT4ge1xuICAgICAgaWYgKGUud2hpY2ggPT09IDI3KSB7XG4gICAgICAgIEJEVjIucmVhY3REb20udW5tb3VudENvbXBvbmVudEF0Tm9kZSh0aGlzLnJlZnMucm9vdC5wYXJlbnROb2RlKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgICAkKGAjJHt0aGlzLnByb3BzLmlkfWApLmFuaW1h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Im1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/layer.js\n");
/***/ }),
/***/ "./src/ui/list.js":
/*!************************!*\
!*** ./src/ui/list.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_List; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n\nclass V2C_List 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(\"ul\", {\n className: this.props.className\n }, this.props.children);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvbGlzdC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvbGlzdC5qcz9mZGJkIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfTGlzdCBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwidWxcIiwge1xuICAgICAgY2xhc3NOYW1lOiB0aGlzLnByb3BzLmNsYXNzTmFtZVxuICAgIH0sIHRoaXMucHJvcHMuY2hpbGRyZW4pO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/list.js\n");
/***/ }),
/***/ "./src/ui/pluginCard.js":
/*!******************************!*\
!*** ./src/ui/pluginCard.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_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_pluginModule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/utils */ \"./src/modules/utils.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 _tooltipWrap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\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\nconst React = _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].React;\nclass V2C_PluginCard extends _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n const self = this;\n self.onChange = self.onChange.bind(self);\n self.showSettings = self.showSettings.bind(self);\n self.setInitialState();\n self.hasSettings = typeof self.props.plugin.getSettingsPanel === \"function\";\n self.settingsPanel = \"\";\n this.reload = this.reload.bind(this);\n this.onReload = this.onReload.bind(this);\n }\n\n setInitialState() {\n this.state = {\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][this.props.plugin.getName()],\n settings: false,\n reloads: 0\n };\n } // componentDidMount() {\n // BDEvents.on(\"plugin-reloaded\", this.onReload);\n // }\n // componentWillUnmount() {\n // BDEvents.off(\"plugin-reloaded\", this.onReload);\n // }\n\n\n onReload(pluginName) {\n if (pluginName !== this.props.plugin.getName()) return;\n this.setState({\n reloads: this.state.reloads + 1\n });\n }\n\n componentDidUpdate() {\n if (this.state.settings) {\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\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 self = $(_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].reactDom.findDOMNode(this));\n const container = self.parents(\".scroller\");\n if (!isHidden(container[0], self[0])) return;\n container.animate({\n scrollTop: self.offset().top - container.offset().top + container.scrollTop() - 30\n }, 300);\n }\n }\n\n reload() {\n const plugin = this.props.plugin.getName();\n _modules_pluginModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reloadPlugin(plugin);\n this.props.plugin = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][plugin].plugin;\n this.onReload(this.props.plugin.getName());\n }\n\n getString(value) {\n if (!value) return \"???\";\n return typeof value == \"string\" ? value : value.toString();\n }\n\n get settingsComponent() {\n const self = this;\n const {\n plugin\n } = this.props;\n const name = this.getString(plugin.getName());\n\n try {\n self.settingsPanel = plugin.getSettingsPanel();\n } catch (err) {\n _modules_utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"Plugins\", \"Unable to get settings panel for \" + plugin.getName() + \".\", err);\n }\n\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"settings-open ui-switch-item bd-addon-card\"\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 self.setState({\n settings: false\n });\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(_xSvg__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null)), typeof self.settingsPanel === \"object\" && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n id: `plugin-settings-${name}`,\n className: \"plugin-settings\",\n ref: \"settingspanel\"\n }), typeof self.settingsPanel !== \"object\" && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n id: `plugin-settings-${name}`,\n className: \"plugin-settings\",\n ref: \"settingspanel\",\n dangerouslySetInnerHTML: {\n __html: self.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: \"bd-name bda-name\"\n }, name);\n const versionIndex = title.findIndex(s => s == \"{{version}}\");\n if (nameIndex) title[versionIndex] = React.createElement(\"span\", {\n className: \"bd-version bda-version\"\n }, version);\n const authorIndex = title.findIndex(s => s == \"{{author}}\");\n\n if (nameIndex) {\n const props = {\n className: \"bd-author bda-author\"\n };\n\n if (author.link || author.id) {\n props.className += ` ${_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].anchorClasses.anchor} ${_modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].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_6__[\"default\"], {\n color: \"black\",\n position: \"top\",\n text: title\n }, props => {\n return React.createElement(\"div\", _extends({}, props, {\n className: \"bd-addon-button\",\n onClick: action\n }), children);\n });\n }\n\n getLinks(meta) {\n const links = [];\n if (meta.website) links.push(this.makeLink(\"Website\", meta.website));\n if (meta.source) links.push(this.makeLink(\"Source\", meta.source));\n\n if (meta.invite) {\n links.push(this.makeLink(\"Support Server\", () => {\n const tester = /\\.gg\\/(.*)$/;\n let code = meta.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 (meta.donate) links.push(this.makeLink(\"Donate\", meta.donate));\n if (meta.patreon) links.push(this.makeLink(\"Patreon\", meta.patreon));\n return links;\n }\n\n getFooter(meta) {\n const links = this.getLinks(meta);\n return (links.length || this.hasSettings) && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bda-footer\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"span\", {\n className: \"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: \"bda-settings-button\",\n disabled: !this.state.checked\n }, \"Settings\"));\n }\n\n render() {\n if (this.state.settings) return this.settingsComponent;\n const {\n plugin\n } = this.props;\n const name = this.getString(plugin.getName());\n const author = this.getString(plugin.getAuthor());\n const description = this.getString(plugin.getDescription());\n const version = this.getString(plugin.getVersion());\n const meta = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][name];\n return _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n \"data-name\": name,\n \"data-version\": version,\n \"className\": \"settings-closed ui-switch-item bd-addon-card\"\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-title bda-header-title\"\n }, this.buildTitle(name, version, {\n name: author,\n id: meta.authorId,\n link: meta.authorLink\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(\"div\", {\n className: \"bd-addon-controls bda-controls\"\n }, !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"] && _modules_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].react.createElement(Object(_tooltipWrap__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_reloadIcon__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"Reload\"\n }), {\n className: \"bd-reload-card\",\n onClick: this.reload\n }), React.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n onChange: this.onChange,\n checked: this.state.checked\n }) // BDV2.react.createElement(\"label\", {className: \"ui-switch-wrapper ui-flex-child\", style: {flex: \"0 0 auto\"}},\n // BDV2.react.createElement(\"input\", {checked: this.state.checked, onChange: this.onChange, className: \"ui-switch-checkbox\", type: \"checkbox\"}),\n // BDV2.react.createElement(\"div\", {className: this.state.checked ? \"ui-switch checked\" : \"ui-switch\"})\n // )\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-addon-description bda-description scroller\"\n }, description)), this.getFooter(meta));\n }\n\n onChange() {\n this.setState({\n checked: !this.state.checked\n });\n _modules_pluginModule__WEBPACK_IMPORTED_MODULE_2__[\"default\"].togglePlugin(this.props.plugin.getName());\n }\n\n showSettings() {\n if (!this.hasSettings) return;\n this.setState({\n settings: true\n });\n }\n\n} // <div className=\"bd-controls\">\n// {this.props.editAddon && this.makeButton(Strings.Addons.editAddon, <EditIcon />, this.props.editAddon)}\n// {this.props.deleteAddon && this.makeButton(Strings.Addons.deleteAddon, <DeleteIcon />, this.props.deleteAddon)}\n// {this.props.showReloadIcon && this.makeButton(Strings.Addons.reload, <ReloadIcon className=\"bd-reload bd-reload-card\" />, this.reload)}\n// <Switch checked={this.props.enabled} onChange={this.onChange} />\n// </div>\n// componentDidUpdate() {\n// if (!this.state.settingsOpen) return;\n// if (this.settingsPanel instanceof Node) this.panelRef.current.appendChild(this.settingsPanel);\n// // if (!SettingsCookie[\"fork-ps-3\"]) return;\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// const panel = $(this.panelRef.current);\n// const container = panel.parents(\".scroller-2FKFPG\");\n// if (!isHidden(container[0], panel[0])) return;\n// container.animate({\n// scrollTop: panel.offset().top - container.offset().top + container.scrollTop() - 30\n// }, 300);\n// }\n// get settingsComponent() {\n// const addon = this.props.addon;\n// const name = this.getString(addon.name);\n// try { this.settingsPanel = this.props.getSettingsPanel(); }\n// catch (err) { Logger.stacktrace(\"Addon Settings\", \"Unable to get settings panel for \" + name + \".\", err); }\n// const props = {id: `${name}-settings`, className: \"addon-settings\", ref: this.panelRef};\n// if (typeof(settingsPanel) == \"string\") props.dangerouslySetInnerHTML = this.settingsPanel;\n// return <div className=\"bd-addon-card settings-open bd-switch-item\">\n// <div className=\"bd-close\" onClick={this.closeSettings}><CloseButton /></div>\n// <div {...props}>{this.settingsPanel instanceof React.Component ? this.settingsPanel : null}</div>\n// </div>;\n// }//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcGx1Z2luQ2FyZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvcGx1Z2luQ2FyZC5qcz8xZDNkIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIF9leHRlbmRzKCkgeyBfZXh0ZW5kcyA9IE9iamVjdC5hc3NpZ24gfHwgZnVuY3Rpb24gKHRhcmdldCkgeyBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykgeyB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldOyBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7IGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7IHRhcmdldFtrZXldID0gc291cmNlW2tleV07IH0gfSB9IHJldHVybiB0YXJnZXQ7IH07IHJldHVybiBfZXh0ZW5kcy5hcHBseSh0aGlzLCBhcmd1bWVudHMpOyB9XG5cbmltcG9ydCB7IHNldHRpbmdzQ29va2llLCBwbHVnaW5Db29raWUsIGJkcGx1Z2lucyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBwbHVnaW5Nb2R1bGUgZnJvbSBcIi4uL21vZHVsZXMvcGx1Z2luTW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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/pluginCard.js\n");
/***/ }),
/***/ "./src/ui/publicServers.js":
/*!*********************************!*\
!*** ./src/ui/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 _serverCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./serverCard */ \"./src/ui/serverCard.js\");\n/* harmony import */ var _sidebarView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sidebarView */ \"./src/ui/sidebarView.js\");\n/* harmony import */ var _settingsTitle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settingsTitle */ \"./src/ui/settingsTitle.js\");\n/* harmony import */ var _tabBarSeparator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tabBarSeparator */ \"./src/ui/tabBarSeparator.js\");\n/* harmony import */ var _tabBarHeader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tabBarHeader */ \"./src/ui/tabBarHeader.js\");\n/* harmony import */ var _tabBarItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tabBarItem */ \"./src/ui/tabBarItem.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 $.ajax({\n method: \"GET\",\n url: `${self.endPoint}${query}${query ? \"&schema=new\" : \"?schema=new\"}`,\n success: data => {\n let servers = data.results.reduce((arr, server) => {\n server.joined = false;\n arr.push(server); // arr.push(<ServerCard server={server} join={self.join}/>);\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 error: () => {\n self.setState({\n loading: false,\n title: \"Failed to load servers. Check console for details\"\n });\n }\n });\n }\n\n join(serverCard) {\n if (serverCard.props.pinned) return this.InviteActions.acceptInvite(serverCard.props.invite_code);\n $.ajax({\n method: \"GET\",\n url: `${this.joinEndPoint}/${serverCard.props.server.identifier}`,\n headers: {\n \"Accept\": \"application/json;\",\n \"Content-Type\": \"application/json;\",\n \"x-discord-token\": this.state.connection.user.accessToken\n },\n crossDomain: true,\n xhrFields: {\n withCredentials: true\n },\n success: () => {\n serverCard.setState({\n joined: true\n });\n }\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_2__[\"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 checkConnection() {\n const self = this;\n\n try {\n $.ajax({\n method: \"GET\",\n url: `https://auth.discordservers.com/info`,\n headers: {\n \"Accept\": \"application/json;\",\n \"Content-Type\": \"application/json;\"\n },\n crossDomain: true,\n xhrFields: {\n withCredentials: true\n },\n success: data => {\n // Utils.log(\"PublicServer\", \"Got data: \" + JSON.stringify(data));\n self.setState({\n selectedCategory: 0,\n connection: {\n state: 2,\n user: data\n }\n });\n self.search(\"\", true);\n },\n 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 } 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_3__[\"default\"], {\n ref: \"sbv\",\n children: this.component\n });\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_5__[\"default\"], null), this.searchInput, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarSeparator__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_tabBarHeader__WEBPACK_IMPORTED_MODULE_6__[\"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_7__[\"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_5__[\"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_4__[\"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_2__[\"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_4__[\"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_5__[\"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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcHVibGljU2VydmVycy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvcHVibGljU2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RWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFNpZGViYXJWaWV3LCB7XG4gICAgICByZWY6IFwic2J2XCIsXG4gICAgICBjaGlsZHJlbjogdGhpcy5jb21wb25lbnRcbiAgICB9KTtcbiAgfVxuXG4gIGdldCBjb21wb25lbnQoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHNpZGViYXI6IHtcbiAgICAgICAgY29tcG9uZW50OiB0aGlzLnNpZGViYXJcbiAgICAgIH0sXG4gICAgICBjb250ZW50OiB7XG4gICAgICAgIGNvbXBvbmVudDogdGhpcy5jb250ZW50XG4gICAgICB9LFxuICAgICAgdG9vbHM6IHtcbiAgICAgICAgY29tcG9uZW50OiBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoVG9vbHMsIHtcbiAgICAgICAgICBrZXk6IFwicHRcIixcbiAgICAgICAgICByZWY6IFwidG9vbHNcIixcbiAgICAgICAgICBvbkNsaWNrOiB0aGlzLmNsb3NlXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfTtcbiAgfVxuXG4gIGdldCBzaWRlYmFyKCkge1xuICAgIHJldHVybiBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1xuICAgICAgY2xhc3NOYW1lOiBcInNpZGViYXJcIixcbiAgICAgIGtleTogXCJwc1wiXG4gICAgfSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS10YWItYmFyIFNJREVcIlxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwidWktdGFiLWJhci1oZWFkZXJcIixcbiAgICAgIHN0eWxlOiB7XG4gICAgICAgIGZvbnRTaXplOiBcIjE2cHhcIlxuICAgICAgfVxuICAgIH0sIFwiUHVibGljIFNlcnZlcnNcIiksIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChUYW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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/publicServers.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvcmVsb2FkSWNvbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvcmVsb2FkSWNvbi5qcz9iZTcwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfUmVsb2FkSWNvbiBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwic3ZnXCIsIHtcbiAgICAgIHhtbG5zOiBcImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIsXG4gICAgICB2aWV3Qm94OiBcIjAgMCAyNCAyNFwiLFxuICAgICAgZmlsbDogXCIjZGNkZGRlXCIsXG4gICAgICBjbGFzc05hbWU6IFwiYmQtcmVsb2FkIFwiICsgdGhpcy5wcm9wcy5jbGFzc05hbWUsXG4gICAgICBvbkNsaWNrOiB0aGlzLnByb3BzLm9uQ2xpY2ssXG4gICAgICBzdHlsZToge1xuICAgICAgICB3aWR0aDogdGhpcy5wcm9wcy5zaXplIHx8IFwiMjRweFwiLFxuICAgICAgICBoZWlnaHQ6IHRoaXMucHJvcHMuc2l6ZSB8fCBcIjI0cHhcIlxuICAgICAgfVxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcInBhdGhcIiwge1xuICAgICAgZDogXCJNMTcuNjUgNi4zNUMxNi4yIDQuOSAxNC4yMSA0IDEyIDRjLTQuNDIgMC03Ljk5IDMuNTgtNy45OSA4czMuNTcgOCA3Ljk5IDhjMy43MyAwIDYuODQtMi41NSA3LjczLTZoLTIuMDhjLS44MiAyLjMzLTMuMDQgNC01LjY1IDQtMy4zMSAwLTYtMi42OS02LTZzMi42OS02IDYtNmMxLjY2IDAgMy4xNC42OSA0LjIyIDEuNzhMMTMgMTFoN1Y0bC0yLjM1IDIuMzV6XCJcbiAgICB9KSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwicGF0aFwiLCB7XG4gICAgICBmaWxsOiBcIm5vbmVcIixcbiAgICAgIGQ6IFwiTTAgMGgyNHYyNEgwelwiXG4gICAgfSkpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2Nyb2xsZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Njcm9sbGVyLmpzPzQwNzciXSwic291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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/serverCard.js":
/*!******************************!*\
!*** ./src/ui/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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2VydmVyQ2FyZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2VydmVyQ2FyZC5qcz9kMzZjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfU2VydmVyQ2FyZCBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICBpZiAoIXRoaXMucHJvcHMuc2VydmVyLmljb25VcmwpIHRoaXMucHJvcHMuc2VydmVyLmljb25VcmwgPSB0aGlzLnByb3BzLmZhbGxiYWNrO1xuICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICBpbWFnZUVycm9yOiBmYWxzZSxcbiAgICAgIGpvaW5lZDogdGhpcy5wcm9wcy5ndWlsZExpc3Q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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/serverCard.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2V0dGluZ3NHcm91cC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2V0dGluZ3NHcm91cC5qcz8zYzIzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFNldHRpbmdzVGl0bGUgZnJvbSBcIi4vc2V0dGluZ3NUaXRsZVwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9zd2l0Y2hcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TZXR0aW5nc0dyb3VwIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHRpdGxlLFxuICAgICAgc2V0dGluZ3MsXG4gICAgICBidXR0b25cbiAgICB9ID0gdGhpcy5wcm9wcztcbiAgICBjb25zdCBidXR0b25Db21wb25lbnQgPSBidXR0b24gPyBCRFYyLnJlYWN0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vb3QiOiIifQ==\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2V0dGluZ3NQYW5lbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2V0dGluZ3NQYW5lbC5qcz81NzYwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzQ29va2llIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFNldHRpbmdzVGl0bGUgZnJvbSBcIi4vc2V0dGluZ3NUaXRsZVwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9zd2l0Y2hcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TZXR0aW5nc1BhbmVsIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHNldHRpbmdzXG4gICAgfSA9IHRoaXMucHJvcHM7XG4gICAgcmV0dXJuIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwiY29udGVudENvbHVtbi0yaHJJWUggY29udGVudENvbHVtbkRlZmF1bHQtMVZRa0dNIGNvbnRlbnQtY29sdW1uIGRlZmF1bHRcIlxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChTZXR0aW5nc1RpdGxlLCB7XG4gICAgICB0ZXh0OiB0aGl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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 self = this;\n const si = $(\"[class*=side-] > [class*=selected]\");\n if (si.length) self.scn = si.attr(\"class\");\n const ns = $(\"[class*=side-] > [class*='item-']:not([class*=selected])\");\n if (ns.length) self.nscn = ns.attr(\"class\");\n $(\"[class*='side-'] > [class*='item-']\").on(\"click\", () => {\n self.setState({\n selected: null\n });\n });\n self.setInitialState();\n self.onClick = self.onClick.bind(self);\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 }), 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 onClick(id) {\n const self = this;\n const si = $(\"[class*=side] > [class*=selected]\");\n\n if (si.length) {\n si.off(\"click.bdsb\").on(\"click.bsb\", e => {\n $(e.target).attr(\"class\", self.scn);\n });\n si.attr(\"class\", self.nscn);\n }\n\n self.setState({\n selected: null\n });\n self.setState({\n selected: id\n });\n if (self.props.onClick) self.props.onClick(id);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2lkZWJhci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvc2lkZWJhci5qcz9lYjY1Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgVGFiQmFyU2VwYXJhdG9yIGZyb20gXCIuL3RhYkJhclNlcGFyYXRvclwiO1xuaW1wb3J0IFRhYkJhckhlYWRlciBmcm9tIFwiLi90YWJCYXJIZWFkZXJcIjtcbmltcG9ydCBUYWJCYXJJdGVtIGZyb20gXCIuL3RhYkJhckl0ZW1cIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19TaWRlQmFyIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgIGNvbnN0IHNpID0gJChcIltjbGFzcyo9c2lkZS1dID4gW2NsYXNzKj1zZWxlY3RlZF1cIik7XG4gICAgaWYgKHNpLmxlbmd0aCkgc2VsZi5zY24gPSBzaS5hdHRyKFwiY2xhc3NcIik7XG4gICAgY29uc3QgbnMgPSAkKFwiW2NsYXNzKj1zaWRlLV0gPiBbY2xhc3MqPSdpdGVtLSddOm5vd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zZWxmLnByb3BzLm9uQ2xpY2soaWQpO1xuICB9XG5cbn0iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/sidebar.js\n");
/***/ }),
/***/ "./src/ui/sidebarView.js":
/*!*******************************!*\
!*** ./src/ui/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 children: sidebar.component\n })), _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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc2lkZWJhclZpZXcuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3NpZGViYXJWaWV3LmpzP2QxYjYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBTY3JvbGxlciBmcm9tIFwiLi9zY3JvbGxlclwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX1NpZGViYXJWaWV3IGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHNpZGViYXIsXG4gICAgICBjb250ZW50LFxuICAgICAgdG9vbHNcbiAgICB9ID0gdGhpcy5wcm9wcy5jaGlsZHJlbjtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJzdGFuZGFyZFNpZGViYXJWaWV3LTNGMUk3aSB1aS1zdGFuZGFyZC1zaWRlYmFyLXZpZXdcIlxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwic2lkZWJhclJlZ2lvbi1WRlRVa04gc2lkZWJhci1yZWdpb25cIlxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChTY3JvbGxlciwge1xuICAgICAga2V5OiBcInNpZGViYXJTY3JvbGxlclwiLFxuICAgICAgcmVmOiBcInNpZGViYXJTY3JvbGxlclwiLFxuICAgICAgc2lkZWJhcjogdHJ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c05hbWU6IFwiY29udGVudENvbHVtbi0yaHJJWUggY29udGVudENvbHVtbkRlZmF1bHQtMVZRa0dNIGNvbnRlbnQtY29sdW1uIGRlZmF1bHRcIlxuICAgIH0sIGNvbnRlbnQuY29tcG9uZW50KSwgdG9vbHMuY29tcG9uZW50KSkpKSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/sidebarView.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.onChange(this.props.id, !this.state.checked);\n this.props.checked = !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/YjA2YSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9jb21wb25lbnRzL3N3aXRjaFwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgU3dpdGNoSXRlbSBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpO1xuICB9XG5cbiAgb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YXNzTmFtZTogXCJ1aS1mb3JtLXRleHQgc3R5bGUtZGVzY3JpcHRpb24gbWFyZ2luLXRvcC00XCIsXG4gICAgICBzdHlsZToge1xuICAgICAgICBmbGV4OiBcIjEgMSBhdXRvXCJcbiAgICAgIH1cbiAgICB9LCBpbmZvKSk7XG4gIH1cblxufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdGFiQmFySGVhZGVyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS90YWJCYXJIZWFkZXIuanM/MTM0ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgVjJDX1RhYkJhckhlYWRlciBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS10YWItYmFyLWhlYWRlclwiXG4gICAgfSwgdGhpcy5wcm9wcy50ZXh0KTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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/themeCard.js":
/*!*****************************!*\
!*** ./src/ui/themeCard.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_ThemeCard; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _reloadIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reloadIcon */ \"./src/ui/reloadIcon.js\");\n/* harmony import */ var _tooltipWrap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n\n\n\n\n\n\nclass V2C_ThemeCard extends _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.setInitialState();\n this.onChange = this.onChange.bind(this);\n this.reload = this.reload.bind(this);\n }\n\n setInitialState() {\n this.state = {\n checked: _0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][this.props.theme.name],\n reloads: 0\n };\n } // componentDidMount() {\n // BDEvents.on(\"theme-reloaded\", this.onReload);\n // }\n // componentWillUnmount() {\n // BDEvents.off(\"theme-reloaded\", this.onReload);\n // }\n\n\n onReload(themeName) {\n if (themeName !== this.props.theme.name) return;\n this.setState({\n reloads: this.state.reloads + 1\n });\n }\n\n reload() {\n const theme = this.props.theme.name;\n const error = _modules_themeModule__WEBPACK_IMPORTED_MODULE_3__[\"default\"].reloadTheme(theme);\n if (error) _modules_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showToast(`Could not reload ${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].name}. Check console for details.`, {\n type: \"error\"\n });else _modules_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showToast(`${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].name} v${_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme].version} has been reloaded.`, {\n type: \"success\"\n }); // this.setState(this.state);\n\n this.props.theme = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][theme];\n this.onReload(this.props.theme.name);\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_2__[\"default\"].react.createElement(\"a\", props, title);\n }\n\n render() {\n const {\n theme\n } = this.props;\n const name = theme.name;\n const description = theme.description;\n const version = theme.version;\n const author = theme.author;\n const meta = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"][name];\n const links = [];\n if (meta.website) links.push(this.makeLink(\"Website\", meta.website));\n if (meta.source) links.push(this.makeLink(\"Source\", meta.source));\n\n if (meta.invite) {\n links.push(this.makeLink(\"Support Server\", () => {\n const tester = /\\.gg\\/(.*)$/;\n let code = meta.invite;\n if (tester.test(code)) code = code.match(tester)[1];\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LayerStack.popLayer();\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].InviteActions.acceptInviteAndTransitionToInviteChannel(code);\n }));\n }\n\n if (meta.donate) links.push(this.makeLink(\"Donate\", meta.donate));\n if (meta.patreon) links.push(this.makeLink(\"Patreon\", meta.patreon));\n const authorProps = {\n className: \"bda-author\"\n };\n\n if (meta.authorLink || meta.authorId) {\n authorProps.className += ` ${_modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].anchorClasses.anchor} ${_modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].anchorClasses.anchorUnderlineOnHover}`;\n authorProps.target = \"_blank\";\n if (meta.authorLink) authorProps.href = meta.authorLink;\n if (meta.authorId) authorProps.onClick = () => {\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].LayerStack.popLayer();\n _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].openDM(meta.authorId);\n };\n }\n\n return _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n \"data-name\": name,\n \"data-version\": version,\n \"className\": \"settings-closed ui-switch-item bd-addon-card\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bda-header\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n className: \"bda-header-title\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n className: \"bda-name\"\n }, name), \" v\", _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n className: \"bda-version\"\n }, version), \" by \", _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(meta.authorLink || meta.authorId ? \"a\" : \"span\", authorProps, author)), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bda-controls\"\n }, !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"] && _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(Object(_tooltipWrap__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_reloadIcon__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"Reload\"\n }), {\n className: \"bd-reload-card\",\n onClick: this.reload\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"label\", {\n className: \"ui-switch-wrapper ui-flex-child\",\n style: {\n flex: \"0 0 auto\"\n }\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"input\", {\n checked: this.state.checked,\n onChange: this.onChange,\n className: \"ui-switch-checkbox\",\n type: \"checkbox\"\n }), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: this.state.checked ? \"ui-switch checked\" : \"ui-switch\"\n })))), _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bda-description-wrap scroller-wrap fade\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bda-description scroller\"\n }, description)), !!links.length && _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bda-footer\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", {\n className: \"bda-links\"\n }, ...links.map((element, index) => index < links.length - 1 ? [element, \" | \"] : element).flat())));\n }\n\n onChange() {\n this.setState({\n checked: !this.state.checked\n });\n _modules_themeModule__WEBPACK_IMPORTED_MODULE_3__[\"default\"].toggleTheme(this.props.theme.name);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdGhlbWVDYXJkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS90aGVtZUNhcmQuanM/NDI4OCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5nc0Nvb2tpZSwgdGhlbWVDb29raWUsIGJkdGhlbWVzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4uL21vZHVsZXMvdXRpbHNcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5pbXBvcnQgdGhlbWVNb2R1bGUgZnJvbSBcIi4uL21vZHVsZXMvdGhlbWVNb2R1bGVcIjtcbmltcG9ydCBSZWxvYWRJY29uIGZyb20gXCIuL3JlbG9hZEljb25cIjtcbmltcG9ydC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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/themeCard.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 $(\".closeButton-1tv5uR\").first().click();\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Rvb2xzLmpzPzA3ZWQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBYU3ZnIGZyb20gXCIuL3hTdmdcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFYyQ19Ub29scyBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2xpY2sgPSB0aGlzLm9uQ2xpY2suYmluZCh0aGlzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ0b29scy1jb250YWluZXIgdG9vbHNDb250YWluZXItMWVkUHVqXCJcbiAgICB9LCBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZ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./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/* <div class=\"layer-v9HyYc da-layer\" style=\"left: 234.5px; bottom: 51px;\">\r\n <div class=\"tooltip-2QfLtc da-tooltip tooltipTop-XDDSxx tooltipBlack-PPG47z\">\r\n <div class=\"tooltipPointer-3ZfirK da-tooltipPointer\"></div>\r\n User Settings\r\n </div>\r\n</div> */\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 = $(`<div class=\"${TooltipLayers.layer}\">`)[0];\n this.tooltipElement = $(`<div class=\"${TooltipClasses.tooltip} ${getClass(this.style)}\"><div class=\"${TooltipClasses.tooltipPointer}\"></div>${this.label}</div>`)[0];\n this.labelElement = this.tooltipElement.childNodes[1];\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.element.appendTo(this.container);\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHRpcC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkvdG9vbHRpcC5qcz85NDllIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiBUb29sdGlwIHRoYXQgYXV0b21hdGljYWxseSBzaG93IGFuZCBoaWRlIHRoZW1zZWx2ZXMgb24gbW91c2VlbnRlciBhbmQgbW91c2VsZWF2ZSBldmVudHMuXHJcbiAqIFdpbGwgYWxzbyByZW1vdmUgdGhlbXNlbHZlcyBpZiB0aGUgbm9kZSB0byB3YXRjaCBpcyByZW1vdmVkIGZyb20gRE9NIHRocm91Z2hcclxuICogYSBNdXRhdGlv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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\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 this.onMouseEnter = this.onMouseEnter.bind(this);\n this.onMouseLeave = this.onMouseLeave.bind(this);\n }\n\n 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); // this.node.addEventListener(\"mouseenter\", this.onMouseEnter);\n // this.node.addEventListener(\"mouseleave\", this.onMouseLeave);\n\n this.tooltip = new _tooltip__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.node, text, {\n style,\n side\n });\n }\n\n componentWillUnmount() {\n // this.node.removeEventListener(\"mouseenter\", this.onMouseEnter);\n // this.node.removeEventListener(\"mouseleave\", this.onMouseLeave);\n this.tooltip.hide();\n delete this.tooltip;\n }\n\n onMouseEnter() {}\n\n onMouseLeave() {}\n\n render() {\n return this.props.children;\n }\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvdG9vbHRpcFdyYXAuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3Rvb2x0aXBXcmFwLmpzPzk5ZTEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEJEVjIgZnJvbSBcIi4uL21vZHVsZXMvdjJcIjtcbmltcG9ydCBUb29sdGlwIGZyb20gXCIuL3Rvb2x0aXBcIjtcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIGV4dGVuZHMgQkRWMi5yZWFjdENvbXBvbmVudCB7XG4gIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpO1xuICAgIHRoaXMub25Nb3VzZUVudGVyID0gdGhpcy5vbk1vdXNlRW50ZXIuYmluZCh0aGlzKTtcbiAgICB0aGlzLm9uTW91c2VMZWF2ZSA9IHRoa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BQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkveFN2Zy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvdWkveFN2Zy5qcz84MDhjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCRFYyIGZyb20gXCIuLi9tb2R1bGVzL3YyXCI7XG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWMkNfWFN2ZyBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwic3ZnXCIsIHtcbiAgICAgIHhtbG5zOiBcImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIsXG4gICAgICB2aWV3Qm94OiBcIjAgMCAxMiAxMlwiLFxuICAgICAgc3R5bGU6IHtcbiAgICAgICAgd2lkdGg6IFwiMThweFwiLFxuICAgICAgICBoZWlnaHQ6IFwiMThweFwiXG4gICAgICB9XG4gICAgfSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZ1wiLCB7XG4gICAgICBjbGFzc05hbWU6IFwiYmFja2dyb3VuZFwiLFxuICAgICAgZmlsbDogXCJub25lXCIsXG4gICAgICBmaWxsUnVsZTogXCJldmVub2RkXCJcbiAgICB9LCBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJwYXRoXCIsIHtcbiAgICAgIGQ6IFwiTTAgMGgxMnYxMkgwXCJcbiAgICB9KSwgQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwicGF0aFwiLCB7XG4gICAgICBjbGFzc05hbWU6IFwiZmlsbFwiLFxuICAgICAgZmlsbDogXCIjZGNkZGRlXCIsXG4gICAgICBkOiBcIk05LjUgMy4yMDVMOC43OTUgMi41IDYgNS4yOTUgMy4yMDUgMi41bC0uNzA1LjcwNUw1LjI5NSA2IDIuNSA4Ljc5NWwuNzA1LjcwNUw2IDYuNzA1IDguNzk1IDkuNWwuNzA1LS43MDVMNi43MDUgNlwiXG4gICAgfSkpKTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\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");
/***/ }),
/***/ "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");
/***/ })
/******/ })["default"];