Greasy Fork is available in English.

MAEJOK-TOOLS for Fishtank.live

Add-on Tools for Fishtank.live Season 2.5

// ==UserScript==
// @name         MAEJOK-TOOLS for Fishtank.live
// @description  Add-on Tools for Fishtank.live Season 2.5
// @author       maejok-xx
// @version      2.14.2
// @license      GNU GPLv3
// @homepageURL  https://github.com/maejok-xx/maejok-tools
// @namespace    https://greasyfork.org/en/scripts/465416-maejok-tools-for-fishtank-live
// @icon         https://raw.githubusercontent.com/maejok-xx/maejok-tools/master/public/images/icon.png
// @supportURL   https://github.com/maejok-xx/maejok-tools/issues
// @match        https://www.fishtank.live/
// @match        https://www.fishtank.live/clips
// @match        https://www.fishtank.live/clip/*
// @run-at       document-idle
// ==/UserScript==
(()=>{"use strict";var e={911:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(601),o=s.n(a),n=s(314),i=s.n(n)()(o());i.push([e.id,'@keyframes bounce{0%,100%{transform:scale(1)}50%{transform:scale(0.9)}}@keyframes glisten{0%,100%{box-shadow:0 0 0 2px rgba(0,148,255,.5)}50%{box-shadow:0 0 0 2px rgba(0,0,0,.7)}}.maejok-settings-about{font-size:large;text-transform:none;color:#fff;padding-bottom:10px;font-family:Work Sans,sans-serif;text-align:center;overflow-y:auto}.maejok-settings-about .maejok-settings-about-title{color:#f5f;text-shadow:0px 0px 2px #000;font-weight:600;font-size:x-large;margin-bottom:10px}.maejok-settings-about .maejok-settings-about-changelog{margin-bottom:20px;font-size:small}.maejok-settings-about .maejok-settings-about-author,.maejok-settings-about .maejok-settings-about-contact{margin:3px auto}.maejok-settings-about .maejok-settings-about-contributors{margin:10px auto}.maejok-settings-about .maejok-settings-about-message{max-width:500px;font-weight:400;margin:20px auto;line-height:normal}.maejok-settings-about .maejok-settings-about-message a{color:#11f8ff;font-weight:700}.maejok-settings-about .maejok-settings-about-message p{margin-bottom:20px}.maejok-accordion-header{border-radius:4px;border:2px inset rgba(203,198,203,.5);background-color:#2b2d2e;background-image:linear-gradient(180deg, #1f2021, #121314, black);box-shadow:inset 0px 2px 8px 0px #000;border:1px inset rgba(203,198,203,.5);border-radius:2;color:#080;text-shadow:0 0 4px #006f00;font-family:Alarm Clock,monospace;text-transform:uppercase;cursor:pointer;padding:8px;width:100%;text-align:left;outline:none;font-size:15px;transition:.4s}.maejok-accordion-header:hover{background-color:#1d2127}.maejok-accordion-header:after{content:"+";color:#008702;font-weight:600;text-shadow:0 0 4px rgba(0,255,4,.4196078431);float:right;margin-left:4px}.maejok-accordion-active{border-bottom-right-radius:0;border-bottom-left-radius:0}.maejok-accordion-active,.accordion:hover{color:#00ff05;text-shadow:0 0 4px #00ff05;font-family:Alarm Clock,monospace;font-weight:600}.maejok-accordion-active+.maejok-accordion-content{padding:20px 18px 10px}.maejok-accordion-active:after{content:"−";color:#00ff05;font-weight:600;text-shadow:0 0 4px #00ff05}.maejok-accordion-content{border-radius:4px;border:2px inset rgba(203,198,203,.5);background-color:#4c474b;background-image:linear-gradient(180deg, #3f3b3e, #322e31, black);box-shadow:inset 0px 2px 8px 0px #000;border-radius:2;border-top-right-radius:0;border-top-left-radius:0;border:1px inset rgba(203,198,203,.5);border-top:0;border-bottom:0;position:relative;max-height:0;padding:0 16px;overflow:hidden;transition:max-height .2s ease-out}.maejok-modal-emotes{padding:8px;width:650px;height:600px;margin:8px 0 16px 0;overflow-y:auto}.maejok-modal-emotes .maejok-emotes-list-note{text-align:center;font-style:italic;color:#32c0e0;margin-bottom:16px;font-weight:600}.maejok-modal-emotes .maejok-emotes-list{display:flex;gap:4px;flex-direction:column;padding-right:4px}.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list-label{font-size:1.1em;font-weight:600;color:#f8ec94;margin-top:16px}.maejok-modal-emotes .maejok-emotes-list hr{margin:16px 0;border:none;border-top:2px solid rgba(0,0,0,.5)}.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item{display:flex;padding:8px;border-radius:4px;justify-content:space-around;border:2px solid rgba(0,0,0,0)}.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item:hover{background-color:rgba(0,0,0,.15);border:2px solid rgba(255,255,255,.25)}.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item:hover .maejok-emotes-list_item_use,.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item:hover .maejok-emotes-list_item_pin{visibility:visible}.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item:hover .maejok-emotes-list_item_use:hover,.maejok-modal-emotes .maejok-emotes-list .maejok-emotes-list_item:hover .maejok-emotes-list_item_pin:hover{background-color:rgba(0,255,5,.6)}.maejok-modal-emotes .maejok-emotes-list_item_command{min-width:104px;align-items:center;display:flex;color:#55d5b4;text-shadow:2px 2px 0 rgba(0,0,0,.75);font-weight:600}.maejok-modal-emotes .maejok-emotes-list_item_command_demote{min-width:104px;align-items:center;display:flex;font-weight:600;color:rgba(255,51,51,.7)}.maejok-modal-emotes .maejok-emotes-list_item_emote{flex:1;padding:8px;width:325px;margin:0 16px;border-radius:4px;text-align:center;font-style:italic;background-color:rgba(0,0,0,.5);outline:2px solid rgba(0,0,0,.55)}.maejok-modal-emotes .maejok-emotes-list_item_use,.maejok-modal-emotes .maejok-emotes-list_item_pin{padding:2px;width:60px;height:28px;border-radius:4px;color:#000;font-weight:500;align-self:center;align-items:center;display:flex;justify-content:center;cursor:pointer;visibility:hidden;background-color:rgba(85,213,180,.9)}.maejok-modal-emotes .maejok-emotes-list_item_use:first-of-type,.maejok-modal-emotes .maejok-emotes-list_item_pin:first-of-type{margin-right:3px}.maejok-friend-message{background-color:rgba(0,148,255,.1)}.maejok-friend-message:hover{background-color:rgba(0,148,255,.1);outline:1px solid rgba(0,148,255,.25)}.maejok-watched-message{background-color:rgba(0,255,5,.1)}.maejok-watched-message:hover{background-color:rgba(0,255,5,.1);outline:1px solid rgba(0,255,5,.25)}.maejok-context-message{background-color:rgba(255,29,0,.1)}.maejok-context-message:hover{background-color:rgba(255,29,0,.1);outline:1px solid rgba(255,29,0,.25)}.maejok-input-group{display:flex;margin-bottom:12px}.maejok-input-group .maejok-input-help-label,.maejok-input-group .maejok-input-help-config-label{display:flex;align-self:center;margin-left:8px;font-weight:600;cursor:pointer;color:#55d5b4;text-shadow:0 0 2px #000;margin-top:-3px}.maejok-input-group .maejok-input-help-config-label{margin-top:-1px}.maejok-input-group .maejok-input-label{cursor:pointer;color:#50985d;text-shadow:0 0 2px #000;font-family:Alarm Clock,monospace;align-self:center}.maejok-input-group .maejok-input-toggle{display:none}.maejok-input-group .maejok-input-toggle:checked+.maejok-input-toggle-label{background-color:rgba(248,236,148,.5)}.maejok-input-group .maejok-input-toggle:checked+.maejok-input-toggle-label::before{background-color:rgba(245,207,101,.75);border:.5px solid #cbc6cb;box-shadow:0px 0px 2px 0 rgba(0,0,0,.25);transform:translateX(20px);transition:transform .3s ease-in-out}.maejok-input-group .maejok-input-toggle-label{margin-top:-2px;margin-right:8px;display:inline-block;width:40px;height:20px;border-radius:16px;position:relative;cursor:pointer;background-color:#4c474b;border:1px solid #4c474b;box-shadow:0px 0 4px 0 rgba(0,0,0,.5);transition:background-color 1s ease}.maejok-input-group .maejok-input-toggle-label::before{content:"";position:absolute;top:0;left:0;width:14px;height:14px;margin-top:1px;margin-left:1px;background-color:#cbc6cb;border-radius:50%;border:1px solid rgba(0,0,0,.1);box-shadow:0px 0px 1px 0 rgba(0,0,0,.5);transition:transform .3s ease-in-out,background-color 1s ease-in-out}.maejok-modal_keyprompt_name{background-color:rgba(0,0,0,.65);border-radius:16px;color:#fff}.maejok-input-invalid{box-shadow:inset 0px -66px 0px 0 #bd0000 !important}.maejok-input-button-wrapper{width:50%;margin:24px auto 0;display:grid}.maejok-input-label-checked{color:#00ff04 !important;text-shadow:0 0 2px #080 !important;transition:color .3s ease-in-out,text-shadow .3s ease-in-out}.maejok-input-button{background-size:100% 100%;margin-top:8px;bottom:0;height:36px}.maejok-input-button-bind{margin-left:auto;flex-basis:fit-content;min-width:200px}.maejok-settings-config-wrapper{max-width:330px;margin:24px auto 24px}.maejok-settings-config-wrapper .maejok-settings-config-input-group{display:flex;margin-bottom:16px}.maejok-settings-config-wrapper .maejok-settings-config-input-group .maejok-input-label-textbox{display:flex;align-self:center;font-size:large;color:#f8ec94;font-family:JetBrains Mono,monospace;font-weight:600;text-shadow:0 0 2px rgba(225,239,252,.75)}.maejok-settings-config-wrapper .maejok-settings-config-input-group .maejok-input-textbox{margin-left:24px;color:#fff;padding:8px;border-radius:4px;border:2px inset rgba(204,199,204,.5);background-color:#2b2d2e;background-image:linear-gradient(180deg, #1f2021, #121314, #000);box-shadow:inset 0 2px 8px 0 #000;width:100%}.maejok-settings-config-wrapper .maejok-settings-config-input-group .maejok-input-help-label{display:flex;align-self:center;margin-left:8px;font-weight:800;cursor:pointer;color:#f5cf65;text-shadow:0 0 2px #000}.maejok-settings-config-help{min-width:400px;max-width:800px;font-size:larger;font-weight:600;font-family:JetBrains Mono;color:#f5cf65;line-height:24px;margin:16px 32px 24px;text-align:center}.maejok-settings-config-help strong{color:#000}.maejok-settings-config-help .maejok-modal_roomname,.maejok-settings-config-help .error{text-shadow:0 0 4px #000}.maejok-settings-config-help .maejok-modal_roomname{color:#5ff}.maejok-settings-config-help .error{color:#f33}.maejok-color-picker-wrapper .maejok-color-picker-group{display:flex;align-items:center;margin-bottom:24px}.maejok-color-picker-wrapper .maejok-color-picker-group .maejok-color-picker-label{margin-top:2px;width:115px;color:#00ff04 !important;text-shadow:0 0 2px #080 !important}.maejok-accordion-highlights{margin-bottom:20px}.maejok-accordion-highlights .maejok-list-wrapper{max-height:500px;overflow-y:auto;width:300px;margin:auto}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-empty{display:block;text-align:center;color:#00bf03;text-shadow:0 1px 2px #000;margin:20px auto 15px;pointer-events:none;transition:opacity .3s ease-in-out}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper{padding:10px;display:flex;justify-content:space-between;border-radius:4px;text-transform:none;color:#00bf03;text-shadow:0 1px 2px #000;transition:color .3s ease-in-out,text-shadow .3s ease-in-out}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper:hover{background-color:rgba(0,0,0,.25);transition:color .3s ease-in-out,background-color .3s ease-in-out}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper:hover .maejok-list-item{color:#00ff04;text-shadow:0 1px 2px #006012;transition:color .3s ease-in-out,text-shadow .3s ease-in-out}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper:hover .maejok-list-item-remove{visibility:visible}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper:hover .maejok-list-item-remove:hover{transform:scale(1)}.maejok-accordion-highlights .maejok-list-wrapper .maejok-list-item-wrapper .maejok-list-item-remove{color:red;cursor:pointer;visibility:hidden;transform:scale(0.8)}.maejok-settings_mentions-list{display:flex;flex-flow:column;background-color:rgba(0,0,0,.65);padding:8px;max-height:420px;max-width:656px;overflow-y:scroll;margin:0 -16px -8px -16px;font-family:Work Sans,sans-serif;user-select:text;text-transform:none}.maejok-settings_mentions-list .chat-message-default_mentioned__EDIeq{background-color:unset !important}.maejok-menu-menu{position:absolute;display:flex;flex-direction:column;font-weight:600;transition:height .3s ease-in-out;text-shadow:2px 2px 3px #000;border-radius:4px;border:2px inset rgba(203,198,203,.5);background-color:#2b2d2e;background-image:linear-gradient(180deg, #1f2021, #121314, black);box-shadow:inset 0px 2px 8px 0px #000}.maejok-menu-menu .maejok-menu-menu_item,.maejok-menu-menu .maejok-menu-menu_no-items{all:unset;cursor:pointer;padding:8px;min-width:200px;text-shadow:1px 1px 2px #000}.maejok-menu-menu .maejok-menu-menu_item:hover,.maejok-menu-menu .maejok-menu-menu_no-items:hover{color:#00ff05;background-color:rgba(255,255,255,.1)}.maejok-menu-menu .maejok-menu-menu_title{all:unset;padding:8px;min-width:200px;text-align:center;background-color:rgba(255,255,255,.05);border-bottom:2px inset rgba(203,198,203,.5)}.maejok-chatters-menu{max-height:300px;overflow-y:auto}.maejok-chatters-menu .maejok-chatters-menu_item .chat-message-default_user__uVNvH{display:flex;flex-direction:row-reverse;font-weight:600}.maejok-chatters-menu .maejok-chatters-menu_item .chat-message-default_clan__t_Ggo{margin-left:auto}.maejok-chatters-menu .maejok-chatters-menu_item:not(:has(.maejok-menu-menu_no-items)){min-width:250px}.maejok-chatters-menu .chat-message-default_user__uVNvH:not(:has(.chat-message-default_clan__t_Ggo)){display:unset;flex-direction:unset}.maejok-hide{display:none !important}.maejok-hide_avatar-fix{top:0 !important;position:relative !important}.maejok-dense-chat{gap:2px !important}.maejok-dim-mode{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);pointer-events:none;z-index:999}.maejok-normalize-message{color:#fff !important;font-weight:300 !important;text-shadow:none !important;background-color:unset !important}.maejok-normalize-message .chat-message-default_mention__Ieq18{color:#ffcf00 !important;font-weight:400 !important}.maejok-chatters_presence-container{text-align:center;cursor:pointer}#maejok-chatters_online-presence-id{display:none !important}.button-link{background:none;border:none;color:#11f8ff;cursor:pointer;font-weight:700;padding:0;font:inherit}.maejok-logo_hide:hover{opacity:0 !important}.maejok-logo_hover{position:absolute;top:0;right:0;left:0;bottom:0;object-fit:contain;opacity:0;transition:opacity .5s}.maejok-logo_hover:hover{opacity:1}.button-link:focus,.button-link:hover,.button-link:active{outline:none;background:none;border:none}.maejok-hide-scan_lines::after{content:none !important}.maejok-modal-body{margin-top:4px;user-select:none;font-family:Highway Gothic,sans-serif;font-weight:600;text-transform:uppercase;color:#1d2127}.chat_chat__2rdNg .chat_messages__2IBEJ{padding:0;border:0}button.top-bar_clan-invite__Gv9N_{right:-75% !important}.maejok-settings_tab-panel{min-width:490px;max-height:100vh;margin-bottom:16px}.maejok-settings_tab-bar{display:flex;gap:8px;margin-top:8px}.maejok-settings_tab-bar .maejok-tab-button{display:flex;border:none;padding:5px;border-radius:3px;cursor:pointer;text-transform:uppercase;background-color:rgba(0,0,0,0) !important;border:1px solid #505050}.maejok-settings_tab-bar .maejok-tab-button button{all:unset;display:flex;justify-content:center;align-items:center;text-align:center;padding:8px;cursor:pointer;color:#fff;flex-grow:1;border-left:0;border-radius:0;font-weight:400}.maejok-settings_tab-bar .maejok-tab-button:hover{border:1px solid #f8ec94;color:#f8ec94}#maejok-update-message{background-color:rgba(0,0,0,.75);outline:1px solid rgba(255,255,255,.6);border-radius:4px;user-select:none;animation:glisten 3s linear infinite;margin:5px 0}#maejok-update-message .maejok-update-body{background-blend-mode:lighten;padding:16px;text-align:center;color:rgba(255,255,255,.9);animation:bounce .3s 5}#maejok-update-message .maejok-update-body .maejok-update-title{font-weight:600;padding:4px;color:#f5f;text-shadow:0px 0px 2px #000}#maejok-update-message .maejok-update-body .maejok-update-click_here{padding:8px;color:#0094ff;font-weight:800;width:fit-content;margin:auto;cursor:pointer}#maejok-update-message .maejok-update-body .maejok-update-click_here:hover{text-shadow:0px 0px 1px #32c0e0}#maejok-update-message .maejok-update-body .maejok-updated-notice{padding:8px;color:#0094ff;font-weight:800;width:fit-content;margin:auto}#maejok-update-message .maejok-update-body .maejok-update-links{margin-top:5px;font-size:.8em;color:rgba(255,255,255,.55)}#maejok-update-message .maejok-update-body .maejok-update-links .maejok-update-changelog,#maejok-update-message .maejok-update-body .maejok-update-links .maejok-update-dismiss{display:inline-block;cursor:pointer}#maejok-update-message .maejok-update-body .maejok-update-links .maejok-update-changelog:hover,#maejok-update-message .maejok-update-body .maejok-update-links .maejok-update-dismiss:hover{color:#fff}',""]);const l=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s="",a=void 0!==t[5];return t[4]&&(s+="@supports (".concat(t[4],") {")),t[2]&&(s+="@media ".concat(t[2]," {")),a&&(s+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),s+=e(t),a&&(s+="}"),t[2]&&(s+="}"),t[4]&&(s+="}"),s})).join("")},t.i=function(e,s,a,o,n){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l<this.length;l++){var r=this[l][0];null!=r&&(i[r]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);a&&i[d[0]]||(void 0!==n&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=n),s&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=s):d[2]=s),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function s(e){for(var s=-1,a=0;a<t.length;a++)if(t[a].identifier===e){s=a;break}return s}function a(e,a){for(var n={},i=[],l=0;l<e.length;l++){var r=e[l],c=a.base?r[0]+a.base:r[0],d=n[c]||0,m="".concat(c," ").concat(d);n[c]=d+1;var p=s(m),h={css:r[1],media:r[2],sourceMap:r[3],supports:r[4],layer:r[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var u=o(h,a);a.byIndex=l,t.splice(l,0,{identifier:m,updater:u,references:1})}i.push(m)}return i}function o(e,t){var s=t.domAPI(t);s.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;s.update(e=t)}else s.remove()}}e.exports=function(e,o){var n=a(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<n.length;i++){var l=s(n[i]);t[l].references--}for(var r=a(e,o),c=0;c<n.length;c++){var d=s(n[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}n=r}}},659:e=>{var t={};e.exports=function(e,s){var a=function(e){if(void 0===t[e]){var s=document.querySelector(e);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}t[e]=s}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(s)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,s)=>{e.exports=function(e){var t=s.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(s){!function(e,t,s){var a="";s.supports&&(a+="@supports (".concat(s.supports,") {")),s.media&&(a+="@media ".concat(s.media," {"));var o=void 0!==s.layer;o&&(a+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),a+=s.css,o&&(a+="}"),s.media&&(a+="}"),s.supports&&(a+="}");var n=s.sourceMap;n&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,s)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function s(a){var o=t[a];if(void 0!==o)return o.exports;var n=t[a]={id:a,exports:{}};return e[a](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.nc=void 0,(()=>{const e=(()=>{const e={loaded:!1,isPopoutChat:!1,modals:[],user:null,bigScreenState:!1,mentions:[],recentChatters:[],observers:{chat:null,user:null},menu:null,prevMousePos:{x:0,y:0},contextUser:null,recentChattersInterval:null,updateCheckInterval:null,daysLeftInterval:null,running:!1,packageJson:{},updateShown:!1,audioElement:!1,pendingKeybind:null};return{get:t=>t?e[t]:e,set:(t,s)=>{e.hasOwnProperty(t)&&(null==s?e[t]=null:"object"!=typeof s||Array.isArray(s)?e[t]=s:e[t]={...e[t],...s})}}})(),t="2.14.2",a=new Map([["doom","mp3"],["vomit","mp3"],["romantic","mp3"],["massacre","mp3"],["breakup","mp3"],["fart","mp3"],["raid","mp3"],["equip","mp3"],["granted","mp3"],["denied","mp3"],["chunk-short","mp3"],["blip","mp3"],["book","mp3"],["chaching","mp3"],["tube","mp3"],["dice","mp3"],["coin","mp3"],["nuke-1","mp3"],["nuke-2","mp3"],["nuke-3","mp3"],["nuke-4","mp3"],["nuke-5","mp3"],["xp","mp3"],["level","mp3"],["mention","mp3"],["yes","mp3"],["global-mission-3","mp3"],["click-high-short","mp3"],["click-low-short","mp3"],["click-harsh-short","wav"],["latch-short","wav"],["swap-short","wav"],["shutter","wav"],["complete","wav"],["xp-down","wav"],["power","wav"],["daily","wav"],["item-found","wav"],["item-consumed","wav"],["panic","wav"],["poll","wav"],["tick-short","wav"]]),o={"living-room":{id:"living-room",name:"Living Room",switchTo:()=>{}},lounge:{id:"lounge",name:"Lounge",switchTo:()=>{}},bar:{id:"bar",name:"Bar",switchTo:()=>{}},kitchen:{id:"kitchen",name:"Kitchen",switchTo:()=>{}},"dog-house":{id:"dog-house",name:"Dog House",switchTo:()=>{}},"hallway-downstairs":{id:"hallway-downstairs",name:"Hallway Downstairs",switchTo:()=>{}},"hallway-upstairs":{id:"hallway-upstairs",name:"Hallway Upstairs",switchTo:()=>{}},"bedroom-1":{id:"bedroom-1",name:"Bedroom 1",switchTo:()=>{}},"bedroom-2":{id:"bedroom-2",name:"Bedroom 2",switchTo:()=>{}},"the-bunk":{id:"the-bunk",name:"The Bunk",switchTo:()=>{}},"bedroom-3":{id:"bedroom-3",name:"Bedroom 3",switchTo:()=>{}},attic:{id:"attic",name:"Attic",switchTo:()=>{}},"upstairs-bathroom":{id:"upstairs-bathroom",name:"Upstairs Bathroom",switchTo:()=>{}},"downstairs-bathroom":{id:"downstairs-bathroom",name:"Downstairs Bathroom",switchTo:()=>{}},"master-bathroom":{id:"master-bathroom",name:"Master Bathroom",switchTo:()=>{}},confessional:{id:"confessional",name:"Confessional",switchTo:()=>{}}},n={"toggle-auto":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Backquote"},"toggle-hq":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyH"},"enter-native-fs":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyF"},"close-stream":{ctrlKey:!1,altKey:!1,shiftKey:!0,code:"Space"},"living-room":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyQ"},lounge:{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyW"},bar:{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyE"},kitchen:{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyR"},"dog-house":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyT"},"hallway-downstairs":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"KeyY"},"hallway-upstairs":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Digit5"},"bedroom-1":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Digit1"},"bedroom-2":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Digit2"},"bedroom-3":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Digit3"},"the-bunk":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"Digit4"},attic:{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"F1"},"upstairs-bathroom":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"F2"},"downstairs-bathroom":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"F3"},"master-bathroom":{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"F4"},confessional:{ctrlKey:!1,altKey:!1,shiftKey:!1,code:"F6"}},i={login:{selector:'[class^="log-in_log-in__"]',class:"log-in_log-in__1Bbqa"},archive:{selector:'[class^="archive_archive"]',class:"archive_archive__wsFNf"},home:{selector:'[class^="home_home"]',class:"home_home__pUFCA"},livestreams:{selector:'[class*="live-streams_live-streams__"]',class:"live-streams_live-streams__BYV96",grid:{selector:'[class*="live-streams_live-streams-grid__"]',class:"live-streams_live-streams-grid__Tp4ah"}},secondaryPanel:{tab:{class:"secondary-panel_tab__PxWtZ",selector:'[class*="secondary-panel_tab__"]'}},header:{selector:'[class*="top-bar_top-bar__"]',class:"top-bar_top-bar___Z0QX",user:{selector:'[class^="top-bar_user"]',class:"top-bar-user_top-bar-user__VUdJm",name:{selector:'[class^="top-bar-user_display-name"]',class:"top-bar-user_display-name__bzlpw"},clan:{selector:'[class^="top-bar_clan_"]',class:"top-bar-user_clan__M5hMP"},level:{selector:'[class^="top-bar_xp"]',class:"top-bar-user_xp___ttgt"},tokens:{selector:'[class^="top-bar_tokens"]',class:"top-bar-user_tokens__vAwEj"}},admin:{selector:'[class^="admin-toolbar_admin-toolbar__"]',class:"admin-toolbar_admin-toolbar__Jlc17"},logo:{selector:'[class^="top-bar_logo__"]',class:"top-bar_logo__XL0_C",img:{selector:'[class^="top-bar_desktop__"]',class:"top-bar_desktop__pjX2g"},hoverImg:{selector:".maejok-logo_hover",classes:["maejok-logo_hover","top-bar_desktop__pjX2g"]},hideImg:{class:"maejok-logo_hide"}},links:{selector:'[class^="top-bar-links"]',class:"top-bar_links__4FJwt"},director:{selector:'[class^="top-side_director__"]',class:"top-side_director__nAHL_"}},profile:{selector:'[class^="profile-modal_profile-modal"]',class:"profile-modal_profile-modal__4mjE7",actions:{selector:'[class^="user-profile_actions]',class:"profile_actions__9KG8x",mute:{selector:'[class^="user-profile_actions"] button:nth-child(1)'}},clanInvite:{selector:'[class*="top-bar_clan-invite__"]',class:"top-bar_clan-invite__Gv9N_"}},countdown:{selector:'[class^="countdown_countdown"]',class:"countdown_countdown__eQUUu"},chat:{main:{selector:'[class^="chat_chat"]',classes:["chat_chat__2rdNg","chat_selected__nnAlf"]},header:{selector:'[class^="chat_header__"]',class:"chat_header__8kNPS",title:{selector:'[class^="chat_title__"]',class:"chat_title__CrfQP"},roomSelect:{selector:'[class^="chat-room-selector_chat-room-selector__"]',class:"chat-room-selector_chat-room-selector__PayQH"},presence:{selector:'[class^="chat_presence__"]',class:"chat_presence__90XuO",id:"maejok-chatters_online-presence-id",online:{selector:'[class*="maejok-chatters_presence-online"]',class:"maejok-chatters_presence-online"},wrapper:{selector:'[class*="maejok-chatters_presence-container"]',class:"maejok-chatters_presence-container"}},recent:{selector:'[class*="maejok-chatters_presence"]',class:"maejok-chatters_presence",count:{selector:'[class*="maejok-chatters_count"]',class:"maejok-chatters_count"},menu:{class:"maejok-chatters-menu",item:{class:"maejok-chatters-menu_item"}}}},list:{selector:'[class^="chat_messages__"]',class:"chat_messages__2IBEJ"},room:{selector:'[class^="chat-room-selector_chat-room-selector__"]',class:"chat-room-selector_chat-room-selector__PayQH",options:{selector:'[class^="select_options__"]',class:"select_options__t1ibN"}},message:{selector:'[class*="chat-message-default_chat"]',class:"chat-message-default_chat-message-default__JtJQL",wes:{selector:'[class*="chat-message-default_wes__"]',class:"chat-message-default_wes__EupNC"},fish:{selector:'[class*="chat-message-default_fish__"]',class:"chat-message-default_fish__9hxl_"},admin:{selector:'[class*="chat-message-default_admin__"]',class:"chat-message-default_admin__soVcy"},epic:{selector:'[class*="chat-message-default_epic__"]',class:"chat-message-default_epic__h5F2K",normalize:{class:"maejok-normalize-message"}},grand:{selector:'[class*="chat-message-default_grand__"]',class:"chat-message-default_grand__Jf2Eh",normalize:{class:"maejok-normalize-message"}},hide:{selector:'[class^="maejok-hide"]',class:"maejok-hide"},avatar:{selector:'[class^="chat-message-default_avatar"] img',class:"chat-message-default_avatar__eVmdi",container:{selector:'[class^="chat-message-default_avatar"]',class:"chat-message-default_avatar__eVmdi"},image:{selector:'[class^="chat-message-default_avatar"] img'}},level:{selector:'[class^="chat-message-default_lvl"]',class:"chat-message-default_lvl__QXf_z"},clan:{selector:'[class^="chat-message-default_clan"]',class:"chat-message-default_clan__t_Ggo"},endorsement:{selector:'[class^="chat-message-default_endorsement__"]',class:"chat-message-default_endorsement__n_LUu"},sender:{selector:'[class^="chat-message-default_user"]',class:"chat-message-default_user__uVNvH"},body:{selector:'[class^="chat-message-default_body"]',class:"chat-message-default_body__iFlH4",text:{selector:'[class^="chat-message-default_message"]',class:"chat-message-default_message__milmT"}},timestamp:{selector:'[class^="chat-message-default_timestamp"]',class:"chat-message-default_timestamp__sGwZy"},mention:{selector:'[class^="chat-message-default_mention"]',class:"chat-message-default_mention__Ieq18"},mentioned:{selector:'[class*="chat-message-default_mentioned"]',class:"chat-message-default_mentioned__EDIeq"}},emote:{selector:'[class^="chat-message-emote_chat"]',class:"chat-message-emote_chat-message-emote__NWoZG",sender:{selector:'[class^="chat-message-emote_user"]',class:"chat-message-emote_user__faZE7"},body:{selector:'[class^="chat-message-emote_message"]',class:"chat-message-emote_message__HE0id"}},consumable:{selector:'[class^="chat-message-happening_chat"]',class:"chat-message-happening_chat-message-happening__tYeDU",sender:{selector:'[class^="chat-message-happening_user"]',class:"chat-message-happening_user__c_Ohh"},body:{selector:'[class^="chat-message-happening_message"]',class:"chat-message-happening_message__W13K6"}},clan:{selector:'[class^="chat-message-clan_chat"]',class:"chat-message-clan_chat-message-clan__kS1Cp"},system:{selector:'[class^="chat-message-system_chat"]',class:"chat-message-system_chat-message-system__qZ_cD",body:{selector:'[class^="chat-message-system_chat"] div div',class:"chat-message-system_chat-message-system__qZ_cD"}},tts:{selector:'[class^="chat-message-tts_chat-message-tts__"]',class:"chat-message-tts_chat-message-tts__2Jlxi"},sfx:{selector:'[class^="chat-message-sfx_chat-message-sfx__"]',class:"chat-message-sfx_chat-message-sfx__OGv6q"},scroll:{selector:'[class^="chat_scroll"]',class:"chat_scroll__6Tqdf"},input:{selector:'[id="chat-input"]',class:"chat-input_input__jljCU",id:"chat-input",form:{selector:'[class^="chat-input_chat-input__"]',class:"chat-input_chat-input__GAgOF"},wrapper:{selector:'[class^="chat-input_input-wrapper__"]',class:"chat-input_input-wrapper__rjiu1"},placeholder:{selector:'[class^="chat-input_placeholder"]',class:"chat-input_placeholder__8Brjt "},actions:{selector:'[class^="chat-input_actions"]',class:"chat-input_actions__QqSJK",medals:{selector:'[class^="medal-selector_medal-selector-wrapper"]',class:"medal-selector_medal-selector-wrapper__bR_Ts"},inputLength:{selector:'[class^="chat-input_length__"]',class:"chat-input_length__c7xG6"}},rich:{mention:"chat-input-mention_chat-input-mention__pDrCH"}}},experience:{selector:'[class^="experience-bar_experience-bar__"]',class:"experience-bar_experience-bar__nVDge"},menu:{selector:'[class^="maejok-menu-menu"]',class:"maejok-menu-menu",item:{selector:'[class^="maejok-menu-menu_item"]',class:"maejok-menu-menu_item"},noItems:{selector:'[class^="maejok-menu-menu_no-items"]',class:"maejok-menu-menu_no-items"},title:{selector:'[class^="maejok-menu-menu_title"]',class:"maejok-menu-menu_title"}},modal:{selector:'[class^="modal_modal"]',class:"modal_modal__MS70U",confirm:{selector:'[class^="confirm-modal_confirm-modal"] button:nth-child(1)',class:"button_button__p28wJ"},container:{selector:'[class^="modal_modal-container"]',class:"modal_modal-container__iQODa"},backdrop:{selector:'[class^="modal_backdrop"]',class:"modal_backdrop__94Bu6"},header:{selector:'[class^="modal_header"]',class:"modal_header__O0ebJ"},close:{selector:'[class^="modal_close"]',class:"modal_close__E9CBl",button:{selector:'[class^="close-button"]',classes:["close-button_close-button__BKUKA","close-button_sm__n0dZT"],image:{attr:["src","https://cdn.fishtank.live/images/slices/close.png"]}}},title:{selector:'[class^="modal_title"]',class:["modal_title__TdXFC"],text:{selector:'[class^="modal_title"] h2'}},body:{selector:'[class^="modal_body"]',class:["modal_body__j3Bav"]},prompt:{selector:'[class*="maejok-modal_prompt"]',class:"maejok-modal_prompt",keyname:{selector:'[class="maejok-modal_keyprompt_name"]',class:"maejok-modal_keyprompt_name"},roomname:{selector:'[class="maejok-modal_roomname"]',class:"maejok-modal_roomname"}}},settings:{selector:'[class^="maejok-modal-modal"]',class:["maejok-modal-modal"],body:{selector:'[class^="maejok-modal-body"]',class:["maejok-modal-body"]},opener:{selector:'[class^="maejok-settings-opener"]',class:["maejok-settings-opener"],button:{class:"chat-input_action__qw4PQ",icon:{class:["icon_icon__bDzMA"]}}},tabs:{bar:{selector:'[class^="maejok-settings_tab-bar"]',class:["button-group_button-group__7lSi7","maejok-settings_tab-bar"]},tab:{selector:'[class^="maejok-tab-button"]',class:["maejok-tab-button"],active:{class:"button-group_selected__rLKL4"}},panel:{selector:'[class^="maejok-settings_tab-panel"]',class:["maejok-settings_tab-panel"]},button:{selector:'[class^="maejok-settings_body"]',classes:["maejok-tab-button"]}},accordion:{active:{selector:'[class^="maejok-accordion-active"]',class:["maejok-accordion-active"]},content:{selector:'[class^="maejok-accordion-content"]',class:["maejok-accordion-content"],highlights:{class:"maejok-accordion-highlights",example:{class:"maejok-accordion-highlights-message_example"}}},header:{selector:'[class^="maejok-accordion-header"]',class:["maejok-accordion-header"]}},mentions:{class:"maejok-settings_mentions-list",item:{class:"maejok-settings_mentions-list-item",remove:{class:"maejok-settings_mentions-list-item-remove"}}},config:{wrapper:{class:"maejok-settings-config-wrapper"},group:{class:"maejok-settings-config-input-group"},help:{class:"maejok-settings-config-help",label:{class:"maejok-input-help-label"}}}},emotes:{selector:'[class^="maejok-modal-emotes"]',class:"maejok-modal-emotes",note:{class:"maejok-emotes-list-note"},list:{selector:'[class^="maejok-emotes-list"]',class:"maejok-emotes-list",label:{selector:'[class^="maejok-emotes-list-label"]',class:"maejok-emotes-list-label"},item:{selector:'[class^="maejok-emotes-list_item"]',class:"maejok-emotes-list_item",command:{selector:'[class^="maejok-emotes-list_item_command"]',class:"maejok-emotes-list_item_command",demote:{class:"maejok-emotes-list_item_command_demote"}},emote:{selector:'[class^="maejok-emotes-list_item_emote"]',class:"maejok-emotes-list_item_emote"},use:{selector:'[class^="maejok-emotes-list_item_use"]',class:"maejok-emotes-list_item_use"},pin:{selector:'[class^="maejok-emotes-list_item_pin"]',class:"maejok-emotes-list_item_pin"}}}},inputs:{group:{class:["maejok-input-group"]},label:{class:["maejok-input-label"]},toggle:{class:["maejok-input-toggle"],label:{class:["maejok-input-toggle-label"],checked:{class:["maejok-input-label-checked"]}}},help:{label:{help:{class:["maejok-input-help-label"]},config:{class:["maejok-input-help-config-label"]}},text:{class:["maejok-input-help-text"]}},buttons:{classes:["maejok-input-button","color-button_color-button__cW61T","color-button_md__GaczN","button_button__p28wJ"],bind:{class:["maejok-input-button-bind","button_sm__O72y2","button_button__p28wJ"],selector:'[class*="maejok-input-button-bind"]'},img_colors:{lightGreen:"hsla(53, 88%, 78%, .1)",red:"hsla(3, 100%, 73%, .1)",darkGreen:"rgba(85, 213, 180, .1)"},wrapper:{class:["maejok-input-button-wrapper"]},label:{class:["color-button_text__3OQAq"],selector:'[class*="color-button_text__3OQAq"]'},save:{class:["maejok-input-button-save","button_button__p28wJ"]},standard:{classes:["button_sm__O72y2","button_button__p28wJ"]}},textbox:{class:"maejok-input-textbox",label:{class:"maejok-input-label-textbox"}},invalid:{class:"maejok-input-invalid"},colorPicker:{wrapper:{class:"maejok-color-picker-wrapper"},group:{class:"maejok-color-picker-group"},label:{class:"maejok-color-picker-label"}},list:{wrapper:{class:"maejok-list-wrapper"},item:{class:"maejok-list-item",wrapper:{class:"maejok-list-item-wrapper"},remove:{class:"maejok-list-item-remove"}},empty:{class:"maejok-list-empty"}}},takeover:{happening:{selector:'[class^="happening_happening__"]',class:"happening_happening__Ca2E7"}}};class l{constructor(e){this.node=e,this.type=this.getType(),this.sender=this.getSender(),this.body=this.getBody(),this.timestamp=this.getTimestamp(),this.mentions=this.getMentions(),this.mentioned=this.isMentioned(),this.html=this.getMessageHTML(),this.fish=this.isFish(),this.grand=!1,this.epic=!1,this.staff=!1}getType(){const e={[i.chat.emote.class]:"emote",[i.chat.scroll.class]:"scroll",[i.chat.system.class]:"system",[i.chat.message.class]:"message",[i.chat.consumable.class]:"consumable",[i.chat.clan.class]:"clan",[i.chat.tts.class]:"tts",[i.chat.sfx.class]:"sfx"},t=this.node.className.split(" ");for(const s of t)if(e.hasOwnProperty(s)){const t=e[s];if("emote"===t){const e=Z(this.node,i.chat.emote.body.selector)||!1;if(e?.includes("rolls a 20-sided dice"))return"roll"}return t}}getMessageHTML(){return"message"===this.type&&(this.node.outerHTML||!1)}getSender(){if(!["message","emote"].includes(this.type))return!1;const e=i.chat[this.type].sender.selector,t=i.chat.message.wes.class,s=i.chat.message.fish.class,a=i.chat.message.admin.class;this.staff=be(this.node,t)?"wes":be(this.node,s)?"fish":!!be(this.node,a)&&"admin";return{id:this.node.getAttribute("data-user-id")||!1,displayName:re(this.node,this.type),html:this.node.querySelector(e)?.outerHTML||!1,staff:this.staff}}getBody(){if(!["message","emote","happening","system"].includes(this.type))return;const e="message"===this.type?i.chat[this.type].body.text.selector:i.chat[this.type].body.selector;return{body:Z(this.node,e)||!1,html:"message"===this.type&&this.node.querySelector(e).innerHTML||!1}}getMentions(){if("message"!==this.type)return;const e=this.node.querySelectorAll(i.chat.message.mention.selector);return Array.from(e).map((e=>e.innerText.replace("@","")))}getTimestamp(){if("message"===this.type)return Z(this.node,i.chat.message.timestamp.selector)||!1}isMentioned(){if("message"!==this.type)return;if(!(Array.isArray(this.mentions)&&this.mentions.length>0))return;const t=e.get("user");if(!t)return!1;const s=this.mentions.map((e=>e.toLowerCase())),a=t.displayName.toLowerCase();return s.includes(a)}isFish(){return"message"===this.type&&(this.fish=this.sender.displayName.includes("🐟"),this.fish)}isGrand(){if("message"!==this.type)return!1;const e=i.chat.message.grand.selector;return!!this.node.querySelector(e)}isEpic(){if("message"!==this.type)return!1;const e=i.chat.message.epic.selector;return!!this.node.querySelector(e)}normalizeEpic(){if(!this.isEpic())return;const e=qe.get("normalizeEpicText"),{selector:t,normalize:s}=i.chat.message.epic;this.node.querySelector(t).classList.toggle(s.class,e)}normalizeGrand(){if(!this.isGrand())return;const e=qe.get("normalizeGrandText"),{selector:t,normalize:s}=i.chat.message.grand,a=this.node.querySelector(t);this.node.classList.toggle(s.class,e),a.classList.toggle(s.class,e)}fixDarkDisplayName(){if(!["message","emote"].includes(this.type)||!qe.get("fixDarkDisplayNames"))return!1;const e=i.chat[this.type].sender.selector,t=this.node.querySelector(e),s=t?.style.color;if(!s)return;if(ke(s)){const e=_e(s);t.setAttribute("style",`color: ${e}`)}}hideElements(e,t){"message"===this.type&&(e=Array.isArray(e)?e:[e]).forEach(((e,s)=>{const a=i.chat.message[e].selector,o=this.node.querySelector(a);if(o)if("avatar"===e){const e=i.chat.message.level.selector,a=this.node.querySelector(e);o&&o.classList.toggle("maejok-hide",t[s]),a&&a.classList.toggle("maejok-hide_avatar-fix",t[s])}else o.classList.toggle("maejok-hide",t[s])}))}highlightMessage(){if("message"!==this.type)return;const t=V("watching",this.sender.id),s=V("friends",this.sender.id),a=e.get("contextUser")?.id===this.sender.id;this.node.classList.toggle("maejok-watched-message",t),this.node.classList.toggle("maejok-friend-message",s),this.node.classList.toggle("maejok-context-message",a)}hide(){this.node.classList.toggle("maejok-hide",!0)}show(){this.node.classList.toggle("maejok-hide",!1)}toggle(){be(this.node,"maejok-hide")?this.show(this.node):this.hide(this.node)}destroy(){for(const e in this)this.hasOwnProperty(e)&&(this[e]=null)}}class r{constructor(t,s){this.title=t,this.body=null,this.modal=null,this.container=null,this.titleElement=null,this.bodyHTML=s,this.uuid=he(),this.modals=e.get("modals"),this.create()}create(){const t=document.querySelector("main"),s=ue();this.container=document.createElement("div"),this.container.classList.add(i.modal.class),this.container.classList.add(i.modal.container.class),this.container.setAttribute("style",`z-index: ${s+1}!important`);const a=document.createElement("div");a.classList.add(i.modal.backdrop.class),a.setAttribute("style",`z-index: ${s+2}!important`),this.modal=document.createElement("div"),this.modal.classList.add(i.modal.class),this.modal.setAttribute("style",`z-index: ${s+3}!important`);const o=document.createElement("div");o.classList.add(i.modal.header.class);const n=document.createElement("div");n.classList.add(i.modal.title.class),this.titleElement=document.createElement("h2"),this.titleElement.classList.add(i.modal.title.class),this.titleElement.textContent=this.title;const l=document.createElement("div");l.classList.add(i.modal.close.class);const r=document.createElement("button");r.classList.add(...i.modal.close.button.classes),r.addEventListener("click",(()=>A(this)));const c=document.createElement("img");c.setAttribute(...i.modal.close.button.image.attr),this.body=document.createElement("div"),this.body.classList.add(i.modal.body.class),o.appendChild(n),n.appendChild(this.titleElement),o.appendChild(l),l.appendChild(r),r.appendChild(c),this.modal.appendChild(o),this.modal.appendChild(this.body),t.parentElement.insertBefore(this.container,t.nextSibling),this.container.appendChild(a),this.container.appendChild(this.modal),this.setBody(this.bodyHTML),e.set("modals",[...this.modals,this.uuid])}getElement(){return this.modal}setTitle(e){this.titleElement.textContent=e}setBody(e){e&&(e instanceof HTMLElement?this.body.appendChild(e):this.body.innerHTML=e)}destroy=t=>{t||(t=this.container),e.set("modals",this.modals.filter((e=>e!==this.uuid)));for(const e in this)this.hasOwnProperty(e)&&(this[e]=null);t?.remove()}}const c=()=>{const t=qe.get("enableUpdateChecks"),s=e.get("updateShown");if(!t||s)return void d();e.get("updateCheckInterval")&&d(),m();const a=6e4*qe.get("updateCheckFrequency"),o=setInterval(m,a);e.set("updateCheckInterval",o)},d=()=>{const t=e.get("updateCheckInterval");t&&(clearInterval(t),e.set("updateCheckInterval",null))},m=async()=>{const s=await p();if(!s)return;const a={currentVersion:t,newVersion:s.version};(function(e,t){const s=e=>e.split(".").map(Number),[a,o,n]=s(t),[i,l,r]=s(e);if(a>i)return!0;if(a<i)return!1;if(o>l)return!0;if(o<l)return!1;if(n>r)return!0;if(n<r)return!1;return!1})(a.currentVersion,a.newVersion)&&(d(),ge("mention"),function(e){const t=document.querySelector(i.chat.list.selector),s=document.createElement("div");s.id="maejok-update-message";const a=document.createElement("div");a.className="maejok-update-body";const o=document.createElement("div");o.className="maejok-update-title",o.innerHTML=`${we().toUpperCase()} v${e.currentVersion}`;const n=document.createElement("div");n.className="maejok-update-click_here",n.innerHTML=`Update to <strong>v${e.newVersion}</strong>!`;const l=document.createElement("div");l.className="maejok-update-links";const r=document.createElement("a");r.className="maejok-update-changelog",r.textContent="changelog";const c=document.createElement("a");c.className="maejok-update-dismiss",c.textContent="dismiss",l.appendChild(document.createTextNode("[  ")),l.appendChild(r),l.appendChild(document.createTextNode("  |  ")),l.appendChild(c),l.appendChild(document.createTextNode("  ]")),a.appendChild(o),a.appendChild(n),a.appendChild(l),s.appendChild(a),t.appendChild(s),n.addEventListener("click",F),r.addEventListener("click",R),c.addEventListener("click",U),de()}(a),e.set("updateShown",!0))},p=async()=>{const t=`https://raw.githubusercontent.com/maejok-xx/maejok-tools/master/package.json?cb=${(new Date).getTime()}`,s=(new Date).getTime();return fetch(t).then((e=>{if(!e.ok)throw new Error(`HTTP error fetching remote package data! Status: ${e.status}`);return e.json()})).then((t=>(e.set("packageJson",{lastCheckedAt:s,...t}),t))).catch((e=>(console.error("Get remote package fetch error:",e),!1)))};const h=()=>{const t=e.get("recentChattersInterval"),s=document.querySelector(i.chat.header.recent.selector);(t||s)&&u(),function(){if(!qe.get("enableRecentChatters"))return;const e=document.querySelector(i.chat.header.selector),t=document.querySelector(i.chat.header.presence.selector),s=document.querySelector(i.chat.header.roomSelect.selector),a=document.createElement("div");a.classList.add(i.chat.header.presence.wrapper.class);const o=document.createElement("div");o.innerHTML=t.innerHTML,o.classList.add(i.chat.header.presence.class,i.chat.header.presence.online.class);const n=document.createElement("div");n.classList.add(i.chat.header.recent.class),n.classList.add(i.chat.header.presence.class);const l=document.createElement("div");l.innerText="Active";const r=document.createElement("div");r.classList.add(i.chat.header.recent.count.class),r.innerHTML="000",r.style.marginRight="5px",n.appendChild(r),n.appendChild(l),a.appendChild(o),a.appendChild(n),e.insertBefore(a,s),t.id=i.chat.header.presence.id,g()}(),g();const a=setInterval((()=>{qe.get("enableRecentChatters")&&g()}),15e3);e.set("recentChattersInterval",a)},u=()=>{const t=e.get("recentChattersInterval");t&&(!function(){const e=document.querySelector(i.chat.header.presence.selector);document.querySelector(i.chat.header.presence.wrapper.selector).remove(),e.style.display="flex"}(),e.set("recentChatters",[]),clearInterval(t),e.set("recentChattersInterval",null))},g=t=>{if(!qe.get("enableRecentChatters"))return;const s=Date.now(),a=e.get("recentChatters"),o=Number(qe.get("recentChattersThreshold"));let n;if(0!==o){const e=60*o*1e3;n=a.filter((t=>s<=t.lastSeen+e))}else n=a;if(t){const e=a.findIndex((e=>e.id===t.id));-1!==e?a[e].lastSeen=s:n=[...n,{...t,lastSeen:s}]}const l=n.sort(((e,t)=>t.lastSeen-e.lastSeen)).sort(((e,t)=>e.fish&&!t.fish?-1:!e.fish&&t.fish?1:t.lastSeen-e.lastSeen)).sort(((e,t)=>e.staff&&!t.staff?-1:!e.staff&&t.staff?1:t.lastSeen-e.lastSeen));e.set("recentChatters",l),function(){if(!qe.get("enableRecentChatters"))return;const t=e.get("recentChatters"),s=document.querySelector(i.chat.header.recent.count.selector);if(!s)return;const a=String(t.length),o=3-a.length,n="0".repeat(o);s.innerText=n+a}()};const b={chat:{start:()=>{e.get("observers").chat?.disconnect();const t=document.querySelector(i.chat.list.selector),s=new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{me(e)}))}))}));s.observe(t,{childList:!0}),e.set("observers",{...e.get("observers"),chat:s})},stop:()=>{const t=e.get("observers");t.chat?.disconnect()}},chatters:{start:()=>{e.get("observers").chatters?.disconnect();const t=document.querySelector(`#${i.chat.header.presence.id}`),s=new MutationObserver((e=>{e.forEach((e=>{const t=document.querySelector(i.chat.header.presence.online.selector),s="childList"===e.type?e.target.textContent:e.target.wholeText;t.textContent=s}))}));s.observe(t,{childList:!0,characterData:!0,subtree:!0}),e.set("observers",{...e.get("observers"),chatters:s})},stop:()=>{const t=e.get("observers");t.chatters?.disconnect()}},modal:{start:()=>{e.get("observers").modal?.disconnect();const t=document.getElementById("__next"),s=new MutationObserver((async e=>{e.forEach((e=>{"childList"===e.type&&0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(e.innerHTML.includes("Application error:")&&(e.innerHTML=e.innerHTML+'<div style="background-color: rgba(0,0,0,0.5); padding: 10px; width: 775px; line-height: 1em; color: red; font-weight: 900; font-size: 2em; text-shadow: 0 0 3px maroon">MAEJOK-TOOLS NOTICE</div><div style="background-color: rgba(0,0,0,0.5); width: 775px; color: #ff7b7b; font-weight: 900; padding: 10px; text-shadow: 0 0 6px black">Something happened and the site crashed...<br/><br/>Please, for the love of everything holy, DISABLE MAEJOK-TOOLS AND CONFIRM THE PLUGIN IS NOT THE CAUSE OF THE ERROR *BEFORE* MAKING ANY BUG REPORTS<br/><br/>If the error no longer exists after disabling the plugin, <a href="https://github.com/maejok-xx/maejok-tools/issues" target="_blank" style="color: #4747ff;">report the bug on GitHub</a> Or by  <a href="https://twitter.com/maejok" target="_blank" style="color: #4747ff;">contacting @maejok</a><br/><br/>However, if, AND ONLY IF, the error persists after fully disabling MAEJOK-TOOLS from within your UserScript extension, you may report the bug on <a href="https://discord.gg/fishtankislive" target="_blank" style="color: #4747ff;">Fishcord</a><br/><br/>DO NOT <u><b>UNDER ANY CIRCUMSTANCE</u></b> CONTACT WES, JET, FISHTANK STAFF OR ANYONE ELSE ABOUT A BUGS CAUSED BY MAEJOK-TOOLS!</div>'),"modal"===e.id){const t=Z(i.modal.title.text.selector);t&&t.includes("Global Mission")&&e.setAttribute("style","display: none !important")}}))}))}));s.observe(t,{childList:!0}),e.set("observers",{...e.get("observers"),body:s})},stop:()=>{const t=e.get("observers");t.modal?.disconnect()}},body:{start:()=>{e.get("observers").body?.disconnect();const t=document.querySelector("body"),s=new MutationObserver((async e=>{e.forEach((e=>{"childList"===e.type&&0!==e.addedNodes.length&&e.addedNodes[0].className&&e.addedNodes[0].className.includes("global-mission-modal_backdrop__oVezg")&&e.addedNodes[0].setAttribute("style","display: none !important")}))}));s.observe(t,{childList:!0}),e.set("observers",{...e.get("observers"),body:s})},stop:()=>{const t=e.get("observers");t.body?.disconnect()}}},y=async()=>{const t=document.querySelectorAll(`${i.settings.body.selector} input`),s=qe.get("updateCheckFrequency"),a=qe.get("enableRecentChatters"),o=qe.get("hideGlobalMissions");t.forEach((e=>{const t=e.id.replace("-hidden","");"checkbox"===e.type?qe.set(t,!!e.checked):("updateCheckFrequency"===t&&(e.value=e.value>=5?e.value:5),qe.set(t,e.value))})),await qe.save(),qe.get("enableMentionLog")||e.set("mentions",[]),fe(qe.get("disableSoundEffects")),f(),te(),ae(qe.get("enableDimMode")),oe(qe.get("hideScreenTakeovers")),qe.get("enableBigScreen")||se(!1);!e.get("running")&&qe.get("enablePlugin")&&Le();if(e.get("running")&&!qe.get("enablePlugin"))return void Ne();qe.get("enableRecentChatters")&&a!==qe.get("enableRecentChatters")&&h(),qe.get("enableRecentChatters")||u();const n=!e.get("updateCheckInterval")&&qe.get("enableUpdateChecks"),l=qe.get("enableUpdateChecks")&&s!==qe.get("updateCheckThreshold"),r=!qe.get("enableUpdateChecks");(n||l)&&c(),r&&d();qe.get("hideGlobalMissions")&&o!==qe.get("hideGlobalMissions")&&(b.body.start(),b.modal.start()),de()},f=()=>{const t=document.querySelector(i.chat.list.selector).children;Array.from(t).forEach((e=>me(e,!1))),e.set("contextUser",null),ee()},k=e=>{const t=document.querySelectorAll(i.settings.tabs.panel.selector);for(const e of t)e.style.display="none";document.querySelector(`[data-tab="${e}"]`).style.display="block"},_=()=>{const s=i.settings,a=qe.settingsOptions(),o=new r(`${we().toUpperCase()} - Settings`),n=document.createElement("div"),l=document.createElement("div");l.classList.add(...s.body.class);const c=function(e){const t=document.createElement("div");return t.classList.add(...e.tabs.bar.class),t.style.textAlign="center",t}(s);return n.appendChild(c),a.forEach((a=>{const n=function(e,t){const s=document.createElement("button");s.classList.add(...t.tabs.button.classes);const a=document.createElement("div");return a.textContent=e.label,s.appendChild(a),a.addEventListener("click",(()=>H(e,s))),s}(a,s);c.appendChild(n);const r=function(e,t){const s=document.createElement("div");return s.classList.add(...t.tabs.panel.class),s.dataset.tab=e.name,s}(a,s);!function(e,t){const s=i.settings.accordion,a=e.content.groups;if(!a)return!1;if(a.forEach(((a,o)=>{const n=document.createElement("button");n.classList.add(...s.header.class),n.dataset.groupHeader=a.name,n.dataset.tab=e.name,n.innerText=a.label;const i=document.createElement("div");i.classList.add(...s.content.class),i.dataset.groupContent=a.name,i.dataset.tab=e.name,t.appendChild(n),t.appendChild(i),0===o&&(n.classList.add(...s.active.class),i.style.maxHeight="500px")})),1===a.length)return;var o=t.querySelectorAll(s.header.selector);o.forEach((function(e){e.addEventListener("click",(()=>O(e,t,s)))}))}(a,r),a.content.inputs?.forEach((e=>{e.disabled||(["toggle"].includes(e.type)?function(e,t,s){const a=i.inputs,o=t.querySelector(`[data-group-content="${e.group}"]`),n=document.createElement("div");n.classList.add(...a.group.class),o?o.appendChild(n):t.appendChild(n);const l=document.createElement("input");l.classList.add(...a.toggle.class),l.type="checkbox",l.id=e.name,l.checked=e.value,l.addEventListener("change",(()=>q(l,c,s))),n.appendChild(l);const r=document.createElement("label");r.classList.add(...a.toggle.label.class),r.setAttribute("for",e.name),n.appendChild(r);const c=document.createElement("label");c.classList.add(...a.label.class),e.value&&c.classList.add(...a.toggle.label.checked.class);if(c.setAttribute("for",e.name),c.textContent=e.label,n.appendChild(c),e.config){const t=document.createElement("b");t.classList.add(...a.help.label.config.class),t.innerHTML="⚙",t.addEventListener("click",(()=>D(e,s))),n.appendChild(t)}if(e.help){const t=document.createElement("b");t.classList.add(...a.help.label.help.class),t.innerHTML=`${e.help.label}`,t.addEventListener("click",(()=>B(e))),n.appendChild(t)}}(e,r,o):["button"].includes(e.type)?function(e,t,s){const a=i.inputs,o=t.querySelector(`[data-group-content="${e.group}"]`),n=document.createElement("div");n.classList.add(...a.group.class),o?o.appendChild(n):t.appendChild(n);const l=v(e,e.color,e.label,e.onclick);if(n.appendChild(l),e.config){const t=document.createElement("b");t.classList.add(...a.help.label.config.class),t.innerHTML="⚙",t.addEventListener("click",(()=>D(e,s))),n.appendChild(t)}if(e.help){const t=document.createElement("b");t.classList.add(...a.help.label.help.class),t.innerHTML=`${e.help.label}`,t.addEventListener("click",(()=>B(e))),n.appendChild(t)}}(e,r,o):["keybind"].includes(e.type)?function(e,t,s){const a=qe.get("binds"),o=i.inputs,n=t.querySelector(`[data-group-content="${e.group}"]`),l=document.createElement("div");l.classList.add(...o.group.class),n?n.appendChild(l):t.appendChild(l);const r=v(e,"lightGreen",je(a[e.value]),(function(){J(this,e.label,e.value)}));r.setAttribute("data-bindid",e.value);const c=document.createElement("label");if(c.classList.add(...o.label.class),c.setAttribute("for",e.name),c.textContent=e.label,l.appendChild(c),e.config){const t=document.createElement("b");t.classList.add(...o.help.label.config.class),t.innerHTML="⚙",t.addEventListener("click",(()=>D(e,s))),l.appendChild(t)}if(e.help){const t=document.createElement("b");t.classList.add(...o.help.label.help.class),t.innerHTML=`${e.help.label}`,t.addEventListener("click",(()=>B(e))),l.appendChild(t)}l.appendChild(r)}(e,r,o):["hidden"].includes(e.type)?function(e,t){const s=document.createElement("input");s.type="hidden",s.id=`${e.name}-hidden`,s.value=e.value,t.appendChild(s)}(e,r):["mentions-log"].includes(e.type)?function(e,t){const s=qe.get("reverseMentionLog"),a=i.settings,o=s?e.value.sort(((e,t)=>t.added-e.added)):e.value.sort(((e,t)=>e.added-t.added)),n=t.querySelector(`[data-group-content="${e.group}"]`),l=document.createElement("div");n?n.appendChild(l):t.appendChild(l),o.length>0?(l.classList.add(a.mentions.class),o.forEach((e=>{const t=document.createElement("div");t.classList.add(a.mentions.item.class),t.innerHTML=e.html,l.appendChild(t)}))):(l.innerHTML="No mentions yet...",l.style.color="gray",l.style.textAlign="center");n.appendChild(l)}(e,r):["color-picker"].includes(e.type)&&function(e,t){const s=t.querySelector(`[data-group-content="${e.group}"]`),a=document.createElement("div");a.classList.add(i.settings.accordion.content.highlights.class);const o=document.createElement("div");o.classList.add(i.inputs.list.wrapper.class),a.appendChild(o);const n=qe.get(e.group);if(0===n.length){const t=document.createElement("div");t.classList.add(i.inputs.list.empty.class),t.innerText="friends"===e.group?"You have no friends...haha!":"Empty",o.appendChild(t)}else n.forEach((t=>{const s=document.createElement("div");s.classList.add(i.inputs.list.item.wrapper.class),o.appendChild(s);const a=document.createElement("div");a.classList.add(i.inputs.list.item.class),a.setAttribute("data-user-id",t.id),a.innerText=t.displayName||rgb(255,255,255),s.appendChild(a);const n=document.createElement("div");n.classList.add(i.inputs.list.item.remove.class),n.innerText="❌",s.appendChild(n),n.addEventListener("mouseup",(()=>{P(e.group,t,s)}))}));s.appendChild(a)}(e,r))})),"about"===a.name&&function(s){const a=e.get("packageJson"),o=[{label:"@maejok",onClick:()=>ne("maejok")},{label:"x.com/@maejok",onClick:()=>window.open("https://twitter.com/maejok","_blank")},{label:"github.com/maejok-xx",onClick:()=>window.open("https://github.com/maejok-xx","_blank")}],n=s.querySelector('[data-group-content="about"]'),i=document.createElement("div");i.className="maejok-settings-about";const l=document.createElement("div");l.classList.add("maejok-settings-about-title"),l.textContent=`${we().toUpperCase()} v${t}`,i.appendChild(l);const r=document.createElement("button");r.classList.add("maejok-settings-about-changelog","button-link"),r.textContent="Changelog",r.onclick=()=>window.open(a.changelog.url,"_blank"),i.appendChild(r);const c=document.createElement("div");c.classList.add("maejok-settings-about-author"),i.appendChild(c);const d=document.createElement("span");d.classList.add("maejok-settings-about-author_label"),d.innerHTML="<strong>Author</strong>: ",c.appendChild(d),o.forEach(((e,t)=>{const s=document.createElement("button");s.classList.add("maejok-settings-about-author_link","button-link"),s.textContent=e.label,s.onclick=e.onClick,c.appendChild(s),t!==o.length-1&&c.appendChild(document.createTextNode(" / "))}));const m=document.createElement("div");m.classList.add("maejok-settings-about-contributors"),i.appendChild(m);const p=document.createElement("span");p.classList.add("maejok-settings-about-author_label"),p.innerHTML="<strong>Contributors</strong>: ",m.appendChild(p),a.contributors.forEach(((e,t)=>{0!==t&&m.appendChild(document.createTextNode(" / "));const s=document.createElement("button");s.classList.add("maejok-settings-about-contact_link","button-link"),s.textContent=e.name,s.onclick=()=>window.open(e.url,"_blank"),m.appendChild(s)}));const h=document.createElement("div");h.classList.add("maejok-settings-about-message"),h.innerHTML='<p>This plugin is not created, promoted, nor endorsed by the creators of Fishtank Live.</p><p>If you have issues while using the plugin, disable it FULLY from your Userscript Extension (Tampermonkey, GreaseMonkey, etc) and try again before making any bug reports.  If you find that the issue goes away when the plugin is disabled, please make a bug report using <a href="https://github.com/maejok-xx/maejok-tools/issues" target="_blank">GitHub Issues</a> and I\'ll work on getting it fixed as soon as possible!</p><p>You can show your appreciation by tipping me tokens or by <a href="https://ko-fi.com/maejok" target="_blank">donating on Ko-fi</a>!</p><p><strong>I LOVE YOU!</strong><br/>-maejok</p>',i.appendChild(h),n.appendChild(i)}(r),l.appendChild(r)})),c.firstChild.classList.add(s.tabs.tab.active.class),n.appendChild(l),o.setBody(n),o};const v=function(e,t,s,a){const o=i.inputs,n=i.settings.tabs,l=document.createElement("button");"keybind"==e?.type&&l.classList.add(...o.buttons.bind.class),"button"==e?.type&&l.classList.add(...o.buttons.standard.classes),l.background_color=o.buttons.img_colors[t]||o.buttons.img_colors.red,l.classList.add(...n.button.classes);const r=document.createElement("div");return r.textContent=s,l.appendChild(r),l.addEventListener("click",(function(){"function"==typeof a&&a.call(this),this.blur(),l.blur()})),l},x=function(e,t){const s=i.inputs,a=document.createElement("div");a.classList.add(s.buttons.wrapper.class);const o=document.createElement("button");o.classList.add(...s.buttons[e].class),o.addEventListener("click",t);const n=document.createElement("div");return n.classList.add(s.buttons.label.class),n.textContent=e,o.appendChild(n),a.appendChild(o),a};const w={laugh:"$displayName bursts into uncontrollable laughter.",lol:"$displayName laughs out loud.",dance:"$displayName performs an impromptu dance.",sob:"$displayName sobs loudly...",cough:"$displayName coughs loudly on everyone",wink:"$displayName winks slyly at everyone around.",sing:"$displayName sings a beautiful song, captivating everyone nearby.",cheer:"$displayName cheers enthusiastically, raising their arms in the air.",cower:"$displayName cowers in fear, shaking like a little bitch.",flex:"$displayName flexes their muscles, showing off their alpha strength.",yawn:"$displayName yawns loudly, showcasing their boredom.",shrug:"$displayName shrugs nonchalantly.",blush:"$displayName blushes deeply, their cheeks burning bright red.",flip:"$displayName performs an acrobatic flip, displaying their agility.",clap:"$displayName claps their hands in applause.",giggle:"$displayName giggles innocently.",sneeze:"$displayName sneezes loudly, startling everyone around.",jump:"$displayName jumps up and down excitedly.",stomp:"$displayName stomps their foot in frustration.",frown:"$displayName frowns, their eyebrows knitting together in displeasure.",groan:"$displayName groans in exasperation.",nod:"$displayName nods their head in affirmation.",cry:"$displayName breaks down in tears.",confused:"$displayName looks visibly confused.",scared:"$displayName appears terrified and starts shivering.",proud:"$displayName stands tall and proud.",inquisite:"$displayName raises an eyebrow in curiosity.",apologetic:"$displayName bows their head in apology.",angry:"$displayName clenches their fists in anger.",spits:"$displayName sprays spit everywhere.",impressed:"$displayName raises their eyebrows in admiration.",surprised:"$displayName gasps in surprise.",rejected:"$displayName looks crestfallen and rejected.",flirty:"$displayName gives a cheeky smile and a suggestive eyebrow raise.",bored:"$displayName lets out a large sigh of boredom.",shocked:"$displayName stands in shock, unable to speak.",sleepy:"$displayName yawns and rubs their eyes, trying to stay awake.",excited:"$displayName jumps up and down with excitement.",offended:"$displayName looks offended.",nervous:"$displayName bites their lower lip nervously.",greet:"$displayName waves a friendly hand in greeting.",calm:"$displayName takes a deep, calming breath.",whistle:"$displayName whistles a merry tune.",ponder:"$displayName furrows their brow in deep thought.",salute:"$displayName stands straight and delivers a crisp salute.",flirt:"$displayName flutters their eyelashes in a flirtatious manner.",invite:"$displayName extends an open invitation with a friendly smile.",admire:"$displayName stares in admiration.",agree:"$displayName nods in agreement.",smh:"$displayName shakes their head: NO.",taunt:"$displayName taunts their opponents with a smirk.",wave:"$displayName waves energetically, catching everyone's attention.",sit:"$displayName takes a seat, looking relaxed.",stand:"$displayName rises to their feet.",ready:"$displayName braces themselves, looking ready for anything.",tired:"$displayName lets out a tired sigh, looking drained.",relax:"$displayName takes a step back to relax.",celebrate:"$displayName looks joyful, ready to celebrate.",sulk:"$displayName slumps their shoulders, sulking.",point:"$displayName points in a particular direction.",call:"$displayName calls out loudly to catch attention.",threaten:"$displayName clenches their fist and looks threatening.",charge:"$displayName charges forward with determination.",poop:"$displayName suddenly squats and... well you know.",pee:"$displayName dashes off to find a quiet corner. Moments later, you hear the trickle of water.",eat:"$displayName starts to eat with gusto, appreciating every bite.",zzz:"$displayName dozes off, snoring gently.",sleep:"$displayName lies down and closes their eyes, drifting off to sleep.",nibble:"$displayName starts to nibble on something, looking content.",stare:"$displayName stares intently, their gaze unwavering.",gaze:"$displayName gazes off into the distance, seemingly in deep thought.",burp:"$displayName lets out a loud burp.",fart:"$displayName farts noisily, a proud smile appearing on their face.",spit:"$displayName spits on the ground.",drink:"$displayName takes a long swig from their drink.",please:"$displayName clasps their hands together, pleadingly.",beg:"$displayName falls to their knees, begging.",slap:"$displayName slaps themselves and loses 2 XP.",trip:"$displayName trips over their own foot, falling flat on the ground, losing 2 XP.",punch:"$displayName punches themselves in the stomach repeatedly, losing 2 XP.",fall:"$displayName loses their balance and falls over, losing 2 XP.",kick:"$displayName kicks their own ass, losing 2 XP.",smile:"$displayName smiles brightly.",sigh:"$displayName lets out a deep sigh.",gasp:"$displayName gasps in astonishment.",pout:"$displayName pouts and crosses their arms.",useless:"$displayName stands there, confused and unsure of what to do.",poke:"$displayName pokes something with their finger, looking amused.",lick:"$displayName licks something, looking like they regret it immediately",sniff:"$displayName sniffs the air, their face scrunching up.",scratch:"$displayName scratches their head in thought.",shrill:"$displayName lets out a shrill laugh, causing everyone to startle.",squint:"$displayName squints their eyes, peering at something in the distance.",chuckle:"$displayName chuckles lowly, a mischievous glint in their eyes.",grin:"$displayName grins from ear to ear, seemingly very pleased.",huff:"$displayName huffs and rolls their eyes dramatically.",smirk:"$displayName smirks in a way that screams 'I told you so'.",pounce:"$displayName suddenly pounces forward, full of energy.",glare:"$displayName shoots a chilling glare ahead, making everyone flinch.",die:"$displayName collapses to the ground theatrically, losing 2 XP.",cum:"$displayName suddenly looks flushed and breathless.",poo:"$displayName sprays a chocolately blast across the room.",spank:"$displayName spanks something audibly with an impish grin on their face.",kill:"$displayName's eyes darken, and for a moment you can see the ruthless killer in them.",headbang:"$displayName bangs their head on a wall, losing 2 XP.",wall:"$displayName runs straight into a wall, not looking where they were going, losing 2 XP.",bite:"$displayName bites their own tongue while eating, losing 2 XP.",chair:"$displayName leans back too far in their chair and falls over, losing 2 XP.",splinter:"$displayName gets a splinter in their finger while handling wood, losing 2 XP.",pinch:"$displayName accidentally pinches their skin with some tool, losing 2 XP.",burn:"$displayName burns their hand with a lighter, losing 2 XP.",gun:"$displayName accidentally discharges their firearm and shoots themselves in the foot, losing 2 XP.",stim:"$displayName starts to stim casually, fidgeting with their fingers.",shoot:"$displayName shoots their Red Ryder BB gun. The pellet ricochets off a fence post and hits them dead in the eye, losing them 2 XP.",shiver:"$displayName shivers noticeably.",snore:"$displayName's snoring can be heard from the other side of the room.",facepalm:"$displayName slaps their forehead in exasperation.",moonwalk:"$displayName does a surprisingly good moonwalk.",yodel:"$displayName suddenly starts yodeling loudly.",fliptable:"$displayName flips the table out of frustration.",vanish:"$displayName vanishes into the shadows...",float:"$displayName begins to levitate.",lift:"$displayName squats 10 times their body weight, impressing the entire room.",clone:"Suddenly, there are two $displayNames.",breakdance:"$displayName starts spinning on their head, breakdancing.",jelq:"$displayName starts doing the ancient and mysterious 'jelq' technique.",flipcoin:["$displayName flips a coin. It lands: heads/tails"],roll:["$displayName rolls a 20-sided dice. It lands: 4"],meef:["$displayName meefs it! They begin to glow!"]},j=["slap","trip","punch","fall","kick","die","headbang","wall","bite","chair","splinter","pinch","burn","gun"];class E{constructor(e,t,s){this.position=e,this.items=t,this.title=s.title,this.titleColor=s.titleColor,this.class=s.class,this.id=he(),this.menu=null,this.noItems=s.noItems,this.create(),this.setPosition(this.position)}create=()=>{const e=ue();if(this.menu=document.createElement("div"),this.menu.classList.add(i.menu.class),this.menu.classList.add(this.class),this.menu.id=`maejok-menu-${this.id}`,this.menu.style.zIndex=e+1,this.title){const e=document.createElement("div");if(e.classList.add(i.menu.title.class),e.innerText=this.title,this.titleColor){const t=ke(this.titleColor)?_e(this.titleColor):this.titleColor;e.setAttribute("style",`color: ${t}`)}else e.setAttribute("style","color: #28d97f");this.menu.appendChild(e)}if(this.items.forEach((e=>{const t=document.createElement("div");t.classList.add(i.menu.item.class,e.class??null),t.style.textAlign=e.align||"center",t.setAttribute("title",e.hover||""),t.innerHTML=e.label,t.onclick=e.action,this.menu.appendChild(t)})),0===this.items.length){const e=document.createElement("div");e.classList.add(i.menu.noItems.class),e.style.textAlign="center",e.innerHTML=this.noItems,this.menu.appendChild(e)}document.querySelector("main").appendChild(this.menu),ge("click-high-short")};setPosition=e=>{this.position=e;const t=document.getElementById(`maejok-menu-${this.id}`),s=t.offsetWidth,a=t.getBoundingClientRect().left+s,o=window.innerWidth-a;this.position.x=Math.min(this.position.x-s/2,o),t.style.left=`${this.position.x}px`;const n=window.innerHeight-50;this.position.y+t.offsetHeight>n?t.style.top=this.position.y-t.offsetHeight-6+"px":t.style.top=`${this.position.y}px`};destroy=()=>{ge("shutter"),this.menu.remove(),e.set("menu",null);for(const e in this)this.hasOwnProperty(e)&&(this[e]=null)}}const C=(t,s,a)=>{const o=(e,t,s)=>new E(e,t.filter(Boolean),s),n={chatInput:()=>o(s,[{label:"View Emotes",action:()=>{L(),(()=>{const t=e.get("user"),s=t?.displayName||"CoolGuy",a=qe.get("pinnedEmotes"),o=[];let n=Object.keys(w).sort().reduce(((e,t)=>(e[t]=w[t],e)),{});const l=(e=!1)=>{Object.keys(n).forEach((t=>{const l=a.includes(t);if(e&&!l)return;if(!e&&l)return;const r=Array.isArray(n[t]);r&&(n[t]=n[t][0]);const c=n[t].replace("$displayName",`<b>${s}</b>`),d=document.createElement("div");d.classList.add(i.emotes.list.item.class);const m=document.createElement("div");m.classList.add(j.includes(t)?i.emotes.list.item.command.demote.class:i.emotes.list.item.command.class),m.innerHTML=`/${t} ${r?"*":""}`,d.appendChild(m);const h=document.createElement("div");h.classList.add(i.emotes.list.item.emote.class),h.innerHTML=`${c}`,d.appendChild(h);const u=document.createElement("button");u.classList.add(i.emotes.list.item.pin.class),u.setAttribute("data-emote-command",t),u.textContent=l?"Unpin":"Pin",d.appendChild(u),u.addEventListener("click",z),o.push({element:u,event:"click",listener:z}),p.appendChild(d)}))},c=new r(`${we().toUpperCase()} - Emotes List`),d=document.createElement("div");d.classList.add(i.emotes.class);const m=document.createElement("div");m.classList.add(i.emotes.note.class),m.innerHTML="<p>* denotes an emote that has multiple outcomes.</p><p>After Pinning/Unpinning an emote, you must close and reopen this window to see the changes.</p>",d.appendChild(m);const p=document.createElement("div");if(p.classList.add(i.emotes.list.class),0!==qe.get("pinnedEmotes").length){const e=document.createElement("div");e.classList.add(i.emotes.list.label.class),e.textContent="Pinned Emotes",p.appendChild(e),l(!0);const t=document.createElement("hr");p.appendChild(t)}l(!1),d.appendChild(p),c.setBody(d)})()}}],{title:"Options"}),message:e=>{const t=V("friends",e.id),a=V("watching",e.id),n=[{label:"View Profile",action:()=>{L(),ve(e.id)}},{label:"Mention",action:()=>{L(),ne(e.displayName)}},!a&&{label:t?"Remove Friend":"Add Friend",action:()=>{L(),W("friends",e,!t)}},!t&&{label:a?"Unwatch":"Watch",action:()=>{L(),W("watching",e,!a)}},{label:"Mute",action:()=>{L(),xe(e)}}],i={title:e.displayName,titleColor:e.color};return o(s,n,i)},chatHide:e=>{const t={roll:"hideDiceRolling",emote:"hideEmotes",system:"hideSystem",consumable:"hideConsumables",clan:"hideClanMessages",tts:"hideTTSMessages",sfx:"hideSFXMessages"},a=("tts"===e?"TTS":"sfx"===e&&"SFX")||void 0,n=[{label:`Hide ${a||Q(e)} Messages`,action:()=>{qe.set(t[e],!0),qe.save(),L(),ge("click-high-short"),f()}}];return o(s,n,{title:"Message Options"})},mention:t=>{const a="object"==typeof t,n=[{label:a?"View Context":"No Context Found",action:a?()=>{L(),e.set("contextUser",t),f()}:null},a&&{label:"View Profile",action:()=>{L(),ve(t.id)}},{label:"Mention",action:()=>{L(),ne(t.displayName||t)}}],i={title:`${t.displayName||t} (mentioned)`};return o(s,n,i)},chatters:e=>{const t=[],a={wes:"Wes",fish:"Season 1 Contestant",admin:"Moderator"};e.forEach((e=>{const s=pe(e.lastSeen),o=a[e.staff]||null,n={label:e.html,class:i.chat.header.recent.menu.item.class,align:"left",hover:`${o?`${o} - `:""}Last seen ${s}`,action:()=>{ne(e.displayName),L()}};t.push(n)}));const n={title:"Recent Chatters",noItems:"Nobody here...",class:i.chat.header.recent.menu.class};return o(s,t,n)}},l=n[t];if(l){const t=l(a);e.set("menu",t)}else console.error(`Unsupported menu type: ${t}`)},L=()=>{const t=e.get("menu");t&&t.destroy()},N=t=>{if(!qe.get("enableChatMenu")&&!qe.get("enableEmotesMenu"))return;const s=t.target,a=e.get("menu"),o={x:t.clientX,y:t.clientY},n={...o,y:o.y+3};if(a){if(ye(e.get("prevMousePos"),o))return void L();L()}e.set("prevMousePos",o);if(t.target.closest(i.chat.input.form.selector)&&qe.get("enableEmotesMenu"))return t.preventDefault(),void C("chatInput",n);if(t.target.closest(i.chat.list.selector)&&qe.get("enableChatMenu")){const e=ie(s);if("message"===e){if(be(t.target,i.chat.message.mention.class)){const e=Z(s).replace("@",""),a=ce(e);return t.preventDefault(),void C("mention",n,a||e)}const e=le(s);if(!e)return;t.preventDefault(),C("message",n,e)}["roll","emote","system","consumable","clan","tts","sfx"].includes(e)&&(t.preventDefault(),C("chatHide",n,e))}},S=t=>{const s=t.target;if(null!==s.closest(i.menu.selector))return;L();switch(function(){const e={[i.chat.message.sender.class]:{target:s,item:"chatUsername"},[i.chat.message.avatar.class]:{target:s.parentElement,item:"chatAvatar"},[i.chat.header.presence.wrapper.class]:{target:s.parentElement,item:"recentChatters"},[i.chat.header.presence.class]:{target:s.parentElement,item:"recentChatters"},[i.secondaryPanel.tab.class]:{target:s.parentElement?.parentElement,item:"bigScreen"}};let t;for(const[s,a]of Object.entries(e)){a.target.classList.contains(s)&&(t=a.item)}return t}()){case"bigScreen":const a=qe.get("enableBigScreen")&&qe.get("bigScreenState")&&e.get("bigScreenState");setTimeout((()=>se(a,!0)),0);break;case"chatAvatar":s.className=i.chat.message.avatar.class;break;case"chatUsername":if(!qe.get("enableImprovedTagging"))return;t.stopPropagation(),t.preventDefault();const o=le(t.target);if(!o)return;ne(o.displayName);break;case"recentChatters":const n=t.target.getBoundingClientRect(),l=n.left+n.width/2,r=n.bottom,c=e.get("recentChatters");C("chatters",{x:l,y:r},c)}},T=e=>{const t=e.target,s=[t,t.parentElement],a=[i.chat.message.body.class,i.chat.message.body.text.class];if(s.some((e=>be(e,a)))){window.getSelection().removeAllRanges();const e=le(t);if(V("friends",e.id))return void toast(`Can't add friends to Watching list! Remove ${e.displayName} from friends list first.`,"error");const s=V("watching",e.id);W("watching",e,!s)}},$=t=>{if(!e.get("loaded")||e.get("isPopoutChat"))return;const s="Backquote",a="Space",n="Escape";if(t.ctrlKey&&t.code===s||t.ctrlKey&&t.shiftKey&&t.code===a)return void se();if(qe.get("bigScreenState")&&t.code===n)return void se(!1);const l={ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,code:t.code},r=document.querySelector(i.modal.prompt.selector);if(r){r.querySelector(i.modal.prompt.keyname.selector).textContent=je(l),r.querySelector(".error").style.display="none";const s=qe.get("binds");for(let e in s)if(ye(s[e],l)){r.querySelector(".error").style.display="block";break}return e.set("pendingKeybind",l),t.stopPropagation(),void t.preventDefault()}if(qe.get("bindsEnable")&&!X()){const e=qe.get("bindsForceCtrl");if(!l.ctrlKey&&e)return;const s=qe.get("binds");if(M(l,s["toggle-auto"]))return document.querySelector('.live-streams-auto-mode_live-streams-auto-mode__pE2X_ input[type="checkbox"]')?.click(),t.stopPropagation(),void t.preventDefault();if(M(l,s["close-stream"]))return document.querySelector(".live-stream-fullscreen_close__JY_lb > button")?.click(),t.stopPropagation(),void t.preventDefault();if(M(l,s["toggle-hq"]))return document.querySelector('.live-stream-controls_right__u0Dox input[type="checkbox"]')?.click(),t.stopPropagation(),void t.preventDefault();if(M(l,s["enter-native-fs"]))return document.querySelector("#live-stream-player video")?.requestFullscreen(),t.stopPropagation(),void t.preventDefault();for(let e in o){if(M(l,s[o[e].id])&&"function"==typeof o[e].switchTo)return o[e].switchTo(),t.stopPropagation(),void t.preventDefault()}}};function M(e,t){return!(!e||!t)&&(e.code==t.code&&(e.ctrlKey==t.ctrlKey||e.ctrlKey&&qe.get("bindsForceCtrl")&&!t.ctrlKey)&&e.altKey==t.altKey&&e.shiftKey==t.shiftKey)}const A=e=>{ge("click-high-short"),e.destroy(e.container)},K=()=>{ge("click-high-short"),_(),k("main")},q=(e,t,s)=>{ge("shutter"),e.checked?t.classList.add("maejok-input-label-checked"):t.classList.remove("maejok-input-label-checked"),y()},I=(e,t,s)=>{e.forEach((e=>{const t=document.getElementById(e.name);if(function(e,t){if("number"===e)return/^\d+$/.test(t)}(e.valid,t.value)){document.getElementById(`${e.name}-hidden`).value=t.value}})),y(),s.destroy()},O=(e,t,s)=>{ge("shutter");t=e.nextElementSibling;be(e,s.active.class[0])?(e.classList.remove(s.active.class[0]),t.style.maxHeight=null):(t.parentElement.querySelectorAll(s.content.selector).forEach((function(e){e.style.maxHeight=null})),t.parentElement.querySelectorAll(s.header.selector).forEach((function(e){e.classList.remove(s.active.class[0])})),e.classList.add(s.active.class[0]),t.style.maxHeight=t.scrollHeight+"px")},H=(e,t)=>{const s=i.settings.tabs.tab.active.class,a=t.parentElement;for(const e of a.children)e.classList.remove(s);t.classList.add(s),ge("click-high-short"),k(e.name)},B=e=>{const t=new r(`${e.label} - Help`),s=document.createElement("div");s.classList.add(i.settings.config.help.class),s.innerHTML=e.help.text,t.setBody(s)},D=(e,t)=>{((e,t)=>{const s=new r(`${we().toUpperCase()} - ${e.config.title}`),a=document.createElement("div");a.classList.add(i.settings.config.wrapper.class),e.config.options.forEach((e=>{const t=document.createElement("div");t.classList.add(i.settings.config.group.class);const s=document.createElement("label");if(s.classList.add(i.inputs.textbox.label.class),s.setAttribute("for",e.name),s.textContent=e.label,t.appendChild(s),["input","number"].includes(e.type)){const s=document.createElement("input");s.classList.add(i.inputs.textbox.class),s.type=e.type,s.id=e.name,s.value=qe.get(e.name),t.appendChild(s)}if(e.help){const s=document.createElement("b");s.classList.add(i.settings.config.help.label.class),s.innerHTML="?",s.addEventListener("click",(()=>B(e))),t.appendChild(s)}a.appendChild(t)}));const o=x("save",(()=>{I(e.config.options,t,s)}));a.appendChild(o),s.setBody(a)})(e,t)},P=(e,t,s)=>{W(e,t,!1)&&s.remove()},F=()=>{const t=e.get("packageJson");if(!t?.update.url)return;const s=window.open(t.update.url,"maejok_update");setTimeout((()=>{s.close(),function(){const e=()=>{alert("After updating MAEJOK-TOOLS, refresh this window to start using the new version"),document.removeEventListener("visibilitychange",e)};document.addEventListener("visibilitychange",e)}()}),1e3)},R=()=>{const t=e.get("packageJson");t?.changelog.url&&window.open(t.changelog.url,"maejok_update_changelog")},U=()=>{const e=document.getElementById("maejok-update-message"),t=e.querySelector(".maejok-update-click_here"),s=e.querySelector(".maejok-update-changelog"),a=e.querySelector(".maejok-update-dismiss");e&&(t?.removeEventListener("click",F),s.removeEventListener("click",R),a.removeEventListener("click",U),e.remove())},z=e=>{ge("shutter");const t=e.currentTarget.getAttribute("data-emote-command"),s=Y("pinnedEmotes",t);e.currentTarget.textContent=s?"Unpin":"Pin"},J=(t,s,a)=>{if(ge("shutter"),e.set("pendingKeybind",null),document.querySelector(i.modal.prompt.class))return;let o=new r("Rebind Key");const n=document.createElement("div");n.classList.add(i.modal.prompt.roomname.class),n.textContent=s;const l=document.createElement("div");l.classList.add(i.modal.prompt.keyname.class),l.textContent="(none)";const c=document.createElement("div");c.classList.add("error"),c.textContent="Conflicts with an existing keybind!",c.style.display="none";const d=x("save",(function(){ge("shutter");let s=e.get("pendingKeybind");if(s){let e={};e[a]=s,qe.set("binds",e),y(),t.textContent=je(s)}e.set("pendingKeybind",null),o.destroy()})),m=document.createElement("div");m.classList.add(i.settings.config.help.class),m.innerHTML="Input a key or key combo to set a new keybind for:<br />",m.append(n),m.append(document.createElement("br")),m.append(l),m.append(c),m.append(d),o.setBody(m),o.getElement().classList.add(i.modal.prompt.class)},G=()=>{ge("shutter"),qe.set("binds",n),y(),(()=>{const e=document.querySelectorAll(i.inputs.buttons.bind.selector),t=qe.get("binds");for(var s of e)s.dataset.bindid&&(s.querySelector(i.inputs.buttons.label.selector).textContent=je(t[s.dataset.bindid]))})()};const X=()=>document.activeElement.className.toLowerCase().includes("input")||"input"==document.activeElement.role?.toLowerCase()||"input"==document.activeElement.tagName.toLowerCase(),V=(e,t)=>{const s=qe.get(e);return!!s.length&&s.some((e=>e.id===t))},W=(e,t,s)=>{const a=qe.get(e);let o=!1,n=!1;if(a.length&&(n=a.some((e=>e.id===t.id))),s){if(n)return Ce(`${t.displayName} is already in ${e} list`,"error"),!1;o=[...a,{id:t.id,displayName:t.displayName,color:t.color}],Ce(`${t.displayName} added to ${e} list`,"success")}else{if(!n)return Ce(`${t.displayName} is not in ${e} list`,"error"),!1;o=a.filter((e=>e.id!==t.id)),Ce(`${t.displayName} removed from ${e} list`,"success")}return o?(qe.set(e,o),qe.save(),f(),!0):(Ce(`${t.displayName} could not be added to ${e} list`,"error"),!1)},Y=(e,t)=>{const s=qe.get(e),a=s.includes(t);if(a){const e=s.indexOf(t);s.splice(e,1)}else s.push(t);return qe.set(e,s),qe.save(),!a},Q=e=>e.replace(/^\w/,(e=>e.toUpperCase())),Z=(e,t=!1)=>{let s=!1;return"string"==typeof e&&(e=document.querySelector(e)),!!e&&(void 0!==typeof(e=t?e.querySelector(t):e).textContent?s=e.textContent:void 0!==typeof e.innerText?s=e.innerText:void 0!==typeof e.innerHTML&&(s=e.innerHTML),s||!1)},ee=()=>{document.querySelector(i.chat.list.selector).classList.toggle("maejok-dense-chat",qe.get("enableDenseChat"))},te=e=>{const t=document.querySelector("body");e=void 0===e?qe.get("hideScanLines"):e,t.classList.toggle("maejok-hide-scan_lines",e)},se=(t=null,s=!1)=>{if(qe.get("enableBigScreen")?(s||ge("shutter"),t=null===t?!e.get("bigScreenState"):t):t=!1,qe.get("persistBigScreen")&&(qe.set("bigScreenState",t),qe.save()),e.set("bigScreenState",t),t){const e=document.createElement("style");e.textContent='\n.home_home__pUFCA .home_center__6GW_l {\n  grid-column: 1/4;\n  grid-row: 1/6;\n}\n\n#main-panel {\n  margin-right: 3px;\n}\n\n.live-streams_live-streams__BYV96 {\n  padding: 0 10px;\n}\n\n.top-bar_top-bar___Z0QX,\n.secondary-panel_secondary-panel__vUc65,\n.experience-bar_experience-bar__nVDge,\n.announcement_announcement__Sow3P,\n.home_left__UiQ0z,\n.home_center-bottom__zlpWm,\n.home_right__j_b3u,\n.tts-history_tts-history__8_9eB  {\n  display: none !important;\n}\n\n.live-stream-fullscreen_live-stream-fullscreen__zpNvE {\n  .live-stream-fullscreen_left__idsvZ,\n  .live-stream-fullscreen_right___UCNg {\n    flex: 2% 1;\n\n    img {\n      display: none;\n    }\n  }\n}\n\n#live-stream-player > div.live-stream-fullscreen_close__JY_lb > button {\n  all: unset;\n  cursor: pointer;\n  text-shadow: 0px 0px 4px #000;\n\n  &:hover {\n    transform: scale(1.15);\n  }\n\n  &::before {\n    unset: all;\n    content: "❌";\n  }\n\n  img {\n    display: none;\n  }\n}\n',e.setAttribute("id","maejok-bigscreen"),document.head.appendChild(e)}else{const e=document.getElementById("maejok-bigscreen");e?.remove()}},ae=e=>{if(e){const e=document.createElement("style");e.textContent="\n.background_background__fNMDL {\n  background: #1c1c1c;\n  background-image: none;\n}\n\n.live-stream_live-stream__uVezO,\n.live-stream-fullscreen_left__idsvZ,\n.live-stream-fullscreen_right___UCNg,\n.episode-fullscreen_left__bNbXb,\n.episode-fullscreen_right__HuAn9,\n.top-bar_top-bar___Z0QX,\n.stats_stats__SIg_t,\n.tts-history_tts-history__8_9eB,\n.secondary-panel_secondary-panel__vUc65,\n.experience-bar_experience-bar__nVDge,\n.announcement_announcement__Sow3P,\n.chat-input_actions__QqSJK,\n.chat_header__8kNPS,\n.loader_loader__iek2w,\n.clans_clans__v2iO2,\n.episodes_episodes__o7PWv,\n.leader-board_leader-board__7KyzK,\n.episode-fullscreen_bonus__scypw,\n.clan-info_clan-info___2J6Z,\n#contestants {\n  filter: brightness(0.5) !important;\n}\n\n.episode_episode__oA49f {\n  filter: brightness(0.7);\n}\n\n.live-stream_popular__hfeZD {\n  filter: drop-shadow(0 0 8px rgba(255,29,0,.75)) brightness(0.8) !important;\n}\n\n.modal_backdrop__94Bu6 {\n  background-color: rgba(0, 0, 0, 0.5) !important;\n}\n\n.modal_modal-container__iQODa .modal_modal__MS70U:before {\n  filter: brightness(0.25);\n}\n\n#live-stream-player, #episode-player {\n  border: none;\n  box-shadow: none;\n  outline-color: rgb(129 129 129);\n}\n\n#live-stream-player:after, #episode-player:after {\n  filter: brightness(0.7);\n}\n\n#live-stream-player:before, #episode-player:before {\n  filter: brightness(0.5);\n}\n\n.chat_chat__2rdNg {\n  filter: brightness(0.9);\n  border: none;\n  box-shadow: none;\n  outline-color: rgb(129 129 129) !important;\n}\n\n.chat_chat__2rdNg .chat_messages__2IBEJ:before {\n  opacity: 0 ;\n}\n\n.chat_chat__2rdNg:after,\n.chat_chat__2rdNg:before {\n  filter: brightness(0.5);\n}\n\n#live-stream-fullscreen {\n  filter: brightness(0.25);\n}\n\n.live-stream-controls_live-stream-controls__hI4aT {\n  filter: brightness(0.75);\n}\n",e.setAttribute("id","maejok-darkmode"),document.head.appendChild(e)}else{const e=document.getElementById("maejok-darkmode");e?.remove()}},oe=e=>{if(e){const e=document.createElement("style");e.textContent="\n.happening_happening__Ca2E7,\n.happening_backdrop__JCihz,\n.cyber-attack_cyber-attack__hKvrm {\n  display: none !important;\n}\n",e.setAttribute("id","maejok-hidescreentakeovers"),document.head.appendChild(e)}else{const e=document.getElementById("maejok-hidescreentakeovers");e?.remove()}},ne=e=>{const t=document.querySelector(i.chat.input.selector);"object"==typeof e&&(e=e.displayName);const s=new CustomEvent("insertmention",{detail:`${e}`});ge("click-high-short"),document.dispatchEvent(s),t&&Ae(t)},ie=e=>{const t={message:i.chat.message.class,emote:i.chat.emote.class,clan:i.chat.clan.class,system:i.chat.system.class,consumable:i.chat.consumable.class,tts:i.chat.tts.class,sfx:i.chat.sfx.class},s=new Map([["message",be(e,t.message)||$e(e,t.message)],["emote",be(e,t.emote)||$e(e,t.emote)],["roll",e.textContent.includes("rolls a 20-sided dice")&&(be(e,t.emote)||$e(e,t.emote))],["clan",be(e,t.clan)||$e(e,t.clan)],["system",be(e,t.system)||$e(e,t.system)],["consumable",be(e,t.consumable)||$e(e,t.consumable)],["tts",be(e,t.tts)||$e(e,t.tts)],["sfx",be(e,t.sfx)||$e(e,t.sfx)]]);let a=null;return s.forEach(((e,t)=>{e&&(a=t)})),a},le=e=>{const t=ie(e);if(!e)return;if(!["message","emote","roll"].includes(t))return;const s=i.chat[t],a=$e(e,s.class),o=a.querySelector(s.sender.selector);if(!o||!a)return;const n=re(o,t),l=o.style.color||"rgb(255, 255, 255)";return{displayName:n,id:a.hasAttribute("data-user-id")?a.getAttribute("data-user-id"):null,color:l}},re=function(e,t){const s=i.chat[t].sender,a=e.classList.contains(s.class)?e:e.querySelector(s.selector);return"message"===t?a.lastChild.textContent:Z(a)},ce=e=>{const t=document.querySelectorAll(i.chat.message.selector),s=Array.from(t);let a=!1;return s.some((t=>{const s=new l(t),o=s.sender,n=s.type;return s.destroy(),"message"===n&&(o.displayName===e?(a=o,!0):void 0)})),a},de=()=>{const e=document.querySelector(i.chat.list.selector);e.scrollTop=e.scrollHeight},me=(t,s=!0)=>{const a=qe.get(),o=new l(t);s&&function(t){const s=qe.get();if("message"!==t.type)return;t.mentioned&&s.enableMentionLog&&e.set("mentions",[...e.get("mentions"),{...t,added:Date.now()}])}(o),function(e){const t=e.querySelector(`${i.chat.system.selector} div`);t&&t.textContent.includes("Joined ")&&g()}(t);if(a[{emote:"hideEmotes",system:"hideSystem",clan:"hideClanMessages",consumable:"hideConsumables",roll:"hideDiceRolling",tts:"hideTTSMessages",sfx:"hideSFXMessages"}[o.type]]&&a.enablePlugin)o.hide();else{o.show();const e={hideTimestamps:{element:"timestamp",hide:!!a.enablePlugin&&a.hideTimestamps},hideClans:{element:"clan",hide:!!a.enablePlugin&&a.hideClans},hideAvatars:{element:"avatar",hide:!!a.enablePlugin&&a.hideAvatars},hideLevels:{element:"level",hide:!!a.enablePlugin&&a.hideLevels},hideEndorsements:{element:"endorsement",hide:!!a.enablePlugin&&a.hideEndorsements}},t=Object.entries(e).reduce(((e,[,t])=>(e.element.push(t.element),e.hide.push(t.hide),e)),{element:[],hide:[]});o.normalizeEpic(),o.normalizeGrand(),o.fixDarkDisplayName(),o.hideElements(t.element,t.hide),o.highlightMessage(),g(o.sender)}o.destroy()},pe=e=>{const t=Math.round((Date.now()-e)/6e4);return t<1?"less than a minute ago":`${t} ${1===t?"minute":"minutes"} ago`},he=()=>{const e=new Uint16Array(8);return window.crypto.getRandomValues(e),Array.from(e,(e=>e.toString(16))).join("")},ue=()=>{let e=0;const t=document.getElementsByTagName("*");for(let s=0;s<t.length;s++){const a=window.getComputedStyle(t[s]).getPropertyValue("z-index");if(!isNaN(a)&&"auto"!==a){const t=parseInt(a,10);t>e&&(e=t)}}return e},ge=e=>{const t=document.createElement("audio");t.style.display="none";const s=a.get(e);s?(t.volume=.5,t.src=`https://cdn.fishtank.live/sounds/${e}.${s}`,document.body.appendChild(t),t.onended=()=>{t.remove()},t.play()):console.warn(`Sound '${e}' not found`,"error")},be=(e,t)=>Array.isArray(t)?t.some((t=>e?.classList?.contains(t))):e?.classList?.contains(t)||!1,ye=(e,t)=>{const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(let a of s)if(e[a]!==t[a])return!1;return!0},fe=t=>{const s=e.get("audioElement");if(!1===s)return e.set("audioElement",HTMLAudioElement.prototype.play),void fe(!!t);HTMLAudioElement.prototype.play=function(){return this.muted=!!t,s.apply(this,arguments)}},ke=(e,t=40)=>{const{r:s,g:a,b:o}=Te(e);return.299*s+.587*a+.114*o<t},_e=e=>{const{r:t,g:s,b:a}=Te(e),o=e=>Math.max(8,e),n=o(t),i=o(s),l=o(a);return`rgb(${Math.min(255,Math.round(15*n))}, ${Math.min(255,Math.round(15*i))}, ${Math.min(255,Math.round(15*l))})`},ve=async e=>{const t=await Se("get",`https://www.fishtank.live/api/user/get?uid=${e}`),s=new CustomEvent("modalopen",{detail:JSON.stringify({modal:"Profile",data:t.profile})});document.dispatchEvent(s)},xe=async e=>{ve(e.id);let t=0;const s=setInterval((()=>{const e=document.querySelector(i.profile.actions.mute.selector);e?(clearInterval(s),e.click()):t>200&&(clearInterval(s),ge("denied")),t++}),10)},we=()=>e.get("packageJson")?.name||qe.plugin("name"),je=e=>{if(!e)return"(none)";return(e.ctrlKey&&!~e.code.indexOf("Control")?"Ctrl + ":"")+(e.altKey&&!~e.code.indexOf("Alt")?"Alt + ":"")+(e.shiftKey&&!~e.code.indexOf("Shift")?"Shift + ":"")+({Backquote:"`"}[e.code]||e.code).replace(/^Digit(\d)$/,"NumRow $1").replace(/^Key([A-Z])$/,"$1")},Ee=()=>{const e=qe.get("binds");for(const t in e)t in n||delete e[t];for(const t in n)t in e||(e[t]={...n[t],...e[t]});return qe.set("binds",e),e},Ce=(e="default message",t="info",s=5e3)=>{const a=new CustomEvent("toastopen",{detail:JSON.stringify({type:t,message:e,duration:s,id:he()})});document.dispatchEvent(a)},Le=async()=>{qe.load();const t=qe.get(),s=e.get("isPopoutChat");Ke(!0),t.enableRecentChatters&&(h(),b.chatters.start()),fe(qe.get("disableSoundEffects")),f(),te(),oe(qe.get("hideScreenTakeovers")),b.chat.start(),qe.get("hideGlobalMissions")&&(b.body.start(),b.modal.start());const a=e.get("user");t.autoClanChat&&null!==a.clan&&!s&&function(e="Global"){e="autoClanChat"===e?function(e){const t=document.querySelector(i.header.user[e].selector).innerText;if("level"===e&&t)return t.replace("LVL ","");return t}("clan"):e;document.querySelectorAll(`${i.chat.room.options.selector} button span`).forEach((t=>{t.innerText===e&&t.click()}))}(a.clan.tag),t.persistBigScreen&&!s&&se(t.bigScreenState,!0),s||c();const o=document.querySelector("main");o.addEventListener("click",S),o.addEventListener("contextmenu",N),o.addEventListener("dblclick",T),document.addEventListener("keydown",$),e.set("running",!0)},Ne=()=>{se(!1),Ke(!1),b.chat.stop(),b.chatters.stop(),b.body.stop(),b.modal.stop(),fe(!1),u(),d(),te(!1),clearInterval(e.get("updateCheckInterval")),clearInterval(e.get("daysLeftInterval")),e.set("updateCheckInterval",null),e.set("daysLeftInterval",null);const t=document.querySelector(i.chat.list.selector),s=document.querySelector(i.home.selector);s.removeEventListener("click",S),s.removeEventListener("contextmenu",N),t.removeEventListener("dblclick",T),document.removeEventListener("keydown",$),e.set("running",!1)};async function Se(e,t){let s=null,a=function(e){try{const t=new URL(e).hostname.split(".");return t.slice(-2,-1).join(".")}catch(e){return console.error("Invalid URL:",e.message),null}}(t);const o="sb-wcsaaupukpdmqdjcgaoo-auth-token",n="fishtank"===a?Me(o).raw:Me(o).decoded,i="supabase"===a?`Bearer ${Me(o).decoded}`:null,l=`${o}=${n}`,r={method:e.toUpperCase(),headers:{ApiKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Indjc2FhdXB1a3BkbXFkamNnYW9vIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODkxMDM4NDEsImV4cCI6MjAwNDY3OTg0MX0.xlZdK9HhTCF_fZgq8k5DCPhxJ2vhMCW1q9du4f0ZtWE",Cookie:l,Authorization:i}};try{const e=await fetch(t,r);if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);const a=e.headers.get("Content-Type");return s=a&&a.includes("application/json")?await e.json():await e.text(),Array.isArray(s)?s[0]:s}catch(e){throw console.error("Error fetching data:",e),e}}function Te(e){let t,s,a;if(e.includes("rgb")){const o=e.replace(/[^\d,]/g,"").split(",");t=parseInt(o[0],10),s=parseInt(o[1],10),a=parseInt(o[2],10)}else{if(!e.includes("#"))return!1;{const e=hexColor.replace(/^#/,""),o=parseInt(e,16);t=o>>16&255,s=o>>8&255,a=255&o}}return{r:t,g:s,b:a}}function $e(e,t){return e.closest(`.${t.split(" ").join(", .")}`)||!1}function Me(e){const t=document.cookie.split(";");for(let s=0;s<t.length;s++){const a=t[s].trim();if(a.startsWith(e+"=")){const t=a.substring(e.length+1);return{raw:t,decoded:JSON.parse(decodeURIComponent(t))[0]}}}return!1}function Ae(e){const t=document.createRange(),s=window.getSelection();t.selectNodeContents(e),t.collapse(!1),s.removeAllRanges(),s.addRange(t),e.focus()}function Ke(e){const t=i.header.logo,s=document.querySelector(t.img.selector);if(s.classList.toggle(t.hideImg.class,e),e){const e=document.createElement("img");e.src="https://github.com/maejok-xx/maejok-tools/blob/06bddd3e353365fc62df0e1415b4cda3cbf07b14/public/images/logo-full-white-red-eyes.png?raw=true",e.classList.add(...t.hoverImg.classes),s.insertAdjacentElement("afterend",e)}else document.querySelector(t.hoverImg.selector).remove()}const qe=(()=>{const t={userData:null,enablePlugin:!0,enableDimMode:!1,enableBigScreen:!0,persistBigScreen:!1,bigScreenState:!1,disableSoundEffects:!1,hideGlobalMissions:!1,hideScreenTakeovers:!1,enableUpdateChecks:!0,updateCheckFrequency:10,showUpdateNotice:!1,hideScanLines:!1,hideTimestamps:!0,hideAvatars:!1,hideClans:!1,hideLevels:!1,hideEndorsements:!1,hideConsumables:!1,hideEmotes:!1,hideDiceRolling:!1,hideClanMessages:!1,hideTTSMessages:!1,hideSFXMessages:!1,hideSystem:!1,enableImprovedTagging:!0,enableDenseChat:!1,enableRecentChatters:!0,recentChattersThreshold:10,normalizeEpicText:!1,normalizeGrandText:!1,autoClanChat:!1,enableEmotesMenu:!0,pinnedEmotes:[],enableChatMenu:!0,fixDarkDisplayNames:!1,enableMentionLog:!0,reverseMentionLog:!1,agreementVersion:null,bindsEnable:!1,bindsForceCtrl:!1,binds:{},friends:[],watching:[]},s={name:"MAEJOK-TOOLS-RENEWED",storageKey:"maejok-tools-v2r"},a=()=>{const e=JSON.parse(localStorage.getItem(s.storageKey));if(!e)return o(),t;for(const s in e)t.hasOwnProperty(s)&&(t[s]=e[s]);return t},o=async()=>{const e={};for(const s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);try{localStorage.setItem(s.storageKey,JSON.stringify(e))}catch{console.error("Error while saving localstorage")}finally{return e}};return{plugin:e=>e?s[e]:s,get:e=>e?t[e]:t,set:(e,s)=>{t.hasOwnProperty(e)&&("object"!=typeof s||Array.isArray(s)?t[e]=s:t[e]={...t[e],...s})},load:a,save:o,settingsOptions:()=>{const t=a();return[{name:"main",label:"Main",content:{groups:[{name:"plugin",label:"Plugin Settings"},{name:"site-options",label:"Site-wide Options"}],inputs:[{name:"enablePlugin",label:`Enable ${we().toUpperCase()}`,type:"toggle",value:t.enablePlugin,group:"plugin",help:{label:"?",text:"<p>Disabling this option will completely disable the plugin's features, but it will not remove the plugin from the site.  The settings button will stay in place so you can access this menu to re-enable the plugin.</p>\n                <p>In order to complete disable the plugin, you must disable it from your browser extension. (eg: TamperMonkey, GreaseMonkey)</p>"}},{name:"enableUpdateChecks",label:"Get Notified About Plugin Updates",type:"toggle",value:t.enableUpdateChecks,group:"plugin",help:{label:"?",text:"<p>Enabling this option will allow MAEJOK-TOOLS to alert you when new plugin updates become available.</p>"},config:{title:"Update Check Frequency",options:[{type:"number",valid:"number",label:"Frequency",name:"updateCheckFrequency",help:{label:"?",title:"Plugin Update Check Frequency",text:"<p>How many minutes between checking for new versions?</p>\n                        <p><i>Minimum: 5</i></p>"}}]}},{name:"updateCheckFrequency",type:"hidden",value:t.updateCheckFrequency,group:"plugin"},{name:"enableBigScreen",label:"Enable Big Screen Mode",type:"toggle",value:t.enableBigScreen,group:"site-options",help:{label:"?",text:"<p>Enabling this option creates a keyboard shortcut to toggle <strong>Big Screen Mode</strong> which makes the videos take priority in the layout.</p>\n                <p>Keyboard Shortcut: <strong>CTRL+`</strong> (tilda, above TAB key)</p>\n                <p>or using <strong>CTRL+SHIFT+SPACE BAR</strong>.</p>"}},{name:"persistBigScreen",label:"Persist Big Screen",type:"toggle",value:t.persistBigScreen,group:"site-options",help:{label:"?",text:"<p>Enabling this option will restore the last <strong>Big Screen Mode</strong> state upon refreshing the site.</p>"}},{name:"enableDimMode",label:"Enable Dim mode",type:"toggle",value:t.enableDimMode,group:"site-options",help:{label:"?",text:"<p>Enabling this option reduces the brightness of the site</p>"}},{name:"enableEmotesMenu",label:"Enable Emotes Menu",type:"toggle",value:t.enableEmotesMenu,group:"site-options",help:{label:"?",text:"<p>Enabling this option creates a menu option to open with an option to view all chat emote commands by right-clicking in the chat input box.</p>\n                <p>Right-clicking again without moving the mouse will give you access to your browser's regular context menu.</p>"}},{name:"enableChatMenu",label:"Enable Chat Menu",type:"toggle",value:t.enableChatMenu,group:"site-options",help:{label:"?",text:"<p>Enabling this option creates a menu option quickly access user actions by right-clicking a user in chat.</p>\n                <p>Right-clicking a mention will give options related to the mentioned user.</p>\n                <p><i>Note: Right-clicking again without moving the mouse will give you access to your browser's regular context menu.</i></p>"}},{name:"disableSoundEffects",label:"Disable Sound Effects",type:"toggle",value:t.disableSoundEffects,group:"site-options",help:{label:"?",text:"<p>Enabling this option will disable sound effects.  This includes mentions, global missions, episode hover static, etc.</p>"}},{name:"hideGlobalMissions",label:"Hide Global Mission Popups",type:"toggle",value:t.hideGlobalMissions,group:"site-options",help:{label:"?",text:"<p>Enabling this option will prevent the <strong>Global Missions</strong> pop up from showing, however, you will still hear the sound effect.</p>"}},{name:"hideScreenTakeovers",label:"Hide Screen Takeovers",type:"toggle",value:t.hideScreenTakeovers,group:"site-options",help:{label:"?",text:"<p>Enabling this option will prevent the <strong>Screen Takeovers</strong> (Cigarette Deliveries, Loot Crates, etc.) from showing, however, you will still hear the sound effect.</p>"}},{name:"hideScanLines",label:"Hide Scan Lines Effect",type:"toggle",value:t.hideScanLines,group:"site-options",help:{label:"?",text:"<p>Enabling this option hide the <strong>Scan Line Effect</strong> seen across the site.</p>"}}]}},{name:"chat",label:"Chat",content:{groups:[{name:"hiders",label:"Hiders"},{name:"chat-misc",label:"Miscellaneous"}],inputs:[{name:"hideTimestamps",label:"Hide Timestamps",type:"toggle",value:t.hideTimestamps,group:"hiders"},{name:"hideAvatars",label:"Hide Avatars",type:"toggle",value:t.hideAvatars,group:"hiders"},{name:"hideClans",label:"Hide Clans",type:"toggle",value:t.hideClans,group:"hiders"},{name:"hideLevels",label:"Hide Levels",type:"toggle",value:t.hideLevels,group:"hiders"},{name:"hideEndorsements",label:"Hide Endorsements",type:"toggle",value:t.hideEndorsements,group:"hiders"},{name:"hideEmotes",label:"Hide Emotes",type:"toggle",value:t.hideEmotes,group:"hiders",help:{label:"?",text:"<p>Enabling this option hides <strong>Emotes</strong> in chat.</p>"}},{name:"hideDiceRolling",label:"Hide Dice Rolling",type:"toggle",value:t.hideDiceRolling,group:"hiders",help:{label:"?",text:"<p>Enabling this option will hide <strong>Dice Rolling</strong> in chat.</p>"}},{name:"hideConsumables",label:"Hide Consumable Messages",type:"toggle",value:t.hideConsumables,group:"hiders",help:{label:"?",text:"<p>Enabling this option will hide the <strong>Consume Messages</strong> created by users using inventory items.</p>"}},{name:"hideClanMessages",label:"Hide Clan Messages",type:"toggle",value:t.hideClanMessages,group:"hiders",help:{label:"?",text:"<p>Enabling this option hides <strong>Clan Messages</strong> created by a clan being created or clan alliances being proposed/formed, etc.</p>"}},{name:"hideTTSMessages",label:"Hide TTS Messages",type:"toggle",value:t.hideTTSMessages,group:"hiders",help:{label:"?",text:"<p>Enabling this option hides <strong>TTS Messages</strong> from chat.</p>"}},{name:"hideSFXMessages",label:"Hide SFX Messages",type:"toggle",value:t.hideSFXMessages,group:"hiders",help:{label:"?",text:"<p>Enabling this option hides <strong>SFX Messages</strong> from chat.</p>"}},{name:"hideSystem",label:"Hide System Messages",type:"toggle",value:t.hideSystem,group:"hiders",help:{label:"?",text:'<p>Enabling this option hides <strong>System Messages</strong>.</p>\n                <p>These are the green messages.  eg: "Joined Global".</p>'}},{name:"enableDenseChat",label:"Enable Dense Chat",type:"toggle",value:t.enableDenseChat,group:"chat-misc",help:{label:"?",text:"<p>Enabling this option makes the gap between chat messages smaller.</p>"}},{name:"enableRecentChatters",label:"Enable Recent Chatters Count",type:"toggle",value:t.enableRecentChatters,group:"chat-misc",help:{label:"?",title:"Recent Chatters",text:"<p>Enabling this option creates an <strong>Active User Counter</strong> and <strong>List</strong>.</p>\n                <p>Click the <strong>Chatter</strong> count to view users sorted by most recently seen.</p>\n                <p><i>Note: Fish and Staff are always listed first.</i></p>"},config:{title:"Recent Chatters Options",options:[{type:"number",valid:"number",label:"Threshold",name:"recentChattersThreshold",help:{label:"?",title:"Recent Chatters Threshold",text:"How long since a user's last message before considering them no longer active and removing them from the chatters list.<br>Note: Setting this to 0 will store ALL users until you refresh."}}]}},{name:"recentChattersThreshold",type:"hidden",value:t.recentChattersThreshold,group:"chat-misc"},{name:"autoClanChat",label:"Enter Clan Chat Automatically",type:"toggle",value:t.autoClanChat,group:"chat-misc",help:{label:"?",text:"<p>Enabling this option will put you into your clan chat immediately upon loading the site.</p>"}},{name:"enableImprovedTagging",label:"Improve mention functionality",type:"toggle",value:t.enableImprovedTagging,group:"chat-misc",help:{label:"?",text:"<p>Enabling this option will add <strong>Avatar-click Tagging</strong>, as well as improve the way mentions are added to the input box by adding spaces before and after the mention where needed.</p>"}},{name:"normalizeEpicText",label:"Normalize Epic Text",type:"toggle",value:t.normalizeEpicText,group:"chat-misc",help:{label:"?",text:'<p>Enabling this option makes <strong>Gold "Epic" Messages</strong> look like all the other messages in chat.<p>'}},{name:"normalizeGrandText",label:"Normalize Grand Text",type:"toggle",value:t.normalizeGrandText,group:"chat-misc",help:{label:"?",text:'<p>Enabling this option makes <strong>Red "Grand" Messages</strong> look like all the other messages in chat.<p>'}},{name:"fixDarkDisplayNames",label:"Fix Dark Display Names",type:"toggle",value:t.fixDarkDisplayNames,group:"chat-misc",help:{label:"?",text:"<p>Enabling this option makes Dark Display Names a little brighter and easier to read.<p>"}}]}},{name:"highlighting",label:"Highlighting",content:{groups:[{name:"friends",label:"Friends"},{name:"watching",label:"Watched Users"}],inputs:[{name:"friendsColor",label:"Friends Color",type:"color-picker",value:t.friendsColor,group:"friends",help:{label:"?",text:"timestamp help text"}},{name:"watchingColor",label:"Watching Color",type:"color-picker",value:t.watchingColor,group:"watching",help:{label:"?",text:"timestamp help text"}}]}},{name:"mentionLog",label:"Mentions",content:{groups:[{name:"mentions",label:"Mentions Log"}],inputs:[{name:"enableMentionLog",label:"Enable Mention Logging",type:"toggle",value:t.enableMentionLog,group:"mentions",help:{label:"?",text:"<p>Enabling this option will temporarily store all messages you were mentioned in.</p>\n                <p>This log WILL clear every time you refresh or close the page.</p>"}},{name:"reverseMentionLog",label:"Show Newest First",type:"toggle",value:t.reverseMentionLog,group:"mentions",help:{label:"?",text:"<p>Enabling this option set the mentions log to list in order of newest to oldest.</p><p>After toggling this option, you must close and reopen the settings window to see the changes.</p>"}},{name:"mentionsLog",label:"Mentions Log",type:"mentions-log",value:e.get("mentions"),group:"mentions"}]}},{name:"keyBinds",label:"Keybinds",content:{groups:[{name:"bindoptions",label:"Bind Options"},{name:"roombinds",label:"Key Binds"}],inputs:[{name:"bindsEnable",label:"Enable Key Binds",type:"toggle",value:t.bindsEnable,group:"bindoptions",help:{label:"?",text:"<p>Enabling this option will allow binds to be used.</p>"}},{name:"bindsForceCtrl",label:"Force Ctrl Requirement",type:"toggle",value:t.bindsForceCtrl,group:"bindoptions",help:{label:"?",text:"<p>If enabled, all keybinds will require the CTRL key to be held.</p>"}},{name:"bindsReset",label:"Restore Default Binds",type:"button",group:"bindoptions",onclick:G,color:"red",help:{label:"?",text:"<p>Resets all keybinds to their default values.</p>"}},{name:"toggleAuto",label:"Toggle Auto Mode",type:"keybind",value:"toggle-auto",group:"roombinds"},{name:"toggleHQ",label:"Toggle HQ Mode",type:"keybind",value:"toggle-hq",group:"roombinds"},{name:"enterFullscreen",label:"Enter Native Fullscreen",type:"keybind",value:"enter-native-fs",group:"roombinds"},{name:"closeStream",label:"Return to Room Grid",type:"keybind",value:"close-stream",group:"roombinds"},{name:"switchBedroom1",label:"Bedroom 1",type:"keybind",value:"bedroom-1",group:"roombinds"},{name:"switchBedroom2",label:"Bedroom 2",type:"keybind",value:"bedroom-2",group:"roombinds"},{name:"switchBedroom3",label:"Bedroom 3",type:"keybind",value:"bedroom-3",group:"roombinds"},{name:"switchBunk",label:"The Bunk",type:"keybind",value:"the-bunk",group:"roombinds"},{name:"switchHallwayUpstairs",label:"Hallway - Upstairs",type:"keybind",value:"hallway-upstairs",group:"roombinds"},{name:"switchHallwayDownstairs",label:"Hallway - Downstairs",type:"keybind",value:"hallway-downstairs",group:"roombinds"},{name:"switchLivingRoom",label:"Living Room",type:"keybind",value:"living-room",group:"roombinds"},{name:"switchLounge",label:"Lounge",type:"keybind",value:"lounge",group:"roombinds"},{name:"switchBar",label:"Bar",type:"keybind",value:"bar",group:"roombinds"},{name:"switchKitchen",label:"Kitchen",type:"keybind",value:"kitchen",group:"roombinds"},{name:"switchDogHouse",label:"Dog House",type:"keybind",value:"dog-house",group:"roombinds"},{name:"switchAttic",label:"Attic",type:"keybind",value:"attic",group:"roombinds"},{name:"switchBathroomUpstairs",label:"Bathroom - Upstairs",type:"keybind",value:"upstairs-bathroom",group:"roombinds"},{name:"switchBathroomDownstairs",label:"Bathroom - Downstairs",type:"keybind",value:"downstairs-bathroom",group:"roombinds"},{name:"switchBathroomMaster",label:"Bathroom - Master",type:"keybind",value:"master-bathroom",group:"roombinds"},{name:"switchConfessional",label:"Confessional",type:"keybind",value:"confessional",group:"roombinds"}]}},{name:"about",label:"About",content:{groups:[{name:"about",label:"About This Plugin"}]}}]}}})();var Ie=s(72),Oe=s.n(Ie),He=s(825),Be=s.n(He),De=s(659),Pe=s.n(De),Fe=s(56),Re=s.n(Fe),Ue=s(540),ze=s.n(Ue),Je=s(113),Ge=s.n(Je),Xe=s(911),Ve={};Ve.styleTagTransform=Ge(),Ve.setAttributes=Re(),Ve.insert=Pe().bind(null,"head"),Ve.domAPI=Be(),Ve.insertStyleElement=ze();Oe()(Xe.A,Ve);Xe.A&&Xe.A.locals&&Xe.A.locals;!async function(){qe.load();if(!(qe.get("agreementVersion")===t||("i agree"===prompt('\nMAEJOK-TOOLS AGREEMENT:\n\nBy using MAEJOK-TOOLS you understand that this plugin is NOT endorsed nor promoted by Fishtank.live or its creators, may cause issues with the Fishtank.live webiste and alters the intended user experience for Fishtank.live; therefore, any bugs or issues created by use of this plugin does not the concern of Fishtank.live or its creators.\n\nIf you have any issues with the Fishtank.live website while using this plugin, you agree to FULLY disable this plugin from within your userscript plugin manager before making any bug reports to Fishtank.live staff.\n\nAny questions or bug reports in regards to MAEJOK-TOOLS are to be directed at @maejok only.\n\nIf you understand and agree, type "I agree" below to continue.').toLowerCase()?(Ee(),qe.set("showUpdateNotice",!0),qe.set("agreementVersion",t),qe.save(),setTimeout((()=>{window.location.reload()}),500),!1):(alert("You did not accept the MAEJOK-TOOLS usage agreement\nMAEJOK-TOOLS will not be started.\nDisable or remove MAEJOK-TOOLS from your userscript plugin (GreaseMonkey, Tampermonkey, etc) to disable this alert."),!1))))return;const s=qe.get("enableDimMode")&&qe.get("enablePlugin");ae(s),te(qe.get("hideScanLines")&&qe.get("enablePlugin"));const a=window.location.href,n=qe.get("userData");n&&e.set("user",n);let l,r,c,d,p=!1,h=null,u=!1,g=!1;qe.get("hideGlobalMissions")&&(b.body.start(),b.modal.start());const y=setInterval((async()=>{if(a.includes("/chat")?(l=document.querySelector(i.chat.list.selector),p=null!==l,g=!0,e.set("isPopoutChat",!0)):(l=document.querySelector(i.chat.list.selector),c=document.querySelector(i.livestreams.grid.selector),d=document.querySelector(i.header.director.selector),p=null!==d&&null!==l&&null!==c||null===d&&null!==l,h=null!==d),l&&!r&&(r=!0,m()),!p)return;const t=document.querySelector(i.header.user.name.selector);if(!t&&!g)return;const s=t?.getAttribute("data-user-id")||!1;if(!s&&!g)return;if(e.get("user")||u||g){if(clearInterval(y),c&&c.querySelectorAll("button").forEach((e=>{var t;e.id&&o.hasOwnProperty(e.id)&&(o[e.id].switchTo=(t=e,t?t[Object.getOwnPropertyNames(t).filter((e=>e.startsWith("__reactProps")))]:null).onClick)})),e.set("loaded",!0),(()=>{const e=document.querySelector(i.chat.input.actions.selector),t=document.querySelector(i.chat.input.actions.inputLength.selector),s=i.settings,a=document.createElement("button");a.type="button",a.classList.add(s.opener.button.class),e.insertBefore(a,t);const o=document.createElement("div");o.classList.add(...s.opener.button.icon.class),o.innerHTML='<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 512.000000 512.000000" preserveAspectRatio="xMidYMid meet"><g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none"><path d="M2257 5065 c-568 -69 -1104 -335 -1502 -747 -183 -189 -314 -369 -429 -589 -194 -371 -286 -748 -286 -1169 0 -411 85 -770 270 -1135 129 -256 261 -437 469 -646 209 -208 390 -340 646 -469 363 -184 725 -270 1135 -270 875 0 1666 439 2144 1190 179 282 320 685 361 1036 57 491 -31 987 -255 1429 -121 240 -253 426 -445 624 -402 416 -935 679 -1513 746 -153 18 -445 18 -595 0z m623 -400 c433 -67 831 -264 1144 -565 352 -339 571 -758 641 -1225 83 -563 -60 -1130 -404 -1593 -83 -112 -311 -340 -423 -423 -520 -387 -1171 -519 -1792 -364 -583 145 -1091 545 -1370 1077 -110 210 -185 439 -223 679 -24 157 -24 461 0 618 82 527 340 984 750 1327 319 268 722 438 1147 484 117 12 403 4 530 -15z"></path><path d="M1655 3526 c-86 -27 -160 -84 -210 -160 -131 -200 -55 -466 164 -573 50 -25 67 -28 161 -28 93 0 112 3 162 27 324 151 300 618  -36 731 -59 20 -183 21 -241 3z"></path><path d="M3240 3531 c-100 -33 -199 -117 -243 -206 -98 -197 -11 -438 191 -533 50 -24 69 -27 162 -27 94 0 111 3 161 28 87 42 143 98 185 183 100 202 18 439 -185 532 -46 21 -73 27 -151 29 -52 1 -106 -1 -120 -6z"></path><path d="M1455 2220 c-54 -109 -97 -201 -95 -203 3 -3 140 -70 304 -151 165 -80 297 -148 295 -150 -2 -3 -146 -52 -319 -111 -173 -58 -316 -108 -318 -110 -7 -7 133 -417 143 -421 6 -3 250 76 544 174 l534 179 504 -249 c277 -136 507 -248 511 -248 9 0 208 398 202 403 -3 2 -138 70 -300 151 -162 81 -296 149 -298 151 -2 2 141 51 316 109 l320 107 -70 212 c-39 117 -72 214 -74 215 -1 2 -244 -77 -538 -177 l-536 -181 -507 250 c-278 138 -509 250 -512 250 -4 0 -51 -90 -106 -200z"></path></g></svg>',a.appendChild(o),a.addEventListener("click",K),qe.get("autoOpenSettings")})(),!qe.get("enablePlugin"))return void console.warn(`${qe.plugin("name")} disabled in settings panel`);Le()}else{let t;u=!0;try{t=await(async e=>{try{await Se("get",`https://www.fishtank.live/api/user/get?uid=${e}`)}catch(e){return!1}return data})(s)}catch(e){return void clearInterval(y)}const a=t?.profile||!1;a&&(e.set("user",a),qe.set("userData",a),qe.save())}}),250)}()})()})();