diff --git a/code/__DEFINES/controllers/_subsystems.dm b/code/__DEFINES/controllers/_subsystems.dm index 45fa63f0c9e..78c86155565 100644 --- a/code/__DEFINES/controllers/_subsystems.dm +++ b/code/__DEFINES/controllers/_subsystems.dm @@ -88,7 +88,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_AI -22 #define INIT_ORDER_OPENSPACE -50 #define INIT_ORDER_PERSISTENCE -95 - +#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) @@ -109,7 +109,9 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define FIRE_PRIORITY_PLANETS 75 #define FIRE_PRIORITY_INSTRUMENTS 90 #define FIRE_PRIORITY_MACHINES 100 +#define FIRE_PRIORITY_TGUI 110 #define FIRE_PRIORITY_PROJECTILES 150 +#define FIRE_PRIORITY_CHAT 400 #define FIRE_PRIORITY_OVERLAYS 500 #define FIRE_PRIORITY_INPUT 1000 //never drop input diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 3bd508a20eb..38760ef6735 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -397,11 +397,16 @@ GLOBAL_LIST_EMPTY(##LIST_NAME);\ #define PR_ANNOUNCEMENTS_PER_ROUND 5 + //https://secure.byond.com/docs/ref/info.html#/atom/var/mouse_opacity #define MOUSE_OPACITY_TRANSPARENT 0 #define MOUSE_OPACITY_ICON 1 #define MOUSE_OPACITY_OPAQUE 2 +//world/proc/shelleo +#define SHELLEO_ERRORLEVEL 1 +#define SHELLEO_STDOUT 2 +#define SHELLEO_STDERR 3 // Embed chance unset for embed_chance var on /obj/item. #define EMBED_CHANCE_UNSET -1337 diff --git a/code/__DEFINES/tgui.dm b/code/__DEFINES/tgui.dm new file mode 100644 index 00000000000..f594b735b6b --- /dev/null +++ b/code/__DEFINES/tgui.dm @@ -0,0 +1,35 @@ +/// Green eye; fully interactive +#define UI_INTERACTIVE 2 +/// Orange eye; updates but is not interactive +#define UI_UPDATE 1 +/// Red eye; disabled, does not update +#define UI_DISABLED 0 +/// UI Should close +#define UI_CLOSE -1 + +/// Maximum number of windows that can be suspended/reused +#define TGUI_WINDOW_SOFT_LIMIT 5 +/// Maximum number of open windows +#define TGUI_WINDOW_HARD_LIMIT 9 + +/// Maximum ping timeout allowed to detect zombie windows +#define TGUI_PING_TIMEOUT 4 SECONDS + +/// Window does not exist +#define TGUI_WINDOW_CLOSED 0 +/// Window was just opened, but is still not ready to be sent data +#define TGUI_WINDOW_LOADING 1 +/// Window is free and ready to receive data +#define TGUI_WINDOW_READY 2 + +/// Get a window id based on the provided pool index +#define TGUI_WINDOW_ID(index) "tgui-window-[index]" +/// Get a pool index of the provided window id +#define TGUI_WINDOW_INDEX(window_id) text2num(copytext(window_id, 13)) + +/// Creates a message packet for sending via output() +#define TGUI_CREATE_MESSAGE(type, payload) ( \ + url_encode(json_encode(list( \ + "type" = type, \ + "payload" = payload, \ + )))) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index f3fe3d8e6f0..bb75324b35e 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -4,8 +4,15 @@ #define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound) #define SEND_TEXT(target, text) DIRECT_OUTPUT(target, text) #define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text) -#define WRITE_LOG(log, text) rustg_log_write(log, text) - +#ifdef EXTOOLS_LOGGING +// proc hooked, so we can just put in standard TRUE and FALSE +#define WRITE_LOG(log, text) extools_log_write(log,text,TRUE) +//#define WRITE_LOG_NO_FORMAT(log, text) extools_log_write(log,text,FALSE) +#else +//This is an external call, "true" and "false" are how rust parses out booleans +#define WRITE_LOG(log, text) rustg_log_write(log, text) //, "true" +//#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false") +#endif //print a warning message to world.log #define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].") /proc/warning(msg) @@ -45,7 +52,10 @@ /proc/log_adminsay(text, mob/speaker) if (config_legacy.log_adminchat) - WRITE_LOG(GLOB.world_game_log, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]") + if(speaker) + WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: ASAY: [speaker.simple_info_line()]: [text]") + else + WRITE_LOG(GLOB.world_game_log, "ADMINPRIVATE: ASAY: [text]") /proc/log_modsay(text, mob/speaker) if (config_legacy.log_adminchat) @@ -177,22 +187,45 @@ /proc/start_log(log) WRITE_LOG(log, "Starting up round ID [GLOB.round_id].\n-------------------------") +/** + * Appends a tgui-related log entry. All arguments are optional. + */ +/proc/log_tgui(user, message, context, + datum/tgui_window/window, + datum/src_object) + var/entry = "" + // Insert user info + if(!user) + entry += "" + else if(istype(user, /mob)) + var/mob/mob = user + entry += "[mob.ckey] (as [mob] at [mob.x],[mob.y],[mob.z])" + else if(istype(user, /client)) + var/client/client = user + entry += "[client.ckey]" + // Insert context + if(context) + entry += " in [context]" + else if(window) + entry += " in [window.id]" + // Resolve src_object + if(!src_object && window && window.locked_by) + src_object = window.locked_by.src_object + // Insert src_object info + if(src_object) + entry += "\nUsing: [src_object.type] [REF(src_object)]" + // Insert message + if(message) + entry += "\n[message]" + WRITE_LOG(GLOB.tgui_log, entry) + /* Close open log handles. This should be called as late as possible, and no logging should hapen after. */ /proc/shutdown_logging() +#ifdef EXTOOLS_LOGGING + extools_finalize_logging() +#else rustg_log_close_all() - -/proc/loc_name(atom/A) - if(!istype(A)) - return "(INVALID LOCATION)" - - var/turf/T = A - if (!istype(T)) - T = get_turf(A) - - if(istype(T)) - return "([AREACOORD(T)])" - else if(A.loc) - return "(UNKNOWN (?, ?, ?))" +#endif /* Helper procs for building detailed log lines */ /proc/key_name(whom, include_link = null, include_name = TRUE, highlight_special_characters = TRUE) @@ -286,7 +319,18 @@ /proc/key_name_admin(whom, include_name = TRUE) return key_name(whom, TRUE, include_name) +/proc/loc_name(atom/A) + if(!istype(A)) + return "(INVALID LOCATION)" + var/turf/T = A + if (!istype(T)) + T = get_turf(A) + + if(istype(T)) + return "([AREACOORD(T)])" + else if(A.loc) + return "(UNKNOWN (?, ?, ?))" /// VSTATION SPECIFIC LOGGING. /// /proc/log_debug(text) diff --git a/code/__HELPERS/shell.dm b/code/__HELPERS/shell.dm new file mode 100644 index 00000000000..3438f38b85c --- /dev/null +++ b/code/__HELPERS/shell.dm @@ -0,0 +1,57 @@ +//Runs the command in the system's shell, returns a list of (error code, stdout, stderr) + +#define SHELLEO_NAME "data/shelleo." +#define SHELLEO_ERR ".err" +#define SHELLEO_OUT ".out" +/world/proc/shelleo(command) + var/static/list/shelleo_ids = list() + var/stdout = "" + var/stderr = "" + var/errorcode = 1 + var/shelleo_id + var/out_file = "" + var/err_file = "" + var/static/list/interpreters = list("[MS_WINDOWS]" = "cmd /c", "[UNIX]" = "sh -c") + var/interpreter = interpreters["[world.system_type]"] + if(interpreter) + for(var/seo_id in shelleo_ids) + if(!shelleo_ids[seo_id]) + shelleo_ids[seo_id] = TRUE + shelleo_id = "[seo_id]" + break + if(!shelleo_id) + shelleo_id = "[shelleo_ids.len + 1]" + shelleo_ids += shelleo_id + shelleo_ids[shelleo_id] = TRUE + out_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_OUT]" + err_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_ERR]" + errorcode = shell("[interpreter] \"[command]\" > [out_file] 2> [err_file]") + if(fexists(out_file)) + stdout = file2text(out_file) + fdel(out_file) + if(fexists(err_file)) + stderr = file2text(err_file) + fdel(err_file) + shelleo_ids[shelleo_id] = FALSE + else + CRASH("Operating System: [world.system_type] not supported") // If you encounter this error, you are encouraged to update this proc with support for the new operating system + . = list(errorcode, stdout, stderr) +#undef SHELLEO_NAME +#undef SHELLEO_ERR +#undef SHELLEO_OUT + +/proc/shell_url_scrub(url) + var/static/regex/bad_chars_regex = regex("\[^#%&./:=?\\w]*", "g") + var/scrubbed_url = "" + var/bad_match = "" + var/last_good = 1 + var/bad_chars = 1 + do + bad_chars = bad_chars_regex.Find(url) + scrubbed_url += copytext(url, last_good, bad_chars) + if(bad_chars) + bad_match = url_encode(bad_chars_regex.match) + scrubbed_url += bad_match + last_good = bad_chars + length(bad_chars_regex.match) + while(bad_chars) + . = scrubbed_url diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 5c4f3d6e65a..096954a6903 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -30,7 +30,8 @@ GLOBAL_PROTECT(world_map_error_log) /// datum/controller/subsystem logging in general GLOBAL_VAR(subsystem_log) GLOBAL_PROTECT(subsystem_log) - +GLOBAL_VAR(tgui_log) +GLOBAL_PROTECT(tgui_log) /////Picture logging GLOBAL_VAR(picture_log_directory) GLOBAL_PROTECT(picture_log_directory) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index af44896436d..d2af2d6cd34 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -201,7 +201,7 @@ /datum/controller/configuration/proc/Get(entry_type) var/datum/config_entry/E = GetEntryDatum(entry_type) - if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]") + if(E && (E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]") log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]") return return E.config_entry_value diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 4aa082960d7..8a7f6ea4242 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -5,6 +5,9 @@ config_entry_value = 7 min_val = 1 +/datum/config_entry/string/invoke_youtubedl + protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN + /datum/config_entry/number/client_warn_version config_entry_value = null min_val = 500 @@ -27,4 +30,4 @@ /datum/config_entry/number/client_error_build config_entry_value = null - min_val = 0 \ No newline at end of file + min_val = 0 diff --git a/code/controllers/subsystems/chat.dm b/code/controllers/subsystems/chat.dm new file mode 100644 index 00000000000..f2e9da704f4 --- /dev/null +++ b/code/controllers/subsystems/chat.dm @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +SUBSYSTEM_DEF(chat) + name = "Chat" + flags = SS_TICKER + wait = 1 + priority = FIRE_PRIORITY_CHAT + init_order = INIT_ORDER_CHAT + + var/list/payload_by_client = list() + +/datum/controller/subsystem/chat/fire() + for(var/key in payload_by_client) + var/client/client = key + var/payload = payload_by_client[key] + payload_by_client -= key + if(client) + // Send to tgchat + client.tgui_panel?.window.send_message("chat/message", payload) + // Send to old chat + for(var/message in payload) + SEND_TEXT(client, message_to_html(message)) + if(MC_TICK_CHECK) + return + +/datum/controller/subsystem/chat/proc/queue(target, message) + if(islist(target)) + for(var/_target in target) + var/client/client = CLIENT_FROM_VAR(_target) + if(client) + LAZYADD(payload_by_client[client], list(message)) + return + var/client/client = CLIENT_FROM_VAR(target) + if(client) + LAZYADD(payload_by_client[client], list(message)) diff --git a/code/controllers/subsystems/nanoui.dm b/code/controllers/subsystems/nanoui.dm index 6cc7625ad99..d2d4f3d4409 100644 --- a/code/controllers/subsystems/nanoui.dm +++ b/code/controllers/subsystems/nanoui.dm @@ -1,22 +1,30 @@ SUBSYSTEM_DEF(nanoui) name = "NanoUI" wait = 7 + + /// A list of UIs scheduled to process + var/list/current_run = list() // a list of current open /nanoui UIs, grouped by src_object and ui_key var/list/open_uis = list() // a list of current open /nanoui UIs, not grouped, for use in processing var/list/processing_uis = list() -/datum/controller/subsystem/nanoui/Recover() - if(SSnanoui.open_uis) - open_uis |= SSnanoui.open_uis - if(SSnanoui.processing_uis) - processing_uis |= SSnanoui.processing_uis - /datum/controller/subsystem/nanoui/stat_entry() - return ..("[processing_uis.len] UIs") - -/datum/controller/subsystem/nanoui/fire(resumed) - for(var/thing in processing_uis) - var/datum/nanoui/UI = thing - UI.process() + return ..("P:[length(open_uis)]") +// Stolen from tgui. It's much faster! +/datum/controller/subsystem/nanoui/fire(resumed = FALSE) + if(!resumed) + src.current_run = open_uis.Copy() + // Cache for sanic speed (lists are references anyways) + var/list/current_run = src.current_run + while(current_run.len) + var/datum/nanoui/ui = current_run[current_run.len] + current_run.len-- + // TODO: Move user/src_object check to process() + if(ui && ui.user && ui.src_object) + ui.process() + else + open_uis.Remove(ui) + if(MC_TICK_CHECK) + return diff --git a/code/controllers/subsystems/ping.dm b/code/controllers/subsystems/ping.dm deleted file mode 100644 index 75ecf30957c..00000000000 --- a/code/controllers/subsystems/ping.dm +++ /dev/null @@ -1,32 +0,0 @@ -SUBSYSTEM_DEF(ping) - name = "Ping" - priority = FIRE_PRIORITY_PING - wait = 3 SECONDS - flags = SS_NO_INIT - runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME - - var/list/currentrun = list() - -/datum/controller/subsystem/ping/stat_entry() - ..("P:[GLOB.clients.len]") - -/datum/controller/subsystem/ping/fire(resumed = 0) - if (!resumed) - src.currentrun = GLOB.clients.Copy() - - //cache for sanic speed (lists are references anyways) - var/list/currentrun = src.currentrun - - while (currentrun.len) - var/client/C = currentrun[currentrun.len] - currentrun.len-- - - if (!C || !C.chatOutput || !C.chatOutput.loaded) - if (MC_TICK_CHECK) - return - continue - - // softPang isn't handled anywhere but it'll always reset the opts.lastPang. - C.chatOutput.ehjax_send(data = C.is_afk(29) ? "softPang" : "pang") - if (MC_TICK_CHECK) - return diff --git a/code/controllers/subsystems/tgui.dm b/code/controllers/subsystems/tgui.dm new file mode 100644 index 00000000000..9ac42c9fb44 --- /dev/null +++ b/code/controllers/subsystems/tgui.dm @@ -0,0 +1,357 @@ +/** + * tgui subsystem + * + * Contains all tgui state and subsystem code. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +SUBSYSTEM_DEF(tgui) + name = "tgui" + wait = 9 + flags = SS_NO_INIT + priority = FIRE_PRIORITY_TGUI + runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + + /// A list of UIs scheduled to process + var/list/current_run = list() + /// A list of open UIs + var/list/open_uis = list() + /// A list of open UIs, grouped by src_object. + var/list/open_uis_by_src = list() + /// The HTML base used for all UIs. + var/basehtml + +/datum/controller/subsystem/tgui/PreInit() + basehtml = file2text('tgui/public/tgui.html') + +/datum/controller/subsystem/tgui/Shutdown() + close_all_uis() +/* //no tguistat +/datum/controller/subsystem/tgui/stat_entry(msg) + msg = "P:[length(open_uis)]" + return ..() +*/ + +/datum/controller/subsystem/tgui/stat_entry() + return ..("P:[length(open_uis)]") + +/datum/controller/subsystem/tgui/fire(resumed = FALSE) + if(!resumed) + src.current_run = open_uis.Copy() + // Cache for sanic speed (lists are references anyways) + var/list/current_run = src.current_run + while(current_run.len) + var/datum/tgui/ui = current_run[current_run.len] + current_run.len-- + // TODO: Move user/src_object check to process() + if(ui && ui.user && ui.src_object) + ui.process() + else + open_uis.Remove(ui) + if(MC_TICK_CHECK) + return + +/** + * public + * + * Requests a usable tgui window from the pool. + * Returns null if pool was exhausted. + * + * required user mob + * return datum/tgui + */ +/datum/controller/subsystem/tgui/proc/request_pooled_window(mob/user) + if(!user.client) + return null + var/list/windows = user.client.tgui_windows + var/window_id + var/datum/tgui_window/window + var/window_found = FALSE + // Find a usable window + for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT) + window_id = TGUI_WINDOW_ID(i) + window = windows[window_id] + // As we are looping, create missing window datums + if(!window) + window = new(user.client, window_id, pooled = TRUE) + // Skip windows with acquired locks + if(window.locked) + continue + if(window.status == TGUI_WINDOW_READY) + return window + if(window.status == TGUI_WINDOW_CLOSED) + window.status = TGUI_WINDOW_LOADING + window_found = TRUE + break + if(!window_found) + log_tgui(user, "Error: Pool exhausted", + context = "SStgui/request_pooled_window") + return null + return window + +/** + * public + * + * Force closes all tgui windows. + * + * required user mob + */ +/datum/controller/subsystem/tgui/proc/force_close_all_windows(mob/user) + log_tgui(user, context = "SStgui/force_close_all_windows") + if(user.client) + user.client.tgui_windows = list() + for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT) + var/window_id = TGUI_WINDOW_ID(i) + user << browse(null, "window=[window_id]") + +/** + * public + * + * Force closes the tgui window by window_id. + * + * required user mob + * required window_id string + */ +/datum/controller/subsystem/tgui/proc/force_close_window(mob/user, window_id) + log_tgui(user, context = "SStgui/force_close_window") + // Close all tgui datums based on window_id. + for(var/datum/tgui/ui in user.tgui_open_uis) + if(ui.window && ui.window.id == window_id) + ui.close(can_be_suspended = FALSE) + // Unset machine just to be sure. + user.unset_machine() + // Close window directly just to be sure. + user << browse(null, "window=[window_id]") + +/** + * public + * + * Try to find an instance of a UI, and push an update to it. + * + * required user mob The mob who opened/is using the UI. + * required src_object datum The object/datum which owns the UI. + * optional ui datum/tgui The UI to be updated, if it exists. + * optional force_open bool If the UI should be re-opened instead of updated. + * + * return datum/tgui The found UI. + */ +/datum/controller/subsystem/tgui/proc/try_update_ui( + mob/user, + datum/src_object, + datum/tgui/ui) + // Look up a UI if it wasn't passed + if(isnull(ui)) + ui = get_open_ui(user, src_object) + // Couldn't find a UI. + if(isnull(ui)) + return null + ui.process_status() + // UI ended up with the closed status + // or is actively trying to close itself. + // FIXME: Doesn't actually fix the paper bug. + if(ui.status <= UI_CLOSE) + ui.close() + return null + ui.send_update() + return ui + +/** + * public + * + * Get a open UI given a user and src_object. + * + * required user mob The mob who opened/is using the UI. + * required src_object datum The object/datum which owns the UI. + * + * return datum/tgui The found UI. + */ +/datum/controller/subsystem/tgui/proc/get_open_ui(mob/user, datum/src_object) + var/key = "[REF(src_object)]" + // No UIs opened for this src_object + if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list)) + return null + for(var/datum/tgui/ui in open_uis_by_src[key]) + // Make sure we have the right user + if(ui.user == user) + return ui + return null + +/** + * public + * + * Update all UIs attached to src_object. + * + * required src_object datum The object/datum which owns the UIs. + * + * return int The number of UIs updated. + */ +/datum/controller/subsystem/tgui/proc/update_uis(datum/src_object) + var/count = 0 + var/key = "[REF(src_object)]" + // No UIs opened for this src_object + if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list)) + return count + for(var/datum/tgui/ui in open_uis_by_src[key]) + // Check if UI is valid. + if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) + ui.process(force = 1) + count++ + return count + +/** + * public + * + * Close all UIs attached to src_object. + * + * required src_object datum The object/datum which owns the UIs. + * + * return int The number of UIs closed. + */ +/datum/controller/subsystem/tgui/proc/close_uis(datum/src_object) + var/count = 0 + var/key = "[REF(src_object)]" + // No UIs opened for this src_object + if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list)) + return count + for(var/datum/tgui/ui in open_uis_by_src[key]) + // Check if UI is valid. + if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) + ui.close() + count++ + return count + +/** + * public + * + * Close all UIs regardless of their attachment to src_object. + * + * return int The number of UIs closed. + */ +/datum/controller/subsystem/tgui/proc/close_all_uis() + var/count = 0 + for(var/key in open_uis_by_src) + for(var/datum/tgui/ui in open_uis_by_src[key]) + // Check if UI is valid. + if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) + ui.close() + count++ + return count + +/** + * public + * + * Update all UIs belonging to a user. + * + * required user mob The mob who opened/is using the UI. + * optional src_object datum If provided, only update UIs belonging this src_object. + * + * return int The number of UIs updated. + */ +/datum/controller/subsystem/tgui/proc/update_user_uis(mob/user, datum/src_object) + var/count = 0 + if(length(user?.tgui_open_uis) == 0) + return count + for(var/datum/tgui/ui in user.tgui_open_uis) + if(isnull(src_object) || ui.src_object == src_object) + ui.process(force = 1) + count++ + return count + +/** + * public + * + * Close all UIs belonging to a user. + * + * required user mob The mob who opened/is using the UI. + * optional src_object datum If provided, only close UIs belonging this src_object. + * + * return int The number of UIs closed. + */ +/datum/controller/subsystem/tgui/proc/close_user_uis(mob/user, datum/src_object) + var/count = 0 + if(length(user?.tgui_open_uis) == 0) + return count + for(var/datum/tgui/ui in user.tgui_open_uis) + if(isnull(src_object) || ui.src_object == src_object) + ui.close() + count++ + return count + +/** + * private + * + * Add a UI to the list of open UIs. + * + * required ui datum/tgui The UI to be added. + */ +/datum/controller/subsystem/tgui/proc/on_open(datum/tgui/ui) + var/key = "[REF(ui.src_object)]" + if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list)) + open_uis_by_src[key] = list() + ui.user.tgui_open_uis |= ui + var/list/uis = open_uis_by_src[key] + uis |= ui + open_uis |= ui + +/** + * private + * + * Remove a UI from the list of open UIs. + * + * required ui datum/tgui The UI to be removed. + * + * return bool If the UI was removed or not. + */ +/datum/controller/subsystem/tgui/proc/on_close(datum/tgui/ui) + var/key = "[REF(ui.src_object)]" + if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list)) + return FALSE + // Remove it from the list of processing UIs. + open_uis.Remove(ui) + // If the user exists, remove it from them too. + if(ui.user) + ui.user.tgui_open_uis.Remove(ui) + var/list/uis = open_uis_by_src[key] + uis.Remove(ui) + if(length(uis) == 0) + open_uis_by_src.Remove(key) + return TRUE + +/** + * private + * + * Handle client logout, by closing all their UIs. + * + * required user mob The mob which logged out. + * + * return int The number of UIs closed. + */ +/datum/controller/subsystem/tgui/proc/on_logout(mob/user) + close_user_uis(user) + +/** + * private + * + * Handle clients switching mobs, by transferring their UIs. + * + * required user source The client's original mob. + * required user target The client's new mob. + * + * return bool If the UIs were transferred. + */ +/datum/controller/subsystem/tgui/proc/on_transfer(mob/source, mob/target) + // The old mob had no open UIs. + if(length(source?.tgui_open_uis) == 0) + return FALSE + if(isnull(target.tgui_open_uis) || !istype(target.tgui_open_uis, /list)) + target.tgui_open_uis = list() + // Transfer all the UIs. + for(var/datum/tgui/ui in source.tgui_open_uis) + // Inform the UIs of their new owner. + ui.user = target + target.tgui_open_uis.Add(ui) + // Clear the old list. + source.tgui_open_uis.Cut() + return TRUE diff --git a/code/game/world.dm b/code/game/world.dm index d024e01fdc2..ea5d467dda2 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -15,19 +15,22 @@ GLOBAL_VAR_INIT(tgs_initialized, FALSE) GLOBAL_VAR(topic_status_lastcache) GLOBAL_LIST(topic_status_cache) +//This happens after the Master subsystem new(s) (it's a global datum) +//So subsystems globals exist, but are not initialised /world/New() var/extools = world.GetConfig("env", "EXTOOLS_DLL") || (world.system_type == MS_WINDOWS ? "./byond-extools.dll" : "./libbyond-extools.so") if (fexists(extools)) call(extools, "maptick_initialize")() enable_debugger() - make_datum_reference_lists() - log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!") var/tempfile = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set GLOB.config_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_map_error_log = GLOB.world_attack_log = GLOB.world_game_log = tempfile + make_datum_reference_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) + + GLOB.revdata = new InitTgs() @@ -105,8 +108,6 @@ GLOBAL_LIST(topic_status_cache) if(config_legacy.ToRban) ToRban_autoupdate() -#undef RECOMMENDED_VERSION - return /world/proc/InitTgs() @@ -143,14 +144,20 @@ GLOBAL_LIST(topic_status_cache) GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log" GLOB.world_map_error_log = "[GLOB.log_directory]/map_errors.log" GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log" + GLOB.tgui_log = "[GLOB.log_directory]/tgui.log" GLOB.subsystem_log = "[GLOB.log_directory]/subsystem.log" +#ifdef UNIT_TESTS + GLOB.test_log = file("[GLOB.log_directory]/tests.log") + start_log(GLOB.test_log) +#endif start_log(GLOB.world_game_log) start_log(GLOB.world_attack_log) start_log(GLOB.world_href_log) start_log(GLOB.world_qdel_log) start_log(GLOB.world_map_error_log) start_log(GLOB.world_runtime_log) + start_log(GLOB.tgui_log) start_log(GLOB.subsystem_log) GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently @@ -187,7 +194,7 @@ GLOBAL_LIST(topic_status_cache) break if(!handler || initial(handler.log)) - log_topic("\"[T]\", from:[addr], aster:[master], key:[key]") + log_topic("\"[T]\", from:[addr], master:[master], key:[key]") if(!handler) return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 94835fdf82e..0c7a1e58d6e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -120,7 +120,7 @@ var/list/admin_verbs_sounds = list( /client/proc/play_local_sound, /client/proc/play_sound, /client/proc/play_web_sound, - /client/proc/play_web_sound_manual, + /client/proc/manual_play_web_sound, /client/proc/stop_sounds ) @@ -279,7 +279,7 @@ var/list/admin_verbs_hideable = list( /client/proc/play_local_sound, /client/proc/play_sound, /client/proc/play_web_sound, - /client/proc/play_web_sound_manual, + /client/proc/manual_play_web_sound, /client/proc/stop_sounds, /client/proc/object_talk, /datum/admins/proc/cmd_admin_dress, diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index ad986e287d6..676e94b74be 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -9,14 +9,13 @@ return var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num if(!freq) - return - vol = min(max(vol, 1), 100) + freq = 1 + vol = clamp(vol, 1, 100) var/sound/admin_sound = new() admin_sound.file = S admin_sound.priority = 250 - //admin_sound.channel = CHANNEL_ADMIN - admin_sound.channel = 777 + admin_sound.channel = CHANNEL_ADMIN admin_sound.frequency = freq admin_sound.wait = 1 admin_sound.repeat = 0 @@ -34,8 +33,12 @@ message_admins("[key_name_admin(src)] played sound [S]") for(var/mob/M in player_list) - if(M.is_preference_enabled(/datum/client_preference/play_admin_midis)) - M << admin_sound + if(M.is_preference_enabled(/datum/client_preference/play_admin_midis)) //if(M.client.prefs.toggles & SOUND_MIDI) + admin_sound.volume = vol * M.client.admin_music_volume + SEND_SOUND(M, admin_sound) + admin_sound.volume = vol + + feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/play_local_sound(S as sound) set category = "Fun" @@ -49,11 +52,6 @@ feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/play_web_sound() - set category = "Fun" - to_chat(src, "Due to the fact that the coder who ported this decided to whip this up in less than an hour, this doesn't work. Use the web sound manual verb with a youtube-dl fetched link.") - return - -#ifdef RANDOM_BULLSHIT_DEFINE set category = "Fun" set name = "Play Internet Sound" if(!check_rights(R_SOUNDS)) @@ -61,14 +59,14 @@ var/ytdl = CONFIG_GET(string/invoke_youtubedl) if(!ytdl) - to_chat(src, "Youtube-dl was not configured, action unavailable") //Check config_legacy.txt for the INVOKE_YOUTUBEDL value + to_chat(src, "Youtube-dl was not configured, action unavailable") //Check config.txt for the INVOKE_YOUTUBEDL value return var/web_sound_input = input("Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") as text|null if(istext(web_sound_input)) var/web_sound_url = "" var/stop_web_sounds = FALSE - var/pitch + var/list/music_extra_data = list() if(length(web_sound_input)) web_sound_input = trim(web_sound_input) @@ -96,6 +94,10 @@ var/webpage_url = title if (data["webpage_url"]) webpage_url = "[title]" + music_extra_data["start"] = data["start_time"] + music_extra_data["end"] = data["end_time"] + music_extra_data["link"] = data["webpage_url"] + music_extra_data["title"] = data["title"] var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel") switch(res) @@ -103,8 +105,7 @@ to_chat(world, "An admin played: [webpage_url]") if("Cancel") return - - SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]")) + // SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]")) log_admin("[key_name(src)] played web sound: [web_sound_input]") message_admins("[key_name(src)] played web sound: [web_sound_input]") else @@ -125,51 +126,74 @@ for(var/m in player_list) var/mob/M = m var/client/C = M.client - if((C.prefs.toggles & SOUND_MIDI) && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) + if(M.is_preference_enabled(/datum/client_preference/play_admin_midis)) //if(C.prefs.toggles & SOUND_MIDI) if(!stop_web_sounds) - C.chatOutput.sendMusic(web_sound_url, pitch) + C.tgui_panel?.play_music(web_sound_url, music_extra_data) else - C.chatOutput.stopMusic() + C.tgui_panel?.stop_music() - SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Internet Sound") -#endif + // SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Internet Sound") + feedback_add_details("admin_verb","PIS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/play_web_sound_manual() +/client/proc/manual_play_web_sound() set category = "Fun" set name = "Manual Play Internet Sound" if(!check_rights(R_SOUNDS)) return - var/web_sound_input = input("Enter youtube-dl fetched content URL (supported sites only, leave blank to stop playing)", "Send youtube-dl media link") as text|null - if(!istext(web_sound_input)) - return - web_sound_input = trim(web_sound_input) - if(!length(web_sound_input)) - log_admin("[key_name(src)] stopped web sound") - message_admins("[key_name(src)] stopped web sound") + var/web_sound_input = input("Enter content stream URL (must be a direct link)", "Play Internet Sound via direct URL") as text|null + if(istext(web_sound_input)) + if(!length(web_sound_input)) + log_admin("[key_name(src)] stopped web sound") + message_admins("[key_name(src)] stopped web sound") + var/mob/M + for(var/i in player_list) + M = i + M?.client?.tgui_panel?.stop_music() + return + + var/list/music_extra_data = list() + web_sound_input = trim(web_sound_input) + if(web_sound_input && (findtext(web_sound_input, ":") && !findtext(web_sound_input, is_http_protocol))) + to_chat(src, "Non-http(s) URIs are not allowed.", confidential = TRUE) + return + + var/list/explode = splittext(web_sound_input, "/") //if url=="https://fixthisshit.com/pogchamp.ogg"then title="pogchamp.ogg" + var/title = "[explode[explode.len]]" + + if(!findtext(title, ".mp3") && !findtext(title, ".mp4")) // IE sucks. + to_chat(src, "The format is not .mp3/.mp4, IE 8 and above can only support the .mp3/.mp4 format, the music might not play.", confidential = TRUE) + + if(length(title) > 50) //kev no. + title = "Unknown.mp3" + + music_extra_data["title"] = title + + //SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]")) + log_admin("[key_name(src)] played web sound: [web_sound_input]") + message_admins("[key_name(src)] played web sound: [web_sound_input]") + for(var/m in player_list) var/mob/M = m var/client/C = M.client - if(M.is_preference_enabled(/datum/client_preference/play_admin_midis) && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) - C.chatOutput.stopMusic() - return - var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num - if(!freq) - return - if(web_sound_input && !findtext(web_sound_input, is_http_protocol)) - to_chat(src, "BLOCKED: Content URL not using http(s) protocol") - to_chat(src, "The media provider returned a content URL that isn't using the HTTP or HTTPS protocol") + if(M.is_preference_enabled(/datum/client_preference/play_admin_midis)) //if(C.prefs.toggles & SOUND_MIDI) + C.tgui_panel?.play_music(web_sound_input, music_extra_data) + + //SSblackbox.record_feedback("tally", "admin_verb", 1, "Manual Play Internet Sound") + feedback_add_details("admin_verb","MPIS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/* +/client/proc/set_round_end_sound(S as sound) + set category = "Fun" + set name = "Set Round End Sound" + if(!check_rights(R_SOUNDS)) return - feedback_add_details("admin_verb","PWSM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(src)] played web sound: [web_sound_input]") - message_admins("[key_name(src)] played web sound.") - for(var/m in player_list) - var/mob/M = m - var/client/C = M.client - if(M.is_preference_enabled(/datum/client_preference/play_admin_midis) && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) - C.chatOutput.sendMusic(web_sound_input, freq) + SSticker.SetRoundEndSound(S) + log_admin("[key_name(src)] set the round end sound to [S]") + message_admins("[key_name_admin(src)] set the round end sound to [S]") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Round End Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +*/ /client/proc/stop_sounds() set category = "Debug" set name = "Stop All Playing Sounds" @@ -179,19 +203,8 @@ log_admin("[key_name(src)] stopped all currently playing sounds.") message_admins("[key_name_admin(src)] stopped all currently playing sounds.") for(var/mob/M in player_list) - if(M.client) - M << sound(null) - var/client/C = M.client - if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) - C.chatOutput.stopMusic() + SEND_SOUND(M, sound(null)) + var/client/C = M.client + C?.tgui_panel?.stop_music() + // SSblackbox.record_feedback("tally", "admin_verb", 1, "Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SAPS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/verb/stop_client_sounds() - set name = "Stop Sounds" - set category = "Preferences" - set desc = "Stop Current Sounds" - usr << sound(null) - var/client/C = usr.client - if(C && C.chatOutput && !C.chatOutput.broken && C.chatOutput.loaded) - C.chatOutput.stopMusic() - feedback_add_details("preferences_verb","SCS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 0c8115488e8..c35f289e5db 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -23,25 +23,28 @@ . = ..() +//DEFINITIONS FOR ASSET DATUMS START HERE. + /datum/asset/simple/tgui_common keep_local_name = TRUE assets = list( - "tgui-common.chunk.js" = 'tgui/packages/tgui/public/tgui-common.chunk.js', + "tgui-common.chunk.js" = 'tgui/public/tgui-common.chunk.js', ) -/* -/datum/asset/simple/tgui // soon(TM) + +/datum/asset/simple/tgui keep_local_name = TRUE assets = list( - "tgui.bundle.js" = 'tgui/packages/tgui/public/tgui.bundle.js', - "tgui.bundle.css" = 'tgui/packages/tgui/public/tgui.bundle.css', + "tgui.bundle.js" = 'tgui/public/tgui.bundle.js', + "tgui.bundle.css" = 'tgui/public/tgui.bundle.css', ) -*/ + /datum/asset/simple/tgui_panel keep_local_name = TRUE assets = list( - "tgui-panel.bundle.js" = 'tgui/packages/tgui/public/tgui-panel.bundle.js', - "tgui-panel.bundle.css" = 'tgui/packages/tgui/public/tgui-panel.bundle.css', + "tgui-panel.bundle.js" = 'tgui/public/tgui-panel.bundle.js', + "tgui-panel.bundle.css" = 'tgui/public/tgui-panel.bundle.css', ) + /* /datum/asset/simple/headers assets = list( diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 8641d7a41f2..84bd0669f3e 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -6,6 +6,7 @@ //////////////// //ADMIN THINGS// //////////////// + ///Contains admin info. Null if client is not an admin. var/datum/admins/holder = null var/datum/admins/deadmin_holder = null var/buildmode = 0 diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 4b8cc0124ae..731579d5da9 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -90,9 +90,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( asset_cache_preload_data(href_list["asset_cache_preload_data"]) return - // Tgui Topic middleware. Soon:tm: - // if(tgui_Topic(href_list)) - // return + // Tgui Topic middleware. + if(tgui_Topic(href_list)) + return //Admin PM if(href_list["priv_msg"]) @@ -123,8 +123,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( return prefs.process_link(usr,href_list) if("vars") return view_var_Topic(href,href_list,hsrc) - if("chat") - return chatOutput.Topic(href, href_list) switch(href_list["action"]) if("openLink") @@ -167,8 +165,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( GLOB.clients += src GLOB.directory[ckey] = src - // Initialize goonchat - chatOutput = new /datum/chatOutput(src) + // Instantiate tgui panel + tgui_panel = new(src) GLOB.ahelp_tickets.ClientLogin(src) var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins. @@ -287,8 +285,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( update_movement_keys() // Initialize tgui panel - // tgui_panel.initialize() - chatOutput.start() // Starts the chat + tgui_panel.initialize() + // src << browse(file('html/statbrowser.html'), "window=statbrowser") //if(alert_mob_dupe_login) // spawn() @@ -366,7 +364,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(prefs.lastchangelog != GLOB.changelog_hash) //bolds the changelog button on the interface so we know there are updates. to_chat(src, "You have unread updates in the changelog.") - winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold") + winset(src, "infowindow.changelog", "background-color=#eaeaea;font-style=bold") if(config_legacy.aggressive_changelog) src.changes() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d3b91d7cd1a..f931ffac4ca 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2,7 +2,7 @@ var/list/preferences_datums = list() -datum/preferences +/datum/preferences //doohickeys for savefiles var/path var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used @@ -21,6 +21,8 @@ datum/preferences var/loadcharcooldown //game-preferences + var/tgui_fancy = TRUE + var/tgui_lock = TRUE var/lastchangelog = "" //Saved changlog filesize to detect if there was a change var/ooccolor = "#010000" //Whatever this is set to acts as 'reset' color and is thus unusable as an actual custom color var/be_special = 0 //Special role selection diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index 480d9b67f20..49da3d54da8 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -113,7 +113,7 @@ var/client/owner // Client this is actually running in var/forced=0 // If true, current url overrides area media sources var/playerstyle // Choice of which player plugin to use - var/const/WINDOW_ID = "rpane.mediapanel" // Which elem in skin.dmf to use + var/const/WINDOW_ID = "infowindow.mediapanel" // Which elem in skin.dmf to use /datum/media_manager/New(var/client/C) ASSERT(istype(C)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index bbdbd5ce041..05ab353d49b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -481,7 +481,7 @@ prefs.lastchangelog = GLOB.changelog_hash SScharacter_setup.queue_preferences_save(prefs) prefs.save_preferences() - winset(src, "rpane.changelog", "background-color=none;font-style=;") + winset(src, "infowindow.changelog", "background-color=none;font-style=;") /mob/verb/observe() set name = "Observe" diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index c0cd54c8d54..85036f2d3e7 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -4,25 +4,25 @@ return list() /datum/topic_state/default/can_use_topic(var/src_object, var/mob/user) - return user.default_can_use_topic(src_object) + return user.nano_default_can_use_topic(src_object) -/mob/proc/default_can_use_topic(var/src_object) +/mob/proc/nano_default_can_use_topic(var/src_object) return STATUS_CLOSE // By default no mob can do anything with NanoUI -/mob/observer/dead/default_can_use_topic(var/src_object) +/mob/observer/dead/nano_default_can_use_topic(var/src_object) if(can_admin_interact()) return STATUS_INTERACTIVE // Admins are more equal if(!client || get_dist(src_object, src) > client.view) // Preventing ghosts from having a million windows open by limiting to objects in range return STATUS_CLOSE return STATUS_UPDATE // Ghosts can view updates -/mob/living/silicon/pai/default_can_use_topic(var/src_object) +/mob/living/silicon/pai/nano_default_can_use_topic(var/src_object) if((src_object == src || src_object == radio || src_object == communicator) && !stat) return STATUS_INTERACTIVE else return ..() -/mob/living/silicon/robot/default_can_use_topic(var/src_object) +/mob/living/silicon/robot/nano_default_can_use_topic(var/src_object) . = shared_nano_interaction() if(. <= STATUS_DISABLED) return @@ -32,7 +32,7 @@ return STATUS_INTERACTIVE // interactive (green visibility) return STATUS_DISABLED // no updates, completely disabled (red visibility) -/mob/living/silicon/ai/default_can_use_topic(var/src_object) +/mob/living/silicon/ai/nano_default_can_use_topic(var/src_object) . = shared_nano_interaction() if(. != STATUS_INTERACTIVE) return @@ -75,7 +75,7 @@ return STATUS_DISABLED // no updates, completely disabled (red visibility) return STATUS_CLOSE -/mob/living/default_can_use_topic(var/src_object) +/mob/living/nano_default_can_use_topic(var/src_object) . = shared_nano_interaction(src_object) if(. != STATUS_CLOSE) if(loc) @@ -83,7 +83,7 @@ if(STATUS_INTERACTIVE) return STATUS_UPDATE -/mob/living/carbon/human/default_can_use_topic(var/src_object) +/mob/living/carbon/human/nano_default_can_use_topic(var/src_object) . = shared_nano_interaction(src_object) if(. != STATUS_CLOSE) . = min(., shared_living_nano_distance(src_object)) diff --git a/code/modules/power/fission/engine.dm b/code/modules/power/fission/engine.dm index 79c9d314efe..9bb468ca6a3 100644 --- a/code/modules/power/fission/engine.dm +++ b/code/modules/power/fission/engine.dm @@ -34,22 +34,23 @@ var/list/obj/machinery/atmospherics/pipe/pipes var/obj/item/radio/radio -/obj/machinery/power/fission/New() +/obj/machinery/power/fission/Initialize(mapload, newdir) . = ..() uid = gl_uid++ rods = new() pipes = new() - radio = new /obj/item/radio{channels=list("Engineering") - icon = 'icons/obj/robot_component.dmi' - icon_state = "radio"}(src) + radio = new /obj/item/radio(src) + radio.icon = 'icons/obj/robot_component.dmi' + radio.icon_state = "radio" + radio.channels = list("Engineering") /obj/machinery/power/fission/Destroy() - for(var/i=1,i<=rods.len,i++) - eject_rod(rods[i]) + for(var/rod in rods) // assume the rods are valid. + eject_rod(rod) rods = null pipes = null - qdel(radio) - . = ..() + QDEL_NULL(radio) + return ..() /obj/machinery/power/fission/process() var/turf/L = loc @@ -105,20 +106,20 @@ var/power = (decay_heat / REACTOR_RADS_TO_MJ) * max(healthmul, 0.1) SSradiation.radiate(src, max(power * REACTOR_RADIATION_MULTIPLIER, 0)) -/obj/machinery/power/fission/attack_hand(mob/user as mob) +/obj/machinery/power/fission/attack_hand(mob/user) nano_ui_interact(user) -/obj/machinery/power/fission/attack_robot(mob/user as mob) +/obj/machinery/power/fission/attack_robot(mob/user) nano_ui_interact(user) -/obj/machinery/power/fission/attack_ai(mob/user as mob) +/obj/machinery/power/fission/attack_ai(mob/user) nano_ui_interact(user) -/obj/machinery/power/fission/nano_ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/power/fission/nano_ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) if(!powered() || !anchored) return - var/data = ui_data() + var/data = nuke_ui_data() ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) @@ -127,7 +128,7 @@ ui.open() ui.set_auto_update(1) -/obj/machinery/power/fission/proc/ui_data(need_power = FALSE) +/obj/machinery/power/fission/proc/nuke_ui_data(need_power = FALSE) var/data[0] data["integrity_percentage"] = round(get_integrity()) @@ -194,7 +195,7 @@ usr.set_machine(src) src.add_fingerprint(usr) -/obj/machinery/power/fission/attackby(var/obj/item/W as obj, var/mob/user as mob) +/obj/machinery/power/fission/attackby(obj/item/W , mob/user) add_fingerprint(user) if(exploded) return ..() @@ -235,8 +236,7 @@ if(rods.len == 0) to_chat(user, "There's nothing left to remove.") return - for(var/i=1,i<=rods.len,i++) - var/obj/item/fuelrod/rod = rods[i] + for(var/obj/item/fuelrod/rod in rods) if(rod.health == 0 || rod.life == 0) to_chat(user, "You carefully start removing \the [rod] from \the [src].") if(do_after(user, 40)) @@ -491,13 +491,13 @@ now_you_done_it(L) /obj/machinery/power/fission/proc/now_you_done_it(var/turf/L) - spawn(3 SECONDS) + sleep(3 SECONDS) if (!istype(L)) return var/tx = L.x - 3 var/ty = L.y - 3 var/turf/spider_spawn - for(var/iy = 0,iy < 6, iy++) + for(var/iy = 0, iy < 6, iy++) for(var/ix = 0, ix < 6, ix++) spider_spawn = locate(tx + ix, ty + iy, L.z) if (!istype(spider_spawn, /turf/space)) diff --git a/code/modules/tgchat/message.dm b/code/modules/tgchat/message.dm new file mode 100644 index 00000000000..2e9bfe784ec --- /dev/null +++ b/code/modules/tgchat/message.dm @@ -0,0 +1,17 @@ +/** + * Message-related procs + * + * Message format (/list): + * - type - Message type, must be one of defines in `code/__DEFINES/chat.dm` + * - text - Plain message text + * - html - HTML message text + * - Optional metadata, can be any key/value pair. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/proc/message_to_html(message) + // Here it is possible to add a switch statement + // to custom-handle various message types. + return message["html"] || message["text"] diff --git a/code/modules/tgchat/to_chat.dm b/code/modules/tgchat/to_chat.dm new file mode 100644 index 00000000000..c1f713f5504 --- /dev/null +++ b/code/modules/tgchat/to_chat.dm @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * Circumvents the message queue and sends the message + * to the recipient (target) as soon as possible. + */ +/proc/to_chat_immediate(target, html, + type = null, + text = null, + avoid_highlighting = FALSE, + // FIXME: These flags are now pointless and have no effect + handle_whitespace = TRUE, + trailing_newline = TRUE, + confidential = FALSE) + if(!target || (!html && !text)) + return + if(target == world) + target = GLOB.clients + // Build a message + var/message = list() + if(type) message["type"] = type + if(text) message["text"] = text + if(html) message["html"] = html + if(avoid_highlighting) message["avoidHighlighting"] = avoid_highlighting + var/message_blob = TGUI_CREATE_MESSAGE("chat/message", message) + var/message_html = message_to_html(message) + if(islist(target)) + for(var/_target in target) + var/client/client = CLIENT_FROM_VAR(_target) + if(client) + // Send to tgchat + client.tgui_panel?.window.send_raw_message(message_blob) + // Send to old chat + SEND_TEXT(client, message_html) + return + var/client/client = CLIENT_FROM_VAR(target) + if(client) + // Send to tgchat + client.tgui_panel?.window.send_raw_message(message_blob) + // Send to old chat + SEND_TEXT(client, message_html) + +/** + * Sends the message to the recipient (target). + * + * Recommended way to write to_chat calls: + * ``` + * to_chat(client, + * type = MESSAGE_TYPE_INFO, + * html = "You have found [object]") + * ``` + */ +/proc/to_chat(target, html, + type = null, + text = null, + avoid_highlighting = FALSE, + // FIXME: These flags are now pointless and have no effect + handle_whitespace = TRUE, + trailing_newline = TRUE, + confidential = FALSE) + if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.subsystem_initialized) + to_chat_immediate(target, html, type, text) + return + if(!target || (!html && !text)) + return + if(target == world) + target = GLOB.clients + // Build a message + var/message = list() + if(type) message["type"] = type + if(text) message["text"] = text + if(html) message["html"] = html + if(avoid_highlighting) message["avoidHighlighting"] = avoid_highlighting + SSchat.queue(target, message) diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm new file mode 100644 index 00000000000..52851b2daf0 --- /dev/null +++ b/code/modules/tgui/external.dm @@ -0,0 +1,215 @@ +/** + * External tgui definitions, such as src_object APIs. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * public + * + * Used to open and update UIs. + * If this proc is not implemented properly, the UI will not update correctly. + * + * required user mob The mob who opened/is using the UI. + * optional ui datum/tgui The UI to be updated, if it exists. + */ +/datum/proc/ui_interact(mob/user, datum/tgui/ui) + return FALSE // Not implemented. + +/** + * public + * + * Data to be sent to the UI. + * This must be implemented for a UI to work. + * + * required user mob The mob interacting with the UI. + * + * return list Data to be sent to the UI. + */ +/datum/proc/ui_data(mob/user) + return list() // Not implemented. + +/** + * public + * + * Static Data to be sent to the UI. + * + * Static data differs from normal data in that it's large data that should be + * sent infrequently. This is implemented optionally for heavy uis that would + * be sending a lot of redundant data frequently. Gets squished into one + * object on the frontend side, but the static part is cached. + * + * required user mob The mob interacting with the UI. + * + * return list Statuic Data to be sent to the UI. + */ +/datum/proc/ui_static_data(mob/user) + return list() + +/** + * public + * + * Forces an update on static data. Should be done manually whenever something + * happens to change static data. + * + * required user the mob currently interacting with the ui + * optional ui ui to be updated + */ +/datum/proc/update_static_data(mob/user, datum/tgui/ui) + if(!ui) + ui = SStgui.get_open_ui(user, src) + if(ui) + ui.send_full_update() + +/** + * public + * + * Called on a UI when the UI receieves a href. + * Think of this as Topic(). + * + * required action string The action/button that has been invoked by the user. + * required params list A list of parameters attached to the button. + * + * return bool If the user's input has been handled and the UI should update. + */ +/datum/proc/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + //SHOULD_CALL_PARENT(TRUE) + // If UI is not interactive or usr calling Topic is not the UI user, bail. + if(!ui || ui.status != UI_INTERACTIVE) + return TRUE + +/** + * public + * + * Called on an object when a tgui object is being created, allowing you to + * push various assets to tgui, for examples spritesheets. + * + * return list List of asset datums or file paths. + */ +/datum/proc/ui_assets(mob/user) + return list() + +/** + * private + * + * The UI's host object (usually src_object). + * This allows modules/datums to have the UI attached to them, + * and be a part of another object. + */ +/datum/proc/ui_host(mob/user) + return src // Default src. + +/** + * private + * + * The UI's state controller to be used for created uis + * This is a proc over a var for memory reasons + */ +/datum/proc/ui_state(mob/user) + return GLOB.default_state + +/** + * global + * + * Associative list of JSON-encoded shared states that were set by + * tgui clients. + */ +/datum/var/list/tgui_shared_states + +/** + * global + * + * Tracks open UIs for a user. + */ +/mob/var/list/tgui_open_uis = list() + +/** + * global + * + * Tracks open windows for a user. + */ +/client/var/list/tgui_windows = list() + +/** + * global + * + * TRUE if cache was reloaded by tgui dev server at least once. + */ +/client/var/tgui_cache_reloaded = FALSE + +/** + * public + * + * Called on a UI's object when the UI is closed, not to be confused with + * client/verb/uiclose(), which closes the ui window + */ +/datum/proc/ui_close(mob/user) + +/** + * verb + * + * Called by UIs when they are closed. + * Must be a verb so winset() can call it. + * + * required uiref ref The UI that was closed. + */ +/client/verb/uiclose(window_id as text) + // Name the verb, and hide it from the user panel. + set name = "uiclose" + set hidden = TRUE + var/mob/user = src?.mob + if(!user) + return + // Close all tgui datums based on window_id. + SStgui.force_close_window(user, window_id) + +/** + * Middleware for /client/Topic. + * + * return bool If TRUE, prevents propagation of the topic call. + */ +/proc/tgui_Topic(href_list) + // Skip non-tgui topics + if(!href_list["tgui"]) + return FALSE + var/type = href_list["type"] + // Unconditionally collect tgui logs + if(type == "log") + var/context = href_list["window_id"] + if (href_list["ns"]) + context += " ([href_list["ns"]])" + log_tgui(usr, href_list["message"], + context = context) + // Reload all tgui windows + if(type == "cacheReloaded") + if(!check_rights(R_ADMIN) || usr.client.tgui_cache_reloaded) + return TRUE + // Mark as reloaded + usr.client.tgui_cache_reloaded = TRUE + // Notify windows + var/list/windows = usr.client.tgui_windows + for(var/window_id in windows) + var/datum/tgui_window/window = windows[window_id] + if (window.status == TGUI_WINDOW_READY) + window.on_message(type, null, href_list) + return TRUE + // Locate window + var/window_id = href_list["window_id"] + var/datum/tgui_window/window + if(window_id) + window = usr.client.tgui_windows[window_id] + if(!window) + log_tgui(usr, + "Error: Couldn't find the window datum, force closing.", + context = window_id) + SStgui.force_close_window(usr, window_id) + return TRUE + // Decode payload + var/payload + if(href_list["payload"]) + payload = json_decode(href_list["payload"]) + // Pass message to window + if(window) + window.on_message(type, payload, href_list) + return TRUE diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm new file mode 100644 index 00000000000..fd575f004f4 --- /dev/null +++ b/code/modules/tgui/states.dm @@ -0,0 +1,137 @@ +/** + * Base state and helpers for states. Just does some sanity checks, + * implement a proper state for in-depth checks. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * public + * + * Checks the UI state for a mob. + * + * required user mob The mob who opened/is using the UI. + * required state datum/ui_state The state to check. + * + * return UI_state The state of the UI. + */ +/datum/proc/ui_status(mob/user, datum/ui_state/state) + var/src_object = ui_host(user) + . = UI_CLOSE + if(!state) + return + + if(isobserver(user)) + // If they turn on ghost AI control, admins can always interact. + // if(IsAdminGhost(user)) + // . = max(., UI_INTERACTIVE) + + // Regular ghosts can always at least view if in range. + if(user.client) + var/clientviewlist = getviewsize(user.client.view) + if(get_dist(src_object, user) < max(clientviewlist[1], clientviewlist[2])) + . = max(., UI_UPDATE) + + // Check if the state allows interaction + var/result = state.can_use_topic(src_object, user) + . = max(., result) + +/** + * private + * + * Checks if a user can use src_object's UI, and returns the state. + * Can call a mob proc, which allows overrides for each mob. + * + * required src_object datum The object/datum which owns the UI. + * required user mob The mob who opened/is using the UI. + * + * return UI_state The state of the UI. + */ +/datum/ui_state/proc/can_use_topic(src_object, mob/user) + // Don't allow interaction by default. + return UI_CLOSE + +/** + * public + * + * Standard interaction/sanity checks. Different mob types may have overrides. + * + * return UI_state The state of the UI. + */ +/mob/proc/shared_ui_interaction(src_object) + // Close UIs if mindless. + if(!client) + return UI_CLOSE + // Disable UIs if unconcious. + else if(stat) + return UI_DISABLED + // Update UIs if incapicitated but concious. + else if(incapacitated()) + return UI_UPDATE + return UI_INTERACTIVE +/* +/mob/living/shared_ui_interaction(src_object) + . = ..() + if(!(mobility_flags & MOBILITY_UI) && . == UI_INTERACTIVE) + return UI_UPDATE +*/ +/mob/living/silicon/ai/shared_ui_interaction(src_object) + // Disable UIs if the AI is unpowered. + if(lacks_power()) + return UI_DISABLED + return ..() + +/mob/living/silicon/robot/shared_ui_interaction(src_object) + // Disable UIs if the object isn't installed in the borg AND the borg is either locked, has a dead cell, or no cell. + var/atom/device = src_object + if((istype(device) && device.loc != src) && (!cell || cell.charge <= 0)) // || locked_down + return UI_DISABLED + return ..() + +/** + * public + * + * Check the distance for a living mob. + * Really only used for checks outside the context of a mob. + * Otherwise, use shared_living_ui_distance(). + * + * required src_object The object which owns the UI. + * required user mob The mob who opened/is using the UI. + * + * return UI_state The state of the UI. + */ +/atom/proc/contents_ui_distance(src_object, mob/living/user) + // Just call this mob's check. + return user.shared_living_ui_distance(src_object) + +/** + * public + * + * Distance versus interaction check. + * + * required src_object atom/movable The object which owns the UI. + * + * return UI_state The state of the UI. + */ +/mob/living/proc/shared_living_ui_distance(atom/movable/src_object, viewcheck = TRUE) + // If the object is obscured, close it. + if(viewcheck && !(src_object in view(src))) + return UI_CLOSE + var/dist = get_dist(src_object, src) + // Open and interact if 1-0 tiles away. + if(dist <= 1) + return UI_INTERACTIVE + // View only if 2-3 tiles away. + else if(dist <= 2) + return UI_UPDATE + // Disable if 5 tiles away. + else if(dist <= 5) + return UI_DISABLED + // Otherwise, we got nothing. + return UI_CLOSE + +/mob/living/carbon/human/shared_living_ui_distance(atom/movable/src_object, viewcheck = TRUE) + // if(dna.check_mutation(TK) && tkMaxRangeCheck(src, src_object)) + // return UI_INTERACTIVE + return ..() diff --git a/code/modules/tgui/states/admin.dm b/code/modules/tgui/states/admin.dm new file mode 100644 index 00000000000..3138ca518e0 --- /dev/null +++ b/code/modules/tgui/states/admin.dm @@ -0,0 +1,15 @@ +/** + * tgui state: admin_state + * + * Checks that the user is an admin, end-of-story. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(admin_state, /datum/ui_state/admin_state, new) + +/datum/ui_state/admin_state/can_use_topic(src_object, mob/user) + if(check_rights(R_ADMIN, FALSE, user.client)) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/always.dm b/code/modules/tgui/states/always.dm new file mode 100644 index 00000000000..210f0896a2f --- /dev/null +++ b/code/modules/tgui/states/always.dm @@ -0,0 +1,13 @@ +/** + * tgui state: always_state + * + * Always grants the user UI_INTERACTIVE. Period. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(always_state, /datum/ui_state/always_state, new) + +/datum/ui_state/always_state/can_use_topic(src_object, mob/user) + return UI_INTERACTIVE diff --git a/code/modules/tgui/states/conscious.dm b/code/modules/tgui/states/conscious.dm new file mode 100644 index 00000000000..670ca7c07e8 --- /dev/null +++ b/code/modules/tgui/states/conscious.dm @@ -0,0 +1,15 @@ +/** + * tgui state: conscious_state + * + * Only checks if the user is conscious. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(conscious_state, /datum/ui_state/conscious_state, new) + +/datum/ui_state/conscious_state/can_use_topic(src_object, mob/user) + if(user.stat == CONSCIOUS) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/contained.dm b/code/modules/tgui/states/contained.dm new file mode 100644 index 00000000000..1eb8edba25f --- /dev/null +++ b/code/modules/tgui/states/contained.dm @@ -0,0 +1,15 @@ +/** + * tgui state: contained_state + * + * Checks that the user is inside the src_object. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(contained_state, /datum/ui_state/contained_state, new) + +/datum/ui_state/contained_state/can_use_topic(atom/src_object, mob/user) + if(!src_object.contains(user)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/debug.dm b/code/modules/tgui/states/debug.dm new file mode 100644 index 00000000000..2e9c0f3d014 --- /dev/null +++ b/code/modules/tgui/states/debug.dm @@ -0,0 +1,6 @@ +GLOBAL_DATUM_INIT(debug_state, /datum/ui_state/debug_state, new) + +/datum/ui_state/debug_state/can_use_topic(src_object, mob/user) + if(check_rights(R_DEBUG, FALSE, user.client)) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/deep_inventory.dm b/code/modules/tgui/states/deep_inventory.dm new file mode 100644 index 00000000000..a2b9276a593 --- /dev/null +++ b/code/modules/tgui/states/deep_inventory.dm @@ -0,0 +1,16 @@ +/** + * tgui state: deep_inventory_state + * + * Checks that the src_object is in the user's deep + * (backpack, box, toolbox, etc) inventory. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(deep_inventory_state, /datum/ui_state/deep_inventory_state, new) + +/datum/ui_state/deep_inventory_state/can_use_topic(src_object, mob/user) + if(!user.contains(src_object)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm new file mode 100644 index 00000000000..367e57beffa --- /dev/null +++ b/code/modules/tgui/states/default.dm @@ -0,0 +1,62 @@ +/** + * tgui state: default_state + * + * Checks a number of things -- mostly physical distance for humans + * and view for robots. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new) + +/datum/ui_state/default/can_use_topic(src_object, mob/user) + return user.default_can_use_topic(src_object) // Call the individual mob-overridden procs. + +/mob/proc/default_can_use_topic(src_object) + return UI_CLOSE // Don't allow interaction by default. + +/mob/living/default_can_use_topic(src_object) + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE && loc) + . = min(., loc.contents_ui_distance(src_object, src)) // Check the distance... + if(. == UI_INTERACTIVE) // Non-human living mobs can only look, not touch. + return UI_UPDATE + +/mob/living/carbon/human/default_can_use_topic(src_object) + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE) + . = min(., shared_living_ui_distance(src_object)) // Check the distance... + +/mob/living/silicon/robot/default_can_use_topic(src_object) + . = shared_ui_interaction(src_object) + if(. <= UI_DISABLED) + return + + // Robots can interact with anything they can see. + var/list/clientviewlist = getviewsize(client.view) + if(get_dist(src, src_object) <= min(clientviewlist[1],clientviewlist[2])) + return UI_INTERACTIVE + return UI_DISABLED // Otherwise they can keep the UI open. + +/mob/living/silicon/ai/default_can_use_topic(src_object) + . = shared_ui_interaction(src_object) + if(. < UI_INTERACTIVE) + return + + // The AI can interact with anything it can see nearby, or with cameras while wireless control is enabled. + if(!control_disabled && can_see(src_object)) + return UI_INTERACTIVE + return UI_CLOSE + +/mob/living/simple_animal/default_can_use_topic(src_object) + . = shared_ui_interaction(src_object) + if(. > UI_CLOSE) + . = min(., shared_living_ui_distance(src_object)) //simple animals can only use things they're near. + +/mob/living/silicon/pai/default_can_use_topic(src_object) + // pAIs can only use themselves and the owner's radio. + if((src_object == src || src_object == radio) && !stat) + return UI_INTERACTIVE + else + return ..() diff --git a/code/modules/tgui/states/hands.dm b/code/modules/tgui/states/hands.dm new file mode 100644 index 00000000000..1c885ed4140 --- /dev/null +++ b/code/modules/tgui/states/hands.dm @@ -0,0 +1,28 @@ +/** + * tgui state: hands_state + * + * Checks that the src_object is in the user's hands. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(hands_state, /datum/ui_state/hands_state, new) + +/datum/ui_state/hands_state/can_use_topic(src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.hands_can_use_topic(src_object)) + +/mob/proc/hands_can_use_topic(src_object) + return UI_CLOSE + +/mob/living/hands_can_use_topic(src_object) + if(is_holding(src_object)) + return UI_INTERACTIVE + return UI_CLOSE + +/mob/living/silicon/robot/hands_can_use_topic(src_object) + if(activated(src_object)) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/states/human_adjacent.dm b/code/modules/tgui/states/human_adjacent.dm new file mode 100644 index 00000000000..2ac7c8637b6 --- /dev/null +++ b/code/modules/tgui/states/human_adjacent.dm @@ -0,0 +1,19 @@ +/** + * tgui state: human_adjacent_state + * + * In addition to default checks, only allows interaction for a + * human adjacent user. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(human_adjacent_state, /datum/ui_state/human_adjacent_state, new) + +/datum/ui_state/human_adjacent_state/can_use_topic(src_object, mob/user) + . = user.default_can_use_topic(src_object) + + var/dist = get_dist(src_object, user) + if((dist > 1) || (!ishuman(user))) + // Can't be used unless adjacent and human, even with TK + . = min(., UI_UPDATE) diff --git a/code/modules/tgui/states/inventory.dm b/code/modules/tgui/states/inventory.dm new file mode 100644 index 00000000000..dc5dd0d57e6 --- /dev/null +++ b/code/modules/tgui/states/inventory.dm @@ -0,0 +1,16 @@ +/** + * tgui state: inventory_state + * + * Checks that the src_object is in the user's top-level + * (hand, ear, pocket, belt, etc) inventory. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(inventory_state, /datum/ui_state/inventory_state, new) + +/datum/ui_state/inventory_state/can_use_topic(src_object, mob/user) + if(!(src_object in user)) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/language_menu.dm b/code/modules/tgui/states/language_menu.dm new file mode 100644 index 00000000000..6389b05cd5e --- /dev/null +++ b/code/modules/tgui/states/language_menu.dm @@ -0,0 +1,17 @@ +/** + * tgui state: language_menu_state + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(language_menu_state, /datum/ui_state/language_menu, new) + +/datum/ui_state/language_menu/can_use_topic(src_object, mob/user) + . = UI_CLOSE + if(check_rights_for(user.client, R_ADMIN)) + . = UI_INTERACTIVE + else if(istype(src_object, /datum/language_menu)) + var/datum/language_menu/LM = src_object + if(LM.language_holder.get_atom() == user) + . = UI_INTERACTIVE diff --git a/code/modules/tgui/states/not_incapacitated.dm b/code/modules/tgui/states/not_incapacitated.dm new file mode 100644 index 00000000000..786f1888d2d --- /dev/null +++ b/code/modules/tgui/states/not_incapacitated.dm @@ -0,0 +1,36 @@ +/** + * tgui state: not_incapacitated_state + * + * Checks that the user isn't incapacitated + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(not_incapacitated_state, /datum/ui_state/not_incapacitated_state, new) + +/** + * tgui state: not_incapacitated_turf_state + * + * Checks that the user isn't incapacitated and that their loc is a turf + */ + +GLOBAL_DATUM_INIT(not_incapacitated_turf_state, /datum/ui_state/not_incapacitated_state, new(no_turfs = TRUE)) + +/datum/ui_state/not_incapacitated_state + var/turf_check = FALSE + +/datum/ui_state/not_incapacitated_state/New(loc, no_turfs = FALSE) + ..() + turf_check = no_turfs + +/datum/ui_state/not_incapacitated_state/can_use_topic(src_object, mob/user) + if(user.stat != CONSCIOUS) + return UI_CLOSE + if(user.incapacitated() || (turf_check && !isturf(user.loc))) + return UI_DISABLED + if(isliving(user)) + var/mob/living/L = user + if(!(L.mobility_flags & MOBILITY_STAND)) + return UI_DISABLED + return UI_INTERACTIVE diff --git a/code/modules/tgui/states/notcontained.dm b/code/modules/tgui/states/notcontained.dm new file mode 100644 index 00000000000..1d4e6aec192 --- /dev/null +++ b/code/modules/tgui/states/notcontained.dm @@ -0,0 +1,30 @@ +/** + * tgui state: notcontained_state + * + * Checks that the user is not inside src_object, and then makes the + * default checks. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new) + +/datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.notcontained_can_use_topic(src_object)) + +/mob/proc/notcontained_can_use_topic(src_object) + return UI_CLOSE + +/mob/living/notcontained_can_use_topic(atom/src_object) + if(src_object.contains(src)) + return UI_CLOSE // Close if we're inside it. + return default_can_use_topic(src_object) + +/mob/living/silicon/notcontained_can_use_topic(src_object) + return default_can_use_topic(src_object) // Silicons use default bevhavior. + +/mob/living/simple_animal/drone/notcontained_can_use_topic(src_object) + return default_can_use_topic(src_object) // Drones use default bevhavior. diff --git a/code/modules/tgui/states/observer.dm b/code/modules/tgui/states/observer.dm new file mode 100644 index 00000000000..d105de1c0c0 --- /dev/null +++ b/code/modules/tgui/states/observer.dm @@ -0,0 +1,16 @@ +/** + * tgui state: observer_state + * + * Checks that the user is an observer/ghost. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(observer_state, /datum/ui_state/observer_state, new) + +/datum/ui_state/observer_state/can_use_topic(src_object, mob/user) + if(isobserver(user)) + return UI_INTERACTIVE + return UI_CLOSE + diff --git a/code/modules/tgui/states/physical.dm b/code/modules/tgui/states/physical.dm new file mode 100644 index 00000000000..3073039d14c --- /dev/null +++ b/code/modules/tgui/states/physical.dm @@ -0,0 +1,53 @@ +/** + * tgui state: physical_state + * + * Short-circuits the default state to only check physical distance. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(physical_state, /datum/ui_state/physical, new) + +/datum/ui_state/physical/can_use_topic(src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.physical_can_use_topic(src_object)) + +/mob/proc/physical_can_use_topic(src_object) + return UI_CLOSE + +/mob/living/physical_can_use_topic(src_object) + return shared_living_ui_distance(src_object) + +/mob/living/silicon/physical_can_use_topic(src_object) + return max(UI_UPDATE, shared_living_ui_distance(src_object)) // Silicons can always see. + +/mob/living/silicon/ai/physical_can_use_topic(src_object) + return UI_UPDATE // AIs are not physical. + + +/** + * tgui state: physical_obscured_state + * + * Short-circuits the default state to only check physical distance, being in view doesn't matter + */ + +GLOBAL_DATUM_INIT(physical_obscured_state, /datum/ui_state/physical_obscured_state, new) + +/datum/ui_state/physical_obscured_state/can_use_topic(src_object, mob/user) + . = user.shared_ui_interaction(src_object) + if(. > UI_CLOSE) + return min(., user.physical_obscured_can_use_topic(src_object)) + +/mob/proc/physical_obscured_can_use_topic(src_object) + return UI_CLOSE + +/mob/living/physical_obscured_can_use_topic(src_object) + return shared_living_ui_distance(src_object, viewcheck = FALSE) + +/mob/living/silicon/physical_obscured_can_use_topic(src_object) + return max(UI_UPDATE, shared_living_ui_distance(src_object, viewcheck = FALSE)) // Silicons can always see. + +/mob/living/silicon/ai/physical_obscured_can_use_topic(src_object) + return UI_UPDATE // AIs are not physical. diff --git a/code/modules/tgui/states/self.dm b/code/modules/tgui/states/self.dm new file mode 100644 index 00000000000..4b6e3b9fd9f --- /dev/null +++ b/code/modules/tgui/states/self.dm @@ -0,0 +1,15 @@ +/** + * tgui state: self_state + * + * Only checks that the user and src_object are the same. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(self_state, /datum/ui_state/self_state, new) + +/datum/ui_state/self_state/can_use_topic(src_object, mob/user) + if(src_object != user) + return UI_CLOSE + return user.shared_ui_interaction(src_object) diff --git a/code/modules/tgui/states/zlevel.dm b/code/modules/tgui/states/zlevel.dm new file mode 100644 index 00000000000..64ea2fa1c0e --- /dev/null +++ b/code/modules/tgui/states/zlevel.dm @@ -0,0 +1,17 @@ +/** + * tgui state: z_state + * + * Only checks that the Z-level of the user and src_object are the same. + * + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new) + +/datum/ui_state/z_state/can_use_topic(src_object, mob/user) + var/turf/turf_obj = get_turf(src_object) + var/turf/turf_usr = get_turf(user) + if(turf_obj && turf_usr && turf_obj.z == turf_usr.z) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm new file mode 100644 index 00000000000..7322c4179bb --- /dev/null +++ b/code/modules/tgui/tgui.dm @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * tgui datum (represents a UI). + */ +/datum/tgui + /// The mob who opened/is using the UI. + var/mob/user + /// The object which owns the UI. + var/datum/src_object + /// The title of te UI. + var/title + /// The window_id for browse() and onclose(). + var/datum/tgui_window/window + /// Key that is used for remembering the window geometry. + var/window_key + /// Deprecated: Window size. + var/window_size + /// The interface (template) to be used for this UI. + var/interface + /// Update the UI every MC tick. + var/autoupdate = TRUE + /// If the UI has been initialized yet. + var/initialized = FALSE + /// Time of opening the window. + var/opened_at + /// Stops further updates when close() was called. + var/closing = FALSE + /// The status/visibility of the UI. + var/status = UI_INTERACTIVE + /// Topic state used to determine status/interactability. + var/datum/ui_state/state = null + +/** + * public + * + * Create a new UI. + * + * required user mob The mob who opened/is using the UI. + * required src_object datum The object or datum which owns the UI. + * required interface string The interface used to render the UI. + * optional title string The title of the UI. + * optional ui_x int Deprecated: Window width. + * optional ui_y int Deprecated: Window height. + * + * return datum/tgui The requested UI. + */ +/datum/tgui/New(mob/user, datum/src_object, interface, title, ui_x, ui_y) + log_tgui(user, + "new [interface] fancy [user?.client?.prefs.tgui_fancy]", + src_object = src_object) + src.user = user + src.src_object = src_object + src.window_key = "[REF(src_object)]-main" + src.interface = interface + if(title) + src.title = title + src.state = src_object.ui_state() + // Deprecated + if(ui_x && ui_y) + src.window_size = list(ui_x, ui_y) + +/** + * public + * + * Open this UI (and initialize it with data). + * + * return bool - TRUE if a new pooled window is opened, FALSE in all other situations including if a new pooled window didn't open because one already exists. + */ +/datum/tgui/proc/open() + if(!user.client) + return FALSE + if(window) + return FALSE + process_status() + if(status < UI_UPDATE) + return FALSE + window = SStgui.request_pooled_window(user) + if(!window) + return FALSE + opened_at = world.time + window.acquire_lock(src) + if(!window.is_ready()) + window.initialize( + fancy = user.client.prefs.tgui_fancy, + inline_assets = list( + get_asset_datum(/datum/asset/simple/tgui_common), + get_asset_datum(/datum/asset/simple/tgui), + )) + else + window.send_message("ping") + var/flush_queue = window.send_asset(get_asset_datum( + /datum/asset/simple/namespaced/fontawesome)) + for(var/datum/asset/asset in src_object.ui_assets(user)) + flush_queue |= window.send_asset(asset) + if (flush_queue) + user.client.browse_queue_flush() + window.send_message("update", get_payload( + with_data = TRUE, + with_static_data = TRUE)) + SStgui.on_open(src) + + return TRUE + +/** + * public + * + * Close the UI. + * + * optional can_be_suspended bool + */ +/datum/tgui/proc/close(can_be_suspended = TRUE) + if(closing) + return + closing = TRUE + // If we don't have window_id, open proc did not have the opportunity + // to finish, therefore it's safe to skip this whole block. + if(window) + // Windows you want to keep are usually blue screens of death + // and we want to keep them around, to allow user to read + // the error message properly. + window.release_lock() + window.close(can_be_suspended) + src_object.ui_close(user) + SStgui.on_close(src) + state = null + qdel(src) + +/** + * public + * + * Enable/disable auto-updating of the UI. + * + * required value bool Enable/disable auto-updating. + */ +/datum/tgui/proc/set_autoupdate(autoupdate) + src.autoupdate = autoupdate + +/** + * public + * + * Replace current ui.state with a new one. + * + * required state datum/ui_state/state Next state + */ +/datum/tgui/proc/set_state(datum/ui_state/state) + src.state = state + +/** + * public + * + * Makes an asset available to use in tgui. + * + * required asset datum/asset + * + * return bool - true if an asset was actually sent + */ +/datum/tgui/proc/send_asset(datum/asset/asset) + if(!window) + CRASH("send_asset() was called either without calling open() first or when open() did not return TRUE.") + return window.send_asset(asset) + +/** + * public + * + * Send a full update to the client (includes static data). + * + * optional custom_data list Custom data to send instead of ui_data. + * optional force bool Send an update even if UI is not interactive. + */ +/datum/tgui/proc/send_full_update(custom_data, force) + if(!user.client || !initialized || closing) + return + var/should_update_data = force || status >= UI_UPDATE + window.send_message("update", get_payload( + custom_data, + with_data = should_update_data, + with_static_data = TRUE)) + +/** + * public + * + * Send a partial update to the client (excludes static data). + * + * optional custom_data list Custom data to send instead of ui_data. + * optional force bool Send an update even if UI is not interactive. + */ +/datum/tgui/proc/send_update(custom_data, force) + if(!user.client || !initialized || closing) + return + var/should_update_data = force || status >= UI_UPDATE + window.send_message("update", get_payload( + custom_data, + with_data = should_update_data)) + +/** + * private + * + * Package the data to send to the UI, as JSON. + * + * return list + */ +/datum/tgui/proc/get_payload(custom_data, with_data, with_static_data) + var/list/json_data = list() + json_data["config"] = list( + "title" = title, + "status" = status, + "interface" = interface, + "window" = list( + "key" = window_key, + "size" = window_size, + "fancy" = user.client.prefs.tgui_fancy, + "locked" = user.client.prefs.tgui_lock, + ), + "client" = list( + "ckey" = user.client.ckey, + "address" = user.client.address, + "computer_id" = user.client.computer_id, + ), + "user" = list( + "name" = "[user]", + "observer" = isobserver(user), + ), + ) + var/data = custom_data || with_data && src_object.ui_data(user) + if(data) + json_data["data"] = data + var/static_data = with_static_data && src_object.ui_static_data(user) + if(static_data) + json_data["static_data"] = static_data + if(src_object.tgui_shared_states) + json_data["shared"] = src_object.tgui_shared_states + return json_data + +/** + * private + * + * Run an update cycle for this UI. Called internally by SStgui + * every second or so. + */ +/datum/tgui/process(delta_time, force = FALSE) + if(closing) + return + var/datum/host = src_object.ui_host(user) + // If the object or user died (or something else), abort. + if(!src_object || !host || !user || !window) + close(can_be_suspended = FALSE) + return + // Validate ping + if(!initialized && world.time - opened_at > TGUI_PING_TIMEOUT) + log_tgui(user, "Error: Zombie window detected, closing.", + window = window, + src_object = src_object) + close(can_be_suspended = FALSE) + return + // Update through a normal call to ui_interact + if(status != UI_DISABLED && (autoupdate || force)) + src_object.ui_interact(user, src) + return + // Update status only + var/needs_update = process_status() + if(status <= UI_CLOSE) + close() + return + if(needs_update) + window.send_message("update", get_payload()) + +/** + * private + * + * Updates the status, and returns TRUE if status has changed. + */ +/datum/tgui/proc/process_status() + var/prev_status = status + status = src_object.ui_status(user, state) + return prev_status != status + +/** + * private + * + * Callback for handling incoming tgui messages. + */ +/datum/tgui/proc/on_message(type, list/payload, list/href_list) + // Pass act type messages to ui_act + if(type && copytext(type, 1, 5) == "act/") + var/act_type = copytext(type, 5) + log_tgui(user, "Action: [act_type] [href_list["payload"]]", + window = window, + src_object = src_object) + process_status() + if(src_object.ui_act(act_type, payload, src, state)) + SStgui.update_uis(src_object) + return FALSE + switch(type) + if("ready") + initialized = TRUE + if("pingReply") + initialized = TRUE + if("suspend") + close(can_be_suspended = TRUE) + if("close") + close(can_be_suspended = FALSE) + if("log") + if(href_list["fatal"]) + close(can_be_suspended = FALSE) + if("setSharedState") + if(status != UI_INTERACTIVE) + return + LAZYINITLIST(src_object.tgui_shared_states) + src_object.tgui_shared_states[href_list["key"]] = href_list["value"] + SStgui.update_uis(src_object) diff --git a/code/modules/tgui/tgui_window.dm b/code/modules/tgui/tgui_window.dm new file mode 100644 index 00000000000..23583e8b530 --- /dev/null +++ b/code/modules/tgui/tgui_window.dm @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/datum/tgui_window + var/id + var/client/client + var/pooled + var/pool_index + var/is_browser = FALSE + var/status = TGUI_WINDOW_CLOSED + var/locked = FALSE + var/datum/tgui/locked_by + var/datum/subscriber_object + var/subscriber_delegate + var/fatally_errored = FALSE + var/message_queue + var/sent_assets = list() + // Vars passed to initialize proc (and saved for later) + var/inline_assets + var/fancy + +/** + * public + * + * Create a new tgui window. + * + * required client /client + * required id string A unique window identifier. + */ +/datum/tgui_window/New(client/client, id, pooled = FALSE) + src.id = id + src.client = client + src.client.tgui_windows[id] = src + src.pooled = pooled + if(pooled) + src.pool_index = TGUI_WINDOW_INDEX(id) + +/** + * public + * + * Initializes the window with a fresh page. Puts window into the "loading" + * state. You can begin sending messages right after initializing. Messages + * will be put into the queue until the window finishes loading. + * + * optional inline_assets list List of assets to inline into the html. + * optional inline_html string Custom HTML to inject. + * optional fancy bool If TRUE, will hide the window titlebar. + */ +/datum/tgui_window/proc/initialize( + inline_assets = list(), + inline_html = "", + fancy = FALSE) + log_tgui(client, + context = "[id]/initialize", + window = src) + if(!client) + return + src.inline_assets = inline_assets + src.fancy = fancy + status = TGUI_WINDOW_LOADING + fatally_errored = FALSE + // Build window options + var/options = "file=[id].html;can_minimize=0;auto_format=0;" + // Remove titlebar and resize handles for a fancy window + if(fancy) + options += "titlebar=0;can_resize=0;" + else + options += "titlebar=1;can_resize=1;" + // Generate page html + var/html = SStgui.basehtml + html = replacetextEx(html, "\[tgui:windowId]", id) + // Process inline assets + var/inline_styles = "" + var/inline_scripts = "" + for(var/datum/asset/asset in inline_assets) + var/mappings = asset.get_url_mappings() + for(var/name in mappings) + var/url = mappings[name] + // Not urlencoding since asset strings are considered safe + if(copytext(name, -4) == ".css") + inline_styles += "\n" + else if(copytext(name, -3) == ".js") + inline_scripts += "\n" + asset.send(client) + html = replacetextEx(html, "\n", inline_styles) + html = replacetextEx(html, "\n", inline_scripts) + // Inject custom HTML + html = replacetextEx(html, "\n", inline_html) + // Open the window + client << browse(html, "window=[id];[options]") + // Instruct the client to signal UI when the window is closed. + winset(client, id, "on-close=\"uiclose [id]\"") + // Detect whether the control is a browser + is_browser = winexists(client, id) == "BROWSER" + +/** + * public + * + * Checks if the window is ready to receive data. + * + * return bool + */ +/datum/tgui_window/proc/is_ready() + return status == TGUI_WINDOW_READY + +/** + * public + * + * Checks if the window can be sanely suspended. + * + * return bool + */ +/datum/tgui_window/proc/can_be_suspended() + return !fatally_errored \ + && pooled \ + && pool_index > 0 \ + && pool_index <= TGUI_WINDOW_SOFT_LIMIT \ + && status == TGUI_WINDOW_READY + +/** + * public + * + * Acquire the window lock. Pool will not be able to provide this window + * to other UIs for the duration of the lock. + * + * Can be given an optional tgui datum, which will be automatically + * subscribed to incoming messages via the on_message proc. + * + * optional ui /datum/tgui + */ +/datum/tgui_window/proc/acquire_lock(datum/tgui/ui) + locked = TRUE + locked_by = ui + +/** + * public + * + * Release the window lock. + */ +/datum/tgui_window/proc/release_lock() + // Clean up assets sent by tgui datum which requested the lock + if(locked) + sent_assets = list() + locked = FALSE + locked_by = null + +/** + * public + * + * Subscribes the datum to consume window messages on a specified proc. + * + * Note, that this supports only one subscriber, because code for that + * is simpler and therefore faster. If necessary, this can be rewritten + * to support multiple subscribers. + */ +/datum/tgui_window/proc/subscribe(datum/object, delegate) + subscriber_object = object + subscriber_delegate = delegate + +/** + * public + * + * Unsubscribes the datum. Do not forget to call this when cleaning up. + */ +/datum/tgui_window/proc/unsubscribe(datum/object) + subscriber_object = null + subscriber_delegate = null + +/** + * public + * + * Close the UI. + * + * optional can_be_suspended bool + */ +/datum/tgui_window/proc/close(can_be_suspended = TRUE) + if(!client) + return + if(can_be_suspended && can_be_suspended()) + log_tgui(client, + context = "[id]/close (suspending)", + window = src) + status = TGUI_WINDOW_READY + send_message("suspend") + return + log_tgui(client, + context = "[id]/close", + window = src) + release_lock() + status = TGUI_WINDOW_CLOSED + message_queue = null + // Do not close the window to give user some time + // to read the error message. + if(!fatally_errored) + client << browse(null, "window=[id]") + +/** + * public + * + * Sends a message to tgui window. + * + * required type string Message type + * required payload list Message payload + * optional force bool Send regardless of the ready status. + */ +/datum/tgui_window/proc/send_message(type, payload, force) + if(!client) + return + var/message = TGUI_CREATE_MESSAGE(type, payload) + // Place into queue if window is still loading + if(!force && status != TGUI_WINDOW_READY) + if(!message_queue) + message_queue = list() + message_queue += list(message) + return + client << output(message, is_browser \ + ? "[id]:update" \ + : "[id].browser:update") + +/** + * public + * + * Sends a raw payload to tgui window. + * + * required message string JSON+urlencoded blob to send. + * optional force bool Send regardless of the ready status. + */ +/datum/tgui_window/proc/send_raw_message(message, force) + if(!client) + return + // Place into queue if window is still loading + if(!force && status != TGUI_WINDOW_READY) + if(!message_queue) + message_queue = list() + message_queue += list(message) + return + client << output(message, is_browser \ + ? "[id]:update" \ + : "[id].browser:update") + +/** + * public + * + * Makes an asset available to use in tgui. + * + * required asset datum/asset + * + * return bool - TRUE if any assets had to be sent to the client + */ +/datum/tgui_window/proc/send_asset(datum/asset/asset) + if(!client || !asset) + return + sent_assets |= list(asset) + . = asset.send(client) + if(istype(asset, /datum/asset/spritesheet)) + var/datum/asset/spritesheet/spritesheet = asset + send_message("asset/stylesheet", spritesheet.css_filename()) + send_message("asset/mappings", asset.get_url_mappings()) + +/** + * private + * + * Sends queued messages if the queue wasn't empty. + */ +/datum/tgui_window/proc/flush_message_queue() + if(!client || !message_queue) + return + for(var/message in message_queue) + client << output(message, is_browser \ + ? "[id]:update" \ + : "[id].browser:update") + message_queue = null + +/** + * private + * + * Callback for handling incoming tgui messages. + */ +/datum/tgui_window/proc/on_message(type, payload, href_list) + // Status can be READY if user has refreshed the window. + if(type == "ready" && status == TGUI_WINDOW_READY) + // Resend the assets + for(var/asset in sent_assets) + send_asset(asset) + // Mark this window as fatally errored which prevents it from + // being suspended. + if(type == "log" && href_list["fatal"]) + fatally_errored = TRUE + // Mark window as ready since we received this message from somewhere + if(status != TGUI_WINDOW_READY) + status = TGUI_WINDOW_READY + flush_message_queue() + // Pass message to UI that requested the lock + if(locked && locked_by) + var/prevent_default = locked_by.on_message(type, payload, href_list) + if(prevent_default) + return + // Pass message to the subscriber + else if(subscriber_object) + var/prevent_default = call( + subscriber_object, + subscriber_delegate)(type, payload, href_list) + if(prevent_default) + return + // If not locked, handle these message types + switch(type) + if("ping") + send_message("pingReply", payload) + if("suspend") + close(can_be_suspended = TRUE) + if("close") + close(can_be_suspended = FALSE) + if("openLink") + client << link(href_list["url"]) + if("cacheReloaded") + // Reinitialize + initialize(inline_assets = inline_assets, fancy = fancy) + // Resend the assets + for(var/asset in sent_assets) + send_asset(asset) diff --git a/code/modules/tgui_panel/audio.dm b/code/modules/tgui_panel/audio.dm new file mode 100644 index 00000000000..91250e4bca9 --- /dev/null +++ b/code/modules/tgui_panel/audio.dm @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/// Admin music volume, from 0 to 1. +/client/var/admin_music_volume = 1 + +/** + * public + * + * Sends music data to the browser. + * + * Optional settings: + * - pitch: the playback rate + * - start: the start time of the sound + * - end: when the musics stops playing + * + * required url string Must be an https URL. + * optional extra_data list Optional settings. + */ +/datum/tgui_panel/proc/play_music(url, extra_data) + if(!is_ready()) + return + if(!findtext(url, is_http_protocol)) + return + var/list/payload = list() + if(length(extra_data) > 0) + for(var/key in extra_data) + payload[key] = extra_data[key] + payload["url"] = url + window.send_message("audio/playMusic", payload) + +/** + * public + * + * Stops playing music through the browser. + */ +/datum/tgui_panel/proc/stop_music() + if(!is_ready()) + return + window.send_message("audio/stopMusic") diff --git a/code/modules/tgui_panel/external.dm b/code/modules/tgui_panel/external.dm new file mode 100644 index 00000000000..fd892728aac --- /dev/null +++ b/code/modules/tgui_panel/external.dm @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/client/var/datum/tgui_panel/tgui_panel + +/** + * tgui panel / chat troubleshooting verb + */ +/client/verb/fix_tgui_panel() + set name = "Fix chat" + set category = "OOC" + var/action + log_tgui(src, "Started fixing.", context = "verb/fix_tgui_panel") + + nuke_chat() + + // Failed to fix + action = alert(src, "Did that work?", "", "Yes", "No, switch to old ui") + if (action == "No, switch to old ui") + winset(src, "output", "on-show=&is-disabled=0&is-visible=1") + winset(src, "browseroutput", "is-disabled=1;is-visible=0") + log_tgui(src, "Failed to fix.", context = "verb/fix_tgui_panel") + +/client/proc/nuke_chat() + // Catch all solution (kick the whole thing in the pants) + winset(src, "output", "on-show=&is-disabled=0&is-visible=1") + winset(src, "browseroutput", "is-disabled=1;is-visible=0") + if(!tgui_panel || !istype(tgui_panel)) + log_tgui(src, "tgui_panel datum is missing", + context = "verb/fix_tgui_panel") + tgui_panel = new(src) + tgui_panel.initialize(force = TRUE) + // Force show the panel to see if there are any errors + winset(src, "output", "is-disabled=1&is-visible=0") + winset(src, "browseroutput", "is-disabled=0;is-visible=1") diff --git a/code/modules/tgui_panel/telemetry.dm b/code/modules/tgui_panel/telemetry.dm new file mode 100644 index 00000000000..79087d8500c --- /dev/null +++ b/code/modules/tgui_panel/telemetry.dm @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * Maximum number of connection records allowed to analyze. + * Should match the value set in the browser. + */ +#define TGUI_TELEMETRY_MAX_CONNECTIONS 5 + +/** + * Maximum time allocated for sending a telemetry packet. + */ +#define TGUI_TELEMETRY_RESPONSE_WINDOW 30 SECONDS + +/// Time of telemetry request +/datum/tgui_panel/var/telemetry_requested_at +/// Time of telemetry analysis completion +/datum/tgui_panel/var/telemetry_analyzed_at +/// List of previous client connections +/datum/tgui_panel/var/list/telemetry_connections + +/** + * private + * + * Requests some telemetry from the client. + */ +/datum/tgui_panel/proc/request_telemetry() + telemetry_requested_at = world.time + telemetry_analyzed_at = null + window.send_message("telemetry/request", list( + "limits" = list( + "connections" = TGUI_TELEMETRY_MAX_CONNECTIONS, + ), + )) + +/** + * private + * + * Analyzes a telemetry packet. + * + * Is currently only useful for detecting ban evasion attempts. + */ +/datum/tgui_panel/proc/analyze_telemetry(payload) + if(world.time > telemetry_requested_at + TGUI_TELEMETRY_RESPONSE_WINDOW) + message_admins("[key_name(client)] sent telemetry outside of the allocated time window.") + return + if(telemetry_analyzed_at) + message_admins("[key_name(client)] sent telemetry more than once.") + return + telemetry_analyzed_at = world.time + if(!payload) + return + telemetry_connections = payload["connections"] + var/len = length(telemetry_connections) + if(len == 0) + return + if(len > TGUI_TELEMETRY_MAX_CONNECTIONS) + message_admins("[key_name(client)] was kicked for sending a huge telemetry payload") + qdel(client) + return + var/list/found + for(var/i in 1 to len) + if(QDELETED(client)) + // He got cleaned up before we were done + return + var/list/row = telemetry_connections[i] + // Check for a malformed history object + if (!row || row.len < 3 || (!row["ckey"] || !row["address"] || !row["computer_id"])) + return + if (world.IsBanned(row["ckey"], row["address"], row["computer_id"], real_bans_only = TRUE)) + found = row + break + CHECK_TICK + // This fucker has a history of playing on a banned account. + if(found) + var/msg = "[key_name(client)] has a banned account in connection history! (Matched: [found["ckey"]], [found["address"]], [found["computer_id"]])" + message_admins(msg) + log_admin_private(msg) diff --git a/code/modules/tgui_panel/tgui_panel.dm b/code/modules/tgui_panel/tgui_panel.dm new file mode 100644 index 00000000000..dae7ae3d242 --- /dev/null +++ b/code/modules/tgui_panel/tgui_panel.dm @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +/** + * tgui_panel datum + * Hosts tgchat and other nice features. + */ +/datum/tgui_panel + var/client/client + var/datum/tgui_window/window + var/broken = FALSE + var/initialized_at + +/datum/tgui_panel/New(client/client) + src.client = client + window = new(client, "browseroutput") + window.subscribe(src, .proc/on_message) + +/datum/tgui_panel/Del() + window.unsubscribe(src) + window.close() + return ..() + +/** + * public + * + * TRUE if panel is initialized and ready to receive messages. + */ +/datum/tgui_panel/proc/is_ready() + return !broken && window.is_ready() + +/** + * public + * + * Initializes tgui panel. + */ +/datum/tgui_panel/proc/initialize(force = FALSE) + initialized_at = world.time + // Perform a clean initialization + window.initialize(inline_assets = list( + get_asset_datum(/datum/asset/simple/tgui_common), + get_asset_datum(/datum/asset/simple/tgui_panel), + )) + window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome)) + window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat)) + request_telemetry() + addtimer(CALLBACK(src, .proc/on_initialize_timed_out), 2 SECONDS) + +/** + * private + * + * Called when initialization has timed out. + */ +/datum/tgui_panel/proc/on_initialize_timed_out() + // Currently does nothing but sending a message to old chat. + SEND_TEXT(client, "Failed to load fancy chat, click HERE to attempt to reload it.") + +/** + * private + * + * Callback for handling incoming tgui messages. + */ +/datum/tgui_panel/proc/on_message(type, payload) + if(type == "ready") + broken = FALSE + window.send_message("update", list( + "config" = list( + "client" = list( + "ckey" = client.ckey, + "address" = client.address, + "computer_id" = client.computer_id, + ), + "window" = list( + "fancy" = FALSE, + "locked" = FALSE, + ), + ), + )) + return TRUE + if(type == "audio/setAdminMusicVolume") + client.admin_music_volume = payload["volume"] + return TRUE + if(type == "telemetry") + analyze_telemetry(payload) + return TRUE + +/** + * public + * + * Sends a round restart notification. + */ +/datum/tgui_panel/proc/send_roundrestart() + window.send_message("roundrestart") diff --git a/config/config.txt b/config/config.txt index d465f6d00ec..83c66aeded4 100644 --- a/config/config.txt +++ b/config/config.txt @@ -20,7 +20,15 @@ $include entries/lobby.txt ## Uncomment to enable minimap generation MINIMAPS_ENABLED - + +## System command that invokes youtube-dl, used by Play Internet Sound. +## You can install youtube-dl with +## "pip install youtube-dl" if you have pip installed +## from https://github.com/rg3/youtube-dl/releases +## or your package manager +## The default value assumes youtube-dl is in your system PATH +# INVOKE_YOUTUBEDL youtube-dl + ## CLIENT VERSION CONTROL ## This allows you to configure the minimum required client version, as well as a warning version, and message for both. ## These trigger for any version below (non-inclusive) the given version, so 510 triggers on 509 or lower. diff --git a/html/font-awesome/README.MD b/html/font-awesome/README.MD new file mode 100644 index 00000000000..7d693c36f03 --- /dev/null +++ b/html/font-awesome/README.MD @@ -0,0 +1,6 @@ +Due to the fact browse_rsc can't create subdirectories, every time you update font-awesome you'll need to change relative webfont references in all.min.css +eg ../webfonts/fa-regular-400.ttf => fa-regular-400.ttf (or whatever you call it in asset datum) + +Second change is ripping out file types other than woff and eot(ie8) from the css + +Finally, removing brand related css. \ No newline at end of file diff --git a/html/font-awesome/css/all.min.css b/html/font-awesome/css/all.min.css new file mode 100644 index 00000000000..e7cdfffe751 --- /dev/null +++ b/html/font-awesome/css/all.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.9.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(fa-regular-400.eot);src:url(fa-regular-400.eot?#iefix) format("embedded-opentype"),url(fa-regular-400.woff) format("woff")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(fa-solid-900.eot);src:url(fa-solid-900.eot?#iefix) format("embedded-opentype"),url(fa-solid-900.woff) format("woff")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/html/font-awesome/css/v4-shims.min.css b/html/font-awesome/css/v4-shims.min.css new file mode 100644 index 00000000000..5f3fdc598c8 --- /dev/null +++ b/html/font-awesome/css/v4-shims.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.9.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa.fa-glass:before{content:"\f000"}.fa.fa-meetup{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-star-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-o:before{content:"\f005"}.fa.fa-close:before,.fa.fa-remove:before{content:"\f00d"}.fa.fa-gear:before{content:"\f013"}.fa.fa-trash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-trash-o:before{content:"\f2ed"}.fa.fa-file-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-o:before{content:"\f15b"}.fa.fa-clock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-clock-o:before{content:"\f017"}.fa.fa-arrow-circle-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-down:before{content:"\f358"}.fa.fa-arrow-circle-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-up:before{content:"\f35b"}.fa.fa-play-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-play-circle-o:before{content:"\f144"}.fa.fa-repeat:before,.fa.fa-rotate-right:before{content:"\f01e"}.fa.fa-refresh:before{content:"\f021"}.fa.fa-list-alt{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dedent:before{content:"\f03b"}.fa.fa-video-camera:before{content:"\f03d"}.fa.fa-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-picture-o:before{content:"\f03e"}.fa.fa-photo{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-photo:before{content:"\f03e"}.fa.fa-image{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-image:before{content:"\f03e"}.fa.fa-pencil:before{content:"\f303"}.fa.fa-map-marker:before{content:"\f3c5"}.fa.fa-pencil-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pencil-square-o:before{content:"\f044"}.fa.fa-share-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-share-square-o:before{content:"\f14d"}.fa.fa-check-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-square-o:before{content:"\f14a"}.fa.fa-arrows:before{content:"\f0b2"}.fa.fa-times-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-circle-o:before{content:"\f057"}.fa.fa-check-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-circle-o:before{content:"\f058"}.fa.fa-mail-forward:before{content:"\f064"}.fa.fa-eye,.fa.fa-eye-slash{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-warning:before{content:"\f071"}.fa.fa-calendar:before{content:"\f073"}.fa.fa-arrows-v:before{content:"\f338"}.fa.fa-arrows-h:before{content:"\f337"}.fa.fa-bar-chart{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart:before{content:"\f080"}.fa.fa-bar-chart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart-o:before{content:"\f080"}.fa.fa-facebook-square,.fa.fa-twitter-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gears:before{content:"\f085"}.fa.fa-thumbs-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-up:before{content:"\f164"}.fa.fa-thumbs-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-down:before{content:"\f165"}.fa.fa-heart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-heart-o:before{content:"\f004"}.fa.fa-sign-out:before{content:"\f2f5"}.fa.fa-linkedin-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin-square:before{content:"\f08c"}.fa.fa-thumb-tack:before{content:"\f08d"}.fa.fa-external-link:before{content:"\f35d"}.fa.fa-sign-in:before{content:"\f2f6"}.fa.fa-github-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-lemon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lemon-o:before{content:"\f094"}.fa.fa-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-square-o:before{content:"\f0c8"}.fa.fa-bookmark-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bookmark-o:before{content:"\f02e"}.fa.fa-facebook,.fa.fa-twitter{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook:before{content:"\f39e"}.fa.fa-facebook-f{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-f:before{content:"\f39e"}.fa.fa-github{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-feed:before{content:"\f09e"}.fa.fa-hdd-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hdd-o:before{content:"\f0a0"}.fa.fa-hand-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-right:before{content:"\f0a4"}.fa.fa-hand-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-left:before{content:"\f0a5"}.fa.fa-hand-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-up:before{content:"\f0a6"}.fa.fa-hand-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-down:before{content:"\f0a7"}.fa.fa-arrows-alt:before{content:"\f31e"}.fa.fa-group:before{content:"\f0c0"}.fa.fa-chain:before{content:"\f0c1"}.fa.fa-scissors:before{content:"\f0c4"}.fa.fa-files-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-files-o:before{content:"\f0c5"}.fa.fa-floppy-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-floppy-o:before{content:"\f0c7"}.fa.fa-navicon:before,.fa.fa-reorder:before{content:"\f0c9"}.fa.fa-google-plus,.fa.fa-google-plus-square,.fa.fa-pinterest,.fa.fa-pinterest-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus:before{content:"\f0d5"}.fa.fa-money{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-money:before{content:"\f3d1"}.fa.fa-unsorted:before{content:"\f0dc"}.fa.fa-sort-desc:before{content:"\f0dd"}.fa.fa-sort-asc:before{content:"\f0de"}.fa.fa-linkedin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin:before{content:"\f0e1"}.fa.fa-rotate-left:before{content:"\f0e2"}.fa.fa-legal:before{content:"\f0e3"}.fa.fa-dashboard:before,.fa.fa-tachometer:before{content:"\f3fd"}.fa.fa-comment-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comment-o:before{content:"\f075"}.fa.fa-comments-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comments-o:before{content:"\f086"}.fa.fa-flash:before{content:"\f0e7"}.fa.fa-clipboard,.fa.fa-paste{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paste:before{content:"\f328"}.fa.fa-lightbulb-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lightbulb-o:before{content:"\f0eb"}.fa.fa-exchange:before{content:"\f362"}.fa.fa-cloud-download:before{content:"\f381"}.fa.fa-cloud-upload:before{content:"\f382"}.fa.fa-bell-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-o:before{content:"\f0f3"}.fa.fa-cutlery:before{content:"\f2e7"}.fa.fa-file-text-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-text-o:before{content:"\f15c"}.fa.fa-building-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-building-o:before{content:"\f1ad"}.fa.fa-hospital-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hospital-o:before{content:"\f0f8"}.fa.fa-tablet:before{content:"\f3fa"}.fa.fa-mobile-phone:before,.fa.fa-mobile:before{content:"\f3cd"}.fa.fa-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-o:before{content:"\f111"}.fa.fa-mail-reply:before{content:"\f3e5"}.fa.fa-github-alt{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-folder-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-o:before{content:"\f07b"}.fa.fa-folder-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-open-o:before{content:"\f07c"}.fa.fa-smile-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-smile-o:before{content:"\f118"}.fa.fa-frown-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-frown-o:before{content:"\f119"}.fa.fa-meh-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-meh-o:before{content:"\f11a"}.fa.fa-keyboard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-keyboard-o:before{content:"\f11c"}.fa.fa-flag-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-flag-o:before{content:"\f024"}.fa.fa-mail-reply-all:before{content:"\f122"}.fa.fa-star-half-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-o:before{content:"\f089"}.fa.fa-star-half-empty{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-empty:before{content:"\f089"}.fa.fa-star-half-full{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-full:before{content:"\f089"}.fa.fa-code-fork:before{content:"\f126"}.fa.fa-chain-broken:before{content:"\f127"}.fa.fa-shield:before{content:"\f3ed"}.fa.fa-calendar-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-o:before{content:"\f133"}.fa.fa-css3,.fa.fa-html5,.fa.fa-maxcdn{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ticket:before{content:"\f3ff"}.fa.fa-minus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-minus-square-o:before{content:"\f146"}.fa.fa-level-up:before{content:"\f3bf"}.fa.fa-level-down:before{content:"\f3be"}.fa.fa-pencil-square:before{content:"\f14b"}.fa.fa-external-link-square:before{content:"\f360"}.fa.fa-compass{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down:before{content:"\f150"}.fa.fa-toggle-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-down:before{content:"\f150"}.fa.fa-caret-square-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-up:before{content:"\f151"}.fa.fa-toggle-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-up:before{content:"\f151"}.fa.fa-caret-square-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-right:before{content:"\f152"}.fa.fa-toggle-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-right:before{content:"\f152"}.fa.fa-eur:before,.fa.fa-euro:before{content:"\f153"}.fa.fa-gbp:before{content:"\f154"}.fa.fa-dollar:before,.fa.fa-usd:before{content:"\f155"}.fa.fa-inr:before,.fa.fa-rupee:before{content:"\f156"}.fa.fa-cny:before,.fa.fa-jpy:before,.fa.fa-rmb:before,.fa.fa-yen:before{content:"\f157"}.fa.fa-rouble:before,.fa.fa-rub:before,.fa.fa-ruble:before{content:"\f158"}.fa.fa-krw:before,.fa.fa-won:before{content:"\f159"}.fa.fa-bitcoin,.fa.fa-btc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitcoin:before{content:"\f15a"}.fa.fa-file-text:before{content:"\f15c"}.fa.fa-sort-alpha-asc:before{content:"\f15d"}.fa.fa-sort-alpha-desc:before{content:"\f15e"}.fa.fa-sort-amount-asc:before{content:"\f160"}.fa.fa-sort-amount-desc:before{content:"\f161"}.fa.fa-sort-numeric-asc:before{content:"\f162"}.fa.fa-sort-numeric-desc:before{content:"\f163"}.fa.fa-xing,.fa.fa-xing-square,.fa.fa-youtube,.fa.fa-youtube-play,.fa.fa-youtube-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-youtube-play:before{content:"\f167"}.fa.fa-adn,.fa.fa-bitbucket,.fa.fa-bitbucket-square,.fa.fa-dropbox,.fa.fa-flickr,.fa.fa-instagram,.fa.fa-stack-overflow{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitbucket-square:before{content:"\f171"}.fa.fa-tumblr,.fa.fa-tumblr-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-long-arrow-down:before{content:"\f309"}.fa.fa-long-arrow-up:before{content:"\f30c"}.fa.fa-long-arrow-left:before{content:"\f30a"}.fa.fa-long-arrow-right:before{content:"\f30b"}.fa.fa-android,.fa.fa-apple,.fa.fa-dribbble,.fa.fa-foursquare,.fa.fa-gittip,.fa.fa-gratipay,.fa.fa-linux,.fa.fa-skype,.fa.fa-trello,.fa.fa-windows{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gittip:before{content:"\f184"}.fa.fa-sun-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sun-o:before{content:"\f185"}.fa.fa-moon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-moon-o:before{content:"\f186"}.fa.fa-pagelines,.fa.fa-renren,.fa.fa-stack-exchange,.fa.fa-vk,.fa.fa-weibo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-arrow-circle-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-right:before{content:"\f35a"}.fa.fa-arrow-circle-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-left:before{content:"\f359"}.fa.fa-caret-square-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-left:before{content:"\f191"}.fa.fa-toggle-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-left:before{content:"\f191"}.fa.fa-dot-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dot-circle-o:before{content:"\f192"}.fa.fa-vimeo-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-try:before,.fa.fa-turkish-lira:before{content:"\f195"}.fa.fa-plus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-plus-square-o:before{content:"\f0fe"}.fa.fa-openid,.fa.fa-slack,.fa.fa-wordpress{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bank:before,.fa.fa-institution:before{content:"\f19c"}.fa.fa-mortar-board:before{content:"\f19d"}.fa.fa-delicious,.fa.fa-digg,.fa.fa-drupal,.fa.fa-google,.fa.fa-joomla,.fa.fa-pied-piper-alt,.fa.fa-pied-piper-pp,.fa.fa-reddit,.fa.fa-reddit-square,.fa.fa-stumbleupon,.fa.fa-stumbleupon-circle,.fa.fa-yahoo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-spoon:before{content:"\f2e5"}.fa.fa-behance,.fa.fa-behance-square,.fa.fa-steam,.fa.fa-steam-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-automobile:before{content:"\f1b9"}.fa.fa-cab:before{content:"\f1ba"}.fa.fa-envelope-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-o:before{content:"\f0e0"}.fa.fa-deviantart,.fa.fa-soundcloud{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-file-pdf-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-pdf-o:before{content:"\f1c1"}.fa.fa-file-word-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-word-o:before{content:"\f1c2"}.fa.fa-file-excel-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-excel-o:before{content:"\f1c3"}.fa.fa-file-powerpoint-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-powerpoint-o:before{content:"\f1c4"}.fa.fa-file-image-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-image-o:before{content:"\f1c5"}.fa.fa-file-photo-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-photo-o:before{content:"\f1c5"}.fa.fa-file-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-picture-o:before{content:"\f1c5"}.fa.fa-file-archive-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-archive-o:before{content:"\f1c6"}.fa.fa-file-zip-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-zip-o:before{content:"\f1c6"}.fa.fa-file-audio-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-audio-o:before{content:"\f1c7"}.fa.fa-file-sound-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-sound-o:before{content:"\f1c7"}.fa.fa-file-video-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-video-o:before{content:"\f1c8"}.fa.fa-file-movie-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-movie-o:before{content:"\f1c8"}.fa.fa-file-code-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-code-o:before{content:"\f1c9"}.fa.fa-codepen,.fa.fa-jsfiddle,.fa.fa-vine{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-life-bouy,.fa.fa-life-ring{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-bouy:before{content:"\f1cd"}.fa.fa-life-buoy{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-buoy:before{content:"\f1cd"}.fa.fa-life-saver{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-saver:before{content:"\f1cd"}.fa.fa-support{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-support:before{content:"\f1cd"}.fa.fa-circle-o-notch:before{content:"\f1ce"}.fa.fa-ra,.fa.fa-rebel{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ra:before{content:"\f1d0"}.fa.fa-resistance{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-resistance:before{content:"\f1d0"}.fa.fa-empire,.fa.fa-ge{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ge:before{content:"\f1d1"}.fa.fa-git,.fa.fa-git-square,.fa.fa-hacker-news,.fa.fa-y-combinator-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-y-combinator-square:before{content:"\f1d4"}.fa.fa-yc-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc-square:before{content:"\f1d4"}.fa.fa-qq,.fa.fa-tencent-weibo,.fa.fa-wechat,.fa.fa-weixin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wechat:before{content:"\f1d7"}.fa.fa-send:before{content:"\f1d8"}.fa.fa-paper-plane-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paper-plane-o:before{content:"\f1d8"}.fa.fa-send-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-send-o:before{content:"\f1d8"}.fa.fa-circle-thin{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-thin:before{content:"\f111"}.fa.fa-header:before{content:"\f1dc"}.fa.fa-sliders:before{content:"\f1de"}.fa.fa-futbol-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-futbol-o:before{content:"\f1e3"}.fa.fa-soccer-ball-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-soccer-ball-o:before{content:"\f1e3"}.fa.fa-slideshare,.fa.fa-twitch,.fa.fa-yelp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-newspaper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-newspaper-o:before{content:"\f1ea"}.fa.fa-cc-amex,.fa.fa-cc-discover,.fa.fa-cc-mastercard,.fa.fa-cc-paypal,.fa.fa-cc-stripe,.fa.fa-cc-visa,.fa.fa-google-wallet,.fa.fa-paypal{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bell-slash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-slash-o:before{content:"\f1f6"}.fa.fa-trash:before{content:"\f2ed"}.fa.fa-copyright{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-eyedropper:before{content:"\f1fb"}.fa.fa-area-chart:before{content:"\f1fe"}.fa.fa-pie-chart:before{content:"\f200"}.fa.fa-line-chart:before{content:"\f201"}.fa.fa-angellist,.fa.fa-ioxhost,.fa.fa-lastfm,.fa.fa-lastfm-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-cc{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-cc:before{content:"\f20a"}.fa.fa-ils:before,.fa.fa-shekel:before,.fa.fa-sheqel:before{content:"\f20b"}.fa.fa-meanpath{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-meanpath:before{content:"\f2b4"}.fa.fa-buysellads,.fa.fa-connectdevelop,.fa.fa-dashcube,.fa.fa-forumbee,.fa.fa-leanpub,.fa.fa-sellsy,.fa.fa-shirtsinbulk,.fa.fa-simplybuilt,.fa.fa-skyatlas{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-diamond{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-diamond:before{content:"\f3a5"}.fa.fa-intersex:before{content:"\f224"}.fa.fa-facebook-official{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-official:before{content:"\f09a"}.fa.fa-pinterest-p,.fa.fa-whatsapp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-hotel:before{content:"\f236"}.fa.fa-medium,.fa.fa-viacoin,.fa.fa-y-combinator,.fa.fa-yc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc:before{content:"\f23b"}.fa.fa-expeditedssl,.fa.fa-opencart,.fa.fa-optin-monster{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-battery-4:before,.fa.fa-battery:before{content:"\f240"}.fa.fa-battery-3:before{content:"\f241"}.fa.fa-battery-2:before{content:"\f242"}.fa.fa-battery-1:before{content:"\f243"}.fa.fa-battery-0:before{content:"\f244"}.fa.fa-object-group,.fa.fa-object-ungroup,.fa.fa-sticky-note-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sticky-note-o:before{content:"\f249"}.fa.fa-cc-diners-club,.fa.fa-cc-jcb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-clone,.fa.fa-hourglass-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hourglass-o:before{content:"\f254"}.fa.fa-hourglass-1:before{content:"\f251"}.fa.fa-hourglass-2:before{content:"\f252"}.fa.fa-hourglass-3:before{content:"\f253"}.fa.fa-hand-rock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-rock-o:before{content:"\f255"}.fa.fa-hand-grab-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-grab-o:before{content:"\f255"}.fa.fa-hand-paper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-paper-o:before{content:"\f256"}.fa.fa-hand-stop-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-stop-o:before{content:"\f256"}.fa.fa-hand-scissors-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-scissors-o:before{content:"\f257"}.fa.fa-hand-lizard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-lizard-o:before{content:"\f258"}.fa.fa-hand-spock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-spock-o:before{content:"\f259"}.fa.fa-hand-pointer-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-pointer-o:before{content:"\f25a"}.fa.fa-hand-peace-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-peace-o:before{content:"\f25b"}.fa.fa-registered{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-chrome,.fa.fa-creative-commons,.fa.fa-firefox,.fa.fa-get-pocket,.fa.fa-gg,.fa.fa-gg-circle,.fa.fa-internet-explorer,.fa.fa-odnoklassniki,.fa.fa-odnoklassniki-square,.fa.fa-opera,.fa.fa-safari,.fa.fa-tripadvisor,.fa.fa-wikipedia-w{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-television:before{content:"\f26c"}.fa.fa-500px,.fa.fa-amazon,.fa.fa-contao{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-calendar-plus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-plus-o:before{content:"\f271"}.fa.fa-calendar-minus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-minus-o:before{content:"\f272"}.fa.fa-calendar-times-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-times-o:before{content:"\f273"}.fa.fa-calendar-check-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-check-o:before{content:"\f274"}.fa.fa-map-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-map-o:before{content:"\f279"}.fa.fa-commenting:before{content:"\f4ad"}.fa.fa-commenting-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-commenting-o:before{content:"\f4ad"}.fa.fa-houzz,.fa.fa-vimeo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-vimeo:before{content:"\f27d"}.fa.fa-black-tie,.fa.fa-edge,.fa.fa-fonticons,.fa.fa-reddit-alien{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card-alt:before{content:"\f09d"}.fa.fa-codiepie,.fa.fa-fort-awesome,.fa.fa-mixcloud,.fa.fa-modx,.fa.fa-product-hunt,.fa.fa-scribd,.fa.fa-usb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-pause-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pause-circle-o:before{content:"\f28b"}.fa.fa-stop-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-stop-circle-o:before{content:"\f28d"}.fa.fa-bluetooth,.fa.fa-bluetooth-b,.fa.fa-envira,.fa.fa-gitlab,.fa.fa-wheelchair-alt,.fa.fa-wpbeginner,.fa.fa-wpforms{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wheelchair-alt:before{content:"\f368"}.fa.fa-question-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-question-circle-o:before{content:"\f059"}.fa.fa-volume-control-phone:before{content:"\f2a0"}.fa.fa-asl-interpreting:before{content:"\f2a3"}.fa.fa-deafness:before,.fa.fa-hard-of-hearing:before{content:"\f2a4"}.fa.fa-glide,.fa.fa-glide-g{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-signing:before{content:"\f2a7"}.fa.fa-first-order,.fa.fa-google-plus-official,.fa.fa-pied-piper,.fa.fa-snapchat,.fa.fa-snapchat-ghost,.fa.fa-snapchat-square,.fa.fa-themeisle,.fa.fa-viadeo,.fa.fa-viadeo-square,.fa.fa-yoast{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-official:before{content:"\f2b3"}.fa.fa-google-plus-circle{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-circle:before{content:"\f2b3"}.fa.fa-fa,.fa.fa-font-awesome{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-fa:before{content:"\f2b4"}.fa.fa-handshake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-handshake-o:before{content:"\f2b5"}.fa.fa-envelope-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-open-o:before{content:"\f2b6"}.fa.fa-linode{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-address-book-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-book-o:before{content:"\f2b9"}.fa.fa-vcard:before{content:"\f2bb"}.fa.fa-address-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-card-o:before{content:"\f2bb"}.fa.fa-vcard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-vcard-o:before{content:"\f2bb"}.fa.fa-user-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-circle-o:before{content:"\f2bd"}.fa.fa-user-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-o:before{content:"\f007"}.fa.fa-id-badge{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license:before{content:"\f2c2"}.fa.fa-id-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-id-card-o:before{content:"\f2c2"}.fa.fa-drivers-license-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license-o:before{content:"\f2c2"}.fa.fa-free-code-camp,.fa.fa-quora,.fa.fa-telegram{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-thermometer-4:before,.fa.fa-thermometer:before{content:"\f2c7"}.fa.fa-thermometer-3:before{content:"\f2c8"}.fa.fa-thermometer-2:before{content:"\f2c9"}.fa.fa-thermometer-1:before{content:"\f2ca"}.fa.fa-thermometer-0:before{content:"\f2cb"}.fa.fa-bathtub:before,.fa.fa-s15:before{content:"\f2cd"}.fa.fa-window-maximize,.fa.fa-window-restore{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle:before{content:"\f410"}.fa.fa-window-close-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-window-close-o:before{content:"\f410"}.fa.fa-times-rectangle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle-o:before{content:"\f410"}.fa.fa-bandcamp,.fa.fa-eercast,.fa.fa-etsy,.fa.fa-grav,.fa.fa-imdb,.fa.fa-ravelry{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-eercast:before{content:"\f2da"}.fa.fa-snowflake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-snowflake-o:before{content:"\f2dc"}.fa.fa-spotify,.fa.fa-superpowers,.fa.fa-wpexplorer{font-family:"Font Awesome 5 Brands";font-weight:400} \ No newline at end of file diff --git a/html/font-awesome/webfonts/fa-regular-400.eot b/html/font-awesome/webfonts/fa-regular-400.eot new file mode 100644 index 00000000000..d62be2fad88 Binary files /dev/null and b/html/font-awesome/webfonts/fa-regular-400.eot differ diff --git a/html/font-awesome/webfonts/fa-regular-400.woff b/html/font-awesome/webfonts/fa-regular-400.woff new file mode 100644 index 00000000000..43b1a9ae49d Binary files /dev/null and b/html/font-awesome/webfonts/fa-regular-400.woff differ diff --git a/html/font-awesome/webfonts/fa-solid-900.eot b/html/font-awesome/webfonts/fa-solid-900.eot new file mode 100644 index 00000000000..c77baa8d46a Binary files /dev/null and b/html/font-awesome/webfonts/fa-solid-900.eot differ diff --git a/html/font-awesome/webfonts/fa-solid-900.woff b/html/font-awesome/webfonts/fa-solid-900.woff new file mode 100644 index 00000000000..77c1786227f Binary files /dev/null and b/html/font-awesome/webfonts/fa-solid-900.woff differ diff --git a/interface/skin.dmf b/interface/skin.dmf index 4c1008796b1..3a4ccfb43ae 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -94,7 +94,7 @@ menu "menu" command = "" saved-params = "is-checked" elem - name = "&Admin help\tF1" + name = "&Admin Help\tF1" command = "adminhelp" category = "&Help" saved-params = "is-checked" @@ -189,38 +189,28 @@ window "mainwindow" elem "mainwindow" type = MAIN pos = 0,0 - size = 1024x768 + size = 640x440 anchor1 = none anchor2 = none - background-color = none is-default = true saved-params = "pos;size;is-minimized;is-maximized" icon = 'icons\\CS13.png' macro = "default" menu = "menu" - elem "mainvsplit" + elem "split" type = CHILD pos = 3,0 - size = 1018x746 + size = 634x417 anchor1 = 0,0 anchor2 = 100,100 - background-color = none saved-params = "splitter" - right = "rpane" + left = "mapwindow" + right = "infowindow" is-vert = true - elem "asset_cache_browser" - type = BROWSER - pos = 0,0 - size = 200x200 - anchor1 = none - anchor2 = none - is-visible = false - auto-format = false - saved-params = "" elem "input" type = INPUT - pos = 3,746 - size = 984x20 + pos = 3,420 + size = 517x20 anchor1 = 0,100 anchor2 = 100,100 background-color = #d3b5b5 @@ -229,29 +219,55 @@ window "mainwindow" saved-params = "command" elem "saybutton" type = BUTTON - pos = 990,746 - size = 30x20 + pos = 600,420 + size = 40x20 anchor1 = 100,100 anchor2 = none - background-color = none saved-params = "is-checked" text = "Chat" - command = ".winset \"saybutton.is-checked=true?input.command=\"!say \\\"\" macrobutton.is-checked=false:input.command=\"" + command = ".winset \"saybutton.is-checked=true ? input.command=\"!say \\\"\" : input.command=\"\"saybutton.is-checked=true ? mebutton.is-checked=false\"\"saybutton.is-checked=true ? oocbutton.is-checked=false\"" button-type = pushbox + elem "oocbutton" + type = BUTTON + pos = 520,420 + size = 40x20 + anchor1 = 100,100 + anchor2 = none + saved-params = "is-checked" + text = "OOC" + command = ".winset \"oocbutton.is-checked=true ? input.command=\"!ooc \\\"\" : input.command=\"\"oocbutton.is-checked=true ? mebutton.is-checked=false\"\"oocbutton.is-checked=true ? saybutton.is-checked=false\"" + button-type = pushbox + elem "mebutton" + type = BUTTON + pos = 560,420 + size = 40x20 + anchor1 = 100,100 + anchor2 = none + saved-params = "is-checked" + text = "Me" + command = ".winset \"mebutton.is-checked=true ? input.command=\"!me \\\"\" : input.command=\"\"mebutton.is-checked=true ? saybutton.is-checked=false\"\"mebutton.is-checked=true ? oocbutton.is-checked=false\"" + button-type = pushbox + elem "asset_cache_browser" + type = BROWSER + pos = 0,0 + size = 200x200 + anchor1 = none + anchor2 = none + is-visible = false + saved-params = "" elem "tooltip" type = BROWSER pos = 0,0 size = 999x999 anchor1 = none anchor2 = none - background-color = none is-visible = false saved-params = "" window "mapwindow" elem "mapwindow" type = MAIN - pos = 418,0 + pos = 0,0 size = 640x480 anchor1 = none anchor2 = none @@ -265,46 +281,123 @@ window "mapwindow" anchor2 = 100,100 font-family = "Arial" font-size = 7 + text-color = none is-default = true - saved-params = "icon-size" - on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\"" - on-hide = ".winset\"mainwindow.mainvsplit.left=\"" + saved-params = "zoom;letterbox;zoom-mode" + style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }" - -window "outputwindow" - elem "outputwindow" +window "infowindow" + elem "infowindow" type = MAIN - pos = 418,0 + pos = 0,0 + size = 640x480 + anchor1 = none + anchor2 = none + saved-params = "pos;size;is-minimized;is-maximized" + is-pane = true + elem "info" + type = CHILD + pos = 0,30 + size = 640x445 + anchor1 = 0,0 + anchor2 = 100,100 + saved-params = "splitter" + left = "statwindow" + right = "outputwindow" + is-vert = false + elem "changelog" + type = BUTTON + pos = 16,5 + size = 104x20 + anchor1 = 3,0 + anchor2 = 19,0 + saved-params = "is-checked" + text = "Changelog" + command = "changelog" + elem "rules" + type = BUTTON + pos = 120,5 + size = 100x20 + anchor1 = 19,0 + anchor2 = 34,0 + saved-params = "is-checked" + text = "Rules" + command = "rules" + elem "wiki" + type = BUTTON + pos = 220,5 + size = 100x20 + anchor1 = 34,0 + anchor2 = 50,0 + saved-params = "is-checked" + text = "Wiki" + command = "wiki" + elem "forum" + type = BUTTON + pos = 320,5 + size = 100x20 + anchor1 = 50,0 + anchor2 = 66,0 + saved-params = "is-checked" + text = "Forum" + command = "forum" + elem "github" + type = BUTTON + pos = 420,5 + size = 100x20 + anchor1 = 66,0 + anchor2 = 81,0 + saved-params = "is-checked" + text = "Github" + command = "github" + elem "report-issue" + type = BUTTON + pos = 520,5 + size = 100x20 + anchor1 = 81,0 + anchor2 = 97,0 + saved-params = "is-checked" + text = "Report Issue" + command = "report-issue" + +window "outputwindow" + elem "outputwindow" + type = MAIN + pos = 0,0 size = 640x480 anchor1 = none anchor2 = none saved-params = "pos;size;is-minimized;is-maximized" - titlebar = false - statusbar = false - can-close = false - can-minimize = false - can-resize = false is-pane = true elem "browseroutput" type = BROWSER pos = 0,0 - size = 640x28 + size = 640x480 anchor1 = 0,0 - anchor2 = 0,5 + anchor2 = 100,100 + background-color = #ffffff is-visible = false is-disabled = true saved-params = "" elem "output" type = OUTPUT - pos = 0,28 - size = 640x452 - anchor1 = 0,5 + pos = 0,0 + size = 640x480 + anchor1 = 0,0 anchor2 = 100,100 is-default = true saved-params = "" + elem "mediapanel" + type = BROWSER + pos = 0,0 + size = 200x200 + anchor1 = none + anchor2 = none + is-visible = false + saved-params = "" -window "rpane" - elem "rpane" +window "statwindow" + elem "statwindow" type = MAIN pos = 372,0 size = 640x480 @@ -312,161 +405,11 @@ window "rpane" anchor2 = none saved-params = "pos;size;is-minimized;is-maximized" is-pane = true - elem "rpanewindow" - type = CHILD - pos = 0,-3 - size = 640x499 - anchor1 = 0,0 - anchor2 = 100,100 - saved-params = "splitter" - right = "outputwindow" - is-vert = false - elem "github" - type = BUTTON - pos = 392,0 - size = 60x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "GitHub" - command = "github" - group = "rpanemode" - elem "mapb" - type = BUTTON - pos = 332,0 - size = 60x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "Map" - command = "map" - group = "rpanemode" - elem "rulesb" - type = BUTTON - pos = 272,0 - size = 60x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "Rules" - command = "rules" - group = "rpanemode" - elem "changelog" - type = BUTTON - pos = 488,0 - size = 67x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "Changelog" - command = "Changelog" - group = "rpanemode" - elem "forumb" - type = BUTTON - pos = 212,0 - size = 60x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "Forum" - command = "forum" - group = "rpanemode" - elem "wikib" - type = BUTTON - pos = 152,0 - size = 60x16 - anchor1 = none - anchor2 = none - saved-params = "is-checked" - text = "Wiki" - command = "wiki" - group = "rpanemode" - elem "textb" - type = BUTTON - pos = 0,0 - size = 60x16 - anchor1 = none - anchor2 = none - is-visible = false - saved-params = "is-checked" - text = "Text" - command = ".winset \"rpanewindow.left=;\"" - is-checked = true - group = "rpanemode" - button-type = pushbox - elem "browseb" - type = BUTTON - pos = 560,0 - size = 60x16 - anchor1 = none - anchor2 = none - is-visible = false - saved-params = "is-checked" - text = "Browser" - command = ".winset \"rpanewindow.left=browserwindow\"" - group = "rpanemode" - button-type = pushbox - elem "infob" - type = BUTTON - pos = 64,0 - size = 60x16 - anchor1 = none - anchor2 = none - is-visible = false - saved-params = "is-checked" - text = "Info" - command = ".winset \"rpanewindow.left=infowindow\"" - group = "rpanemode" - button-type = pushbox - elem "mediapanel" - type = BROWSER - pos = 392,25 - size = 1x1 - anchor1 = none - anchor2 = none - saved-params = "" - -window "browserwindow" - elem "browserwindow" - type = MAIN - pos = 281,0 - size = 640x480 - anchor1 = none - anchor2 = none - saved-params = "pos;size;is-minimized;is-maximized" - title = "Browser" - is-pane = true - elem "browser" - type = BROWSER - pos = 0,0 - size = 640x499 - anchor1 = 0,0 - anchor2 = 100,100 - background-color = #ffffff - is-default = true - saved-params = "" - on-show = ".winset\"rpane.infob.is-visible=true?rpane.infob.pos=130,0;rpane.textb.is-visible=true;rpane.browseb.is-visible=true;rpane.browseb.is-checked=true;rpane.rpanewindow.pos=0,30;rpane.rpanewindow.size=0x0;rpane.rpanewindow.left=browserwindow\"" - on-hide = ".winset\"rpane.infob.is-visible=true?rpane.infob.is-checked=true rpane.infob.pos=65,0 rpane.rpanewindow.left=infowindow:rpane.rpanewindow.left=textwindow rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0\"" - -window "infowindow" - elem "infowindow" - type = MAIN - pos = 281,0 - size = 640x480 - anchor1 = none - anchor2 = none - saved-params = "pos;size;is-minimized;is-maximized" - title = "Info" - is-pane = true - elem "info" + elem "statbrowser" type = INFO pos = 0,0 - size = 638x477 + size = 640x480 anchor1 = 0,0 anchor2 = 100,100 - is-default = true saved-params = "" - highlight-color = #00aa00 - on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" - on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" diff --git a/tgui/packages/tgui-panel/index.js b/tgui/packages/tgui-panel/index.js index 0ba61b385b2..337f8b52f3c 100644 --- a/tgui/packages/tgui-panel/index.js +++ b/tgui/packages/tgui-panel/index.js @@ -93,8 +93,6 @@ const setupApp = () => { 'pos': '0x0', 'size': '0x0', }); - // Absolutely shit workaround for chatbox visiblity. - based_winset(); // Enable hot module reloading if (module.hot) { @@ -114,12 +112,4 @@ const setupApp = () => { } }; -const based_winset = async (based_on_what = 'output') => { - // shitty workaround because winget is async. - const winget_output = await Byond.winget(based_on_what); - Byond.winset('browseroutput', { - 'size': winget_output["size"], - }); -}; - setupApp(); diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index 1107dcbfabe..3c6474032fa 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -1 +1 @@ -!function(e){function t(t){for(var o,a,c=t[0],s=t[1],l=t[2],d=0,g=[];d=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=a.IMAGE_RETRY_LIMIT)d.error("failed to load an image after "+n+" attempts");else{var o=t.src;t.src=null,t.src=o+"#"+n,t.setAttribute("data-reload-n",n+1)}}),a.IMAGE_RETRY_DELAY)},m=function(e){var t=e.node,n=e.times;if(t&&n){var o=t.querySelector(".Chat__badge"),i=o||document.createElement("div");i.textContent=n,i.className=(0,r.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),o||t.appendChild(i)}},v=function(){function t(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new o.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,o=n.scrollHeight,r=n.scrollTop+n.offsetHeight,i=Math.abs(o-r)<24;i!==e.scrollTracking&&(e.scrollTracking=i,e.events.emit("scrollTrackingChanged",i),d.debug("tracking",e.scrollTracking))},this.ensureScrollTracking=function(){e.scrollTracking&&e.scrollToBottom()},setInterval((function(){return e.pruneMessages()}),a.MESSAGE_PRUNE_INTERVAL)}var n=t.prototype;return n.isReady=function(){return this.loaded&&this.rootNode&&this.page},n.mount=function(t){var n=this;this.rootNode?t.appendChild(this.rootNode):this.rootNode=t,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},n.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1&&n.test(e)}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);this.highlightRegex=new RegExp("("+o.join("|")+")","gi"),this.highlightColor=t},n.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},n.changePage=function(e){if(!this.isReady())return this.page=e,void this.tryFlushQueue();this.page=e,this.rootNode.textContent="",this.visibleMessages=[];for(var t,n,o=document.createDocumentFragment(),r=l(this.messages);!(n=r()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,o.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(o),t.scrollIntoView())},n.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,o=n-1,r=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=o;i>=r;i--){var s=this.visibleMessages[i];if(!s.type.startsWith(a.MESSAGE_TYPE_INTERNAL)&&(0,c.isSameMessage)(s,e)&&t0){this.visibleMessages=e.slice(t);for(var n=0;n0&&(this.messages=this.messages.slice(r),d.log("pruned "+r+" stored messages"))}else d.debug("pruning delayed")},n.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),o=l(n);!(e=o()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},n.saveToDisk=function(){if(!Byond.IS_LTE_IE10){for(var e="",t=document.styleSheets,n=0;n\n\n\nSS13 Chat Log\n\n\n\n
\n'+a+"
\n\n\n"]),d=(new Date).toISOString().substring(0,19).replace(/[-:]/g,"").replace("T","-");window.navigator.msSaveBlob(u,"ss13-chatlog-"+d+".html")}},t}();window.__chatRenderer__||(window.__chatRenderer__=new v);var E=window.__chatRenderer__;t.chatRenderer=E}).call(this,n(102).setImmediate)},218:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=t.gameMiddleware=t.useGame=void 0;var o=n(694);t.useGame=o.useGame;var r=n(695);t.gameMiddleware=r.gameMiddleware;var i=n(697);t.gameReducer=i.gameReducer},219:function(e,t,n){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},220:function(e,t,n){"use strict";t.__esModule=!0,t.connectionRestored=t.connectionLost=t.roundRestarted=void 0;var o=n(22),r=(0,o.createAction)("roundrestart");t.roundRestarted=r;var i=(0,o.createAction)("game/connectionLost");t.connectionLost=i;var a=(0,o.createAction)("game/connectionRestored");t.connectionRestored=a},221:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.PingIndicator=t.pingMiddleware=void 0;var o=n(699);t.pingMiddleware=o.pingMiddleware;var r=n(700);t.PingIndicator=r.PingIndicator;var i=n(703);t.pingReducer=i.pingReducer},222:function(e,t,n){"use strict";t.__esModule=!0,t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=t.PING_TIMEOUT=t.PING_INTERVAL=void 0;t.PING_INTERVAL=2500;t.PING_TIMEOUT=2e3;t.PING_MAX_FAILS=3;t.PING_QUEUE_SIZE=8;t.PING_ROUNDTRIP_BEST=50;t.PING_ROUNDTRIP_WORST=200},65:function(e,t,n){"use strict";t.__esModule=!0,t.openChatSettings=t.toggleSettings=t.changeSettingsTab=t.loadSettings=t.updateSettings=void 0;var o=n(22),r=(0,o.createAction)("settings/update");t.updateSettings=r;var i=(0,o.createAction)("settings/load");t.loadSettings=i;var a=(0,o.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,o.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,o.createAction)("settings/openChatTab");t.openChatSettings=s},675:function(e,t,n){n(149),e.exports=n(676)},676:function(e,t,n){"use strict";var o=n(0);n(677),n(678);var r,i,a=n(100),c=n(22),s=(n(101),n(57)),l=n(187),u=n(136),d=n(188),g=n(213),p=n(146),h=n(218),f=n(698),m=n(221),v=n(145),E=n(704);function y(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}a.perf.mark("inception",null==(r=window.performance)||null==(i=r.timing)?void 0:i.navigationStart),a.perf.mark("init");var b=(0,d.configureStore)({reducer:(0,c.combineReducers)({audio:g.audioReducer,chat:p.chatReducer,game:h.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[p.chatMiddleware,m.pingMiddleware,E.telemetryMiddleware,v.settingsMiddleware,g.audioMiddleware,h.gameMiddleware]}}),S=(0,u.createRenderer)((function(){var e=n(705).Panel;return(0,o.createComponentVNode)(2,d.StoreProvider,{store:b,children:(0,o.createComponentVNode)(2,e)})})),_=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return void 0===e&&(e="output"),n.next=3,Byond.winget(e);case 3:t=n.sent,Byond.winset("browseroutput",{size:t.size});case 5:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){y(i,o,r,a,c,"next",e)}function c(e){y(i,o,r,a,c,"throw",e)}a(undefined)}))});return function(e){return t.apply(this,arguments)}}();!function C(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,l.captureExternalLinks)(),b.subscribe(S),window.update=function(e){return b.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}Byond.winset("output",{"is-visible":!1}),Byond.winset("browseroutput",{"is-visible":!0,"is-disabled":!1,pos:"0x0",size:"0x0"}),_()}else document.addEventListener("DOMContentLoaded",C)}()},677:function(e,t,n){},678:function(e,t,n){},679:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var o=n(22),r=n(214);t.useAudio=function(e){var t=(0,o.useSelector)(e,r.selectAudio),n=(0,o.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},680:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var o=n(681);t.audioMiddleware=function(e){var t=new o.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var o=n.type,r=n.payload;if("audio/playMusic"===o){var i=r.url,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(r,["url"]);return t.play(i,a),e(n)}if("audio/stopMusic"===o)return t.stop(),e(n);if("settings/update"===o||"settings/load"===o){var c=null==r?void 0:r.adminMusicVolume;return"number"==typeof c&&t.setVolume(c),e(n)}return e(n)}}}},681:function(e,t,n){"use strict";function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&e.node.currentTime>=e.options.end&&e.stop())}),1e3))}var t=e.prototype;return t.destroy=function(){this.node&&(this.node.stop(),document.removeChild(this.node),clearInterval(this.playbackInterval))},t.play=function(e,t){void 0===t&&(t={}),this.node&&(i.log("playing",e,t),this.options=t,this.node.src=e)},t.stop=function(){if(this.node){if(this.playing)for(var e,t=o(this.onStopSubscribers);!(e=t()).done;)(0,e.value)();i.log("stopping"),this.playing=!1,this.node.src=""}},t.setVolume=function(e){this.node&&(this.volume=e,this.node.volume=e)},t.onPlay=function(e){this.node&&this.onPlaySubscribers.push(e)},t.onStop=function(e){this.node&&this.onStopSubscribers.push(e)},e}();t.AudioPlayer=a},682:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var o=n(0),r=n(9),i=n(22),a=n(1),c=n(145),s=n(214);t.NowPlayingWidget=function(e,t){var n,l=(0,i.useSelector)(t,s.selectAudio),u=(0,i.useDispatch)(t),d=(0,c.useSettings)(t),g=null==(n=l.meta)?void 0:n.title;return(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[l.playing&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:g||"Unknown Track"})],4)||(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),l.playing&&(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return u({type:"audio/stopMusic"})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:d.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,r.toFixed)(100*e)+"%"},onDrag:function(e,t){return d.update({adminMusicVolume:t})}})})]})}},683:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var o=n(22),r=n(65),i=n(105);t.useSettings=function(e){var t=(0,o.useSelector)(e,i.selectSettings),n=(0,o.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,r.toggleSettings)())},update:function(e){return n((0,r.updateSettings)(e))}})}},684:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var o=n(79),r=n(215),i=n(65),a=n(105);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(c){var s,l=c.type,u=c.payload;if(t||(t=!0,o.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),l===i.updateSettings.type||l===i.loadSettings.type){var d=null==u?void 0:u.theme;d&&(0,r.setClientTheme)(d),n(c);var g=(0,a.selectSettings)(e.getState());return s=g.fontSize,document.documentElement.style.setProperty("font-size",s+"px"),document.body.style.setProperty("font-size",s+"px"),void o.storage.set("panel-settings",g)}return n(c)}}}},685:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var o=n(65),r={version:1,fontSize:13,lineHeight:1.2,theme:"default",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",view:{visible:!1,activeTab:n(216).SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=t.payload;if(n===o.updateSettings.type)return Object.assign({},e,i);if(n===o.loadSettings.type)return(null==i?void 0:i.version)?(delete i.view,Object.assign({},e,i)):e;if(n===o.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===o.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===o.changeSettingsTab.type){var a=i.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},686:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsGeneral=t.SettingsPanel=void 0;var o=n(0),r=n(9),i=n(22),a=n(1),c=n(146),s=n(80),l=n(215),u=n(65),d=n(216),g=n(105);t.SettingsPanel=function(e,t){var n=(0,i.useSelector)(t,g.selectActiveTab),r=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:d.SETTINGS_TABS.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e.id===n,onClick:function(){return r((0,u.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:["general"===n&&(0,o.createComponentVNode)(2,p),"chatPage"===n&&(0,o.createComponentVNode)(2,c.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,i.useSelector)(t,g.selectSettings),c=n.theme,d=n.fontSize,p=n.lineHeight,h=n.highlightText,f=n.highlightColor,m=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Theme",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:c,options:l.THEMES,onSelected:function(e){return m((0,u.updateSettings)({theme:e}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Font size",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:d,unit:"px",format:function(e){return(0,r.toFixed)(e)},onChange:function(e,t){return m((0,u.updateSettings)({fontSize:t}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Line height",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:p,format:function(e){return(0,r.toFixed)(e,2)},onDrag:function(e,t){return m((0,u.updateSettings)({lineHeight:t}))}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,color:"label",align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:"Highlight words (comma separated):"}),(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,children:[(0,o.createComponentVNode)(2,a.ColorBox,{mr:1,color:f}),(0,o.createComponentVNode)(2,a.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:f,onInput:function(e,t){return m((0,u.updateSettings)({highlightColor:t}))}})]})]}),(0,o.createComponentVNode)(2,a.TextArea,{height:"3em",value:h,onChange:function(e,t){return m((0,u.updateSettings)({highlightText:t}))}})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"check",onClick:function(){return m((0,s.rebuildChat)())},children:"Apply now"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return m((0,s.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},687:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var o=n(0),r=n(22),i=n(1),a=n(80),c=n(107),s=n(147);t.ChatPageSettings=function(e,t){var n=(0,r.useSelector)(t,s.selectCurrentChatPage),l=(0,r.useDispatch)(t);return(0,o.createComponentVNode)(2,i.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,i.Flex,{mx:-.5,align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return l((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return l((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Section,{title:"Messages to display",level:2,children:[c.MESSAGE_TYPES.filter((function(e){return!e.important&&!e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,o.createComponentVNode)(2,i.Collapsible,{mt:1,color:"transparent",title:"Admin stuff",children:c.MESSAGE_TYPES.filter((function(e){return!e.important&&e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},688:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var o=n(0),r=n(6),i=n(1),a=n(217);var c=function(e){var t,n;function c(){var t;return(t=e.call(this)||this).ref=(0,o.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},s.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},s.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,r.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},s.render=function(){var e=this.state.scrollTracking;return(0,o.createFragment)([(0,o.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,o.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},c}(o.Component);t.ChatPanel=c},689:function(e,t,n){"use strict";t.__esModule=!0,t.linkifyNode=t.highlightNode=t.replaceInTextNode=void 0;var o=function(e,t){return function(n){for(var o,r,i=n.textContent,a=i.length,c=0,s=0;o=e.exec(i);){s+=1,r||(r=document.createDocumentFragment());var l=o[0],u=l.length,d=o.index;c0&&(0,o.createComponentVNode)(2,l,{value:e.unreadCount}),onClick:function(){return d((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){d((0,a.addChatPage)()),d((0,s.openChatSettings)())}})})]})}},691:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var o=n(79),r=n(65),i=n(105),a=n(80),c=n(107),s=n(106),l=n(217),u=n(147);n(24);function d(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){d(i,o,r,a,c,"next",e)}function c(e){d(i,o,r,a,c,"throw",e)}a(undefined)}))}}var p=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,u.selectChat)(e.getState()),r=Math.max(0,l.chatRenderer.messages.length-c.MAX_PERSISTED_MESSAGES),i=l.chatRenderer.messages.slice(r).map((function(e){return(0,s.serializeMessage)(e)})),o.storage.set("chat-state",n),o.storage.set("chat-messages",i);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([o.storage.get("chat-state"),o.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],i=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,a.loadChat)()),t.abrupt("return");case 8:i&&(c=[].concat(i,[(0,s.createMessage)({type:"internal/reconnected"})]),l.chatRenderer.processBatch(c,{prepend:!0})),e.dispatch((0,a.loadChat)(r));case 10:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}();t.chatMiddleware=function(e){var t=!1,n=!1;return l.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,a.updateMessageCount)(t))})),l.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,a.changeScrollTracking)(t))})),setInterval((function(){return p(e)}),c.MESSAGE_SAVE_INTERVAL),function(o){return function(c){var s=c.type,d=c.payload;if(t||(t=!0,h(e)),"chat/message"!==s){if(s===a.loadChat.type){o(c);var g=(0,u.selectCurrentChatPage)(e.getState());return l.chatRenderer.changePage(g),l.chatRenderer.onStateLoaded(),void(n=!0)}if(s!==a.changeChatPage.type&&s!==a.addChatPage.type&&s!==a.removeChatPage.type&&s!==a.toggleAcceptedType.type){if(s===a.rebuildChat.type)return l.chatRenderer.rebuildChat(),o(c);if(s!==r.updateSettings.type&&s!==r.loadSettings.type){if("roundrestart"===s)return p(e),o(c);if(s!==a.saveChatToDisk.type)return o(c);l.chatRenderer.saveToDisk()}else{o(c);var f=(0,i.selectSettings)(e.getState());l.chatRenderer.setHighlight(f.highlightText,f.highlightColor)}}else{o(c);var m=(0,u.selectCurrentChatPage)(e.getState());l.chatRenderer.changePage(m)}}else{var v=Array.isArray(d)?d:[d];l.chatRenderer.processBatch(v)}}}}},692:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.initialState=void 0;var o,r=n(80),i=n(106);function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&(_[A.id]=Object.assign({},A,{unreadCount:A.unreadCount+M}))}return Object.assign({},e,{pageById:_})}if(o===r.addChatPage.type)return Object.assign({},e,{currentPageId:c.id,pages:[].concat(e.pages,[c.id]),pageById:Object.assign({},e.pageById,(n={},n[c.id]=c,n))});if(o===r.changeChatPage.type){var I,P=c.pageId,x=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(I={},I[P]=x,I))})}if(o===r.updateChatPage.type){var k,R=c.pageId,O=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(c,["pageId"]),V=Object.assign({},e.pageById[R],O);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(k={},k[R]=V,k))})}if(o===r.toggleAcceptedType.type){var G,B=c.pageId,L=c.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[L]=!D.acceptedTypes[L],Object.assign({},e,{pageById:Object.assign({},e.pageById,(G={},G[B]=D,G))})}if(o===r.removeChatPage.type){var F=c.pageId,j=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete j.pageById[F],j.pages=j.pages.filter((function(e){return e!==F})),0===j.pages.length&&(j.pages.push(s.id),j.pageById[s.id]=s,j.currentPageId=s.id),j.currentPageId&&j.currentPageId!==F||(j.currentPageId=j.pages[0]),j}return e}},693:function(e,t,n){"use strict";t.__esModule=!0,t.audioReducer=void 0;var o={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=o);var n=t.type,r=t.payload;return"audio/playing"===n?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===n?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===n?Object.assign({},e,{meta:r}):"audio/stopMusic"===n?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===n?Object.assign({},e,{visible:!e.visible}):e}},694:function(e,t,n){"use strict";t.__esModule=!0,t.useGame=void 0;var o=n(22),r=n(219);t.useGame=function(e){return(0,o.useSelector)(e,r.selectGame)}},695:function(e,t,n){"use strict";t.__esModule=!0,t.gameMiddleware=void 0;var o=n(148),r=n(220),i=n(219),a=n(696),c=function(e){return Object.assign({},e,{meta:Object.assign({},e.meta,{now:Date.now()})})};t.gameMiddleware=function(e){var t;return setInterval((function(){var n=e.getState();if(n){var o=(0,i.selectGame)(n),s=t&&Date.now()>=t+a.CONNECTION_LOST_AFTER;!o.connectionLostAt&&s&&e.dispatch(c((0,r.connectionLost)())),o.connectionLostAt&&!s&&e.dispatch(c((0,r.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===o.pingSuccess.type?(t=a.now,e(n)):i===r.roundRestarted.type?e(c(n)):e(n)}}}},696:function(e,t,n){"use strict";t.__esModule=!0,t.CONNECTION_LOST_AFTER=void 0;t.CONNECTION_LOST_AFTER=15e3},697:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var o=n(220),r={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===o.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===o.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},698:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.setupPanelFocusHacks=void 0;var o=n(103),r=n(57),i=n(190),a=function(){return e((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,r.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var r=[n.screenX,n.screenY];(0,o.vecLength)((0,o.vecSubtract)(r,t))>=10&&(e=!0)}e||a()})),r.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}}).call(this,n(102).setImmediate)},699:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var o=n(2),r=n(148),i=n(222);t.pingMiddleware=function(e){var t=!1,n=0,a=[],c=function(){for(var t=0;ti.PING_TIMEOUT&&(a[t]=null,e.dispatch((0,r.pingFail)()))}var s={index:n,sentAt:Date.now()};a[n]=s,(0,o.sendMessage)({type:"ping",payload:{index:n}}),n=(n+1)%i.PING_QUEUE_SIZE};return function(e){return function(n){var o=n.type,s=n.payload;if(t||(t=!0,setInterval(c,i.PING_INTERVAL),c()),"pingReply"===o){var l=s.index,u=a[l];if(!u)return;return a[l]=null,e((0,r.pingSuccess)(u))}return e(n)}}}},700:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var o=n(0),r=n(701),i=n(9),a=n(22),c=n(1),s=n(702);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),l=r.Color.lookup(n.networkQuality,[new r.Color(220,40,40),new r.Color(220,200,40),new r.Color(60,220,40)]),u=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,o.createVNode)(1,"div","Ping",[(0,o.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:l}),u],0)}},701:function(e,t,n){"use strict";t.__esModule=!0,t.Color=void 0;var o=function(){function e(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=1),this.r=e,this.g=t,this.b=n,this.a=o}return e.prototype.toString=function(){return"rgba("+(0|this.r)+", "+(0|this.g)+", "+(0|this.b)+", "+(0|this.a)+")"},e}();t.Color=o,o.fromHex=function(e){return new o(parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16))},o.lerp=function(e,t,n){return new o((t.r-e.r)*n+e.r,(t.g-e.g)*n+e.g,(t.b-e.b)*n+e.b,(t.a-e.a)*n+e.a)},o.lookup=function(e,t){void 0===t&&(t=[]);var n=t.length;if(n<2)throw new Error("Needs at least two colors!");var r=e*(n-1);if(e<1e-4)return t[0];if(e>=.9999)return t[n-1];var i=r%1,a=0|r;return o.lerp(t[a],t[a+1],i)}},702:function(e,t,n){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},703:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var o=n(9),r=n(148),i=n(222);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===r.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,l=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:l,failCount:0,networkQuality:1-(0,o.scale)(l,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===r.pingFail.type){var u=e.failCount,d=void 0===u?0:u,g=(0,o.clamp01)(e.networkQuality-d/i.PING_MAX_FAILS),p=Object.assign({},e,{failCount:d+1,networkQuality:g});return d>i.PING_MAX_FAILS&&(p.roundtrip=undefined,p.roundtripAvg=undefined),p}return e}},704:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var o=n(2),r=n(79);function i(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}var a=(0,n(24).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(c){return function(s){var l,u=s.type,d=s.payload;if("telemetry/request"!==u)return"backend/update"===u?(c(s),void(l=regeneratorRuntime.mark((function h(){var o,i,c,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(i=null==d||null==(o=d.config)?void 0:o.client){l.next=4;break}return a.error("backend/update payload is missing client data!"),l.abrupt("return");case 4:if(t){l.next=13;break}return l.next=7,r.storage.get("telemetry");case 7:if(l.t0=l.sent,l.t0){l.next=10;break}l.t0={};case 10:(t=l.t0).connections||(t.connections=[]),a.debug("retrieved telemetry from storage",t);case 13:c=!1,t.connections.find((function(e){return n=i,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(c=!0,t.connections.unshift(i),t.connections.length>10&&t.connections.pop()),c&&(a.debug("saving telemetry to storage",t),r.storage.set("telemetry",t)),n&&(s=n,n=null,e.dispatch({type:"telemetry/request",payload:s}));case 18:case"end":return l.stop()}}),h)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var r=l.apply(e,t);function a(e){i(r,n,o,a,c,"next",e)}function c(e){i(r,n,o,a,c,"throw",e)}a(undefined)}))})()):c(s);if(!t)return a.debug("deferred"),void(n=d);a.debug("sending");var g=(null==d?void 0:d.limits)||{},p=t.connections.slice(0,g.connections);(0,o.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},705:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var o=n(0),r=n(1),i=n(3),a=n(213),c=n(146),s=n(218),l=n(706),u=n(221),d=n(145);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,o.createComponentVNode)(2,g);var n=(0,a.useAudio)(t),p=(0,d.useSettings)(t),h=(0,s.useGame)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===p.theme?"light":p.theme,children:(0,o.createComponentVNode)(2,r.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Section,{fitted:!0,children:(0,o.createComponentVNode)(2,r.Flex,{mx:.5,align:"center",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,grow:1,overflowX:"auto",children:(0,o.createComponentVNode)(2,c.ChatTabs)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,u.PingIndicator)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-left",onClick:function(){return n.toggle()}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{icon:p.visible?"times":"cog",selected:p.visible,tooltip:p.visible?"Close settings":"Open settings",tooltipPosition:"bottom-left",onClick:function(){return p.toggle()}})})]})})}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,r.Section,{children:(0,o.createComponentVNode)(2,a.NowPlayingWidget)})}),p.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,r.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:p.lineHeight})}),(0,o.createComponentVNode)(2,l.Notifications,{children:[h.connectionLostAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{rightSlot:(0,o.createComponentVNode)(2,r.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),h.roundRestartedAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var g=function(e,t){var n=(0,d.useSettings)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===n.theme?"light":n.theme,children:(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)})||(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},706:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var o=n(0),r=n(1),i=function(e){var t=e.children;return(0,o.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,o.createComponentVNode)(2,r.Flex,{align:"center",className:"Notification",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},80:function(e,t,n){"use strict";t.__esModule=!0,t.saveChatToDisk=t.changeScrollTracking=t.removeChatPage=t.toggleAcceptedType=t.updateChatPage=t.changeChatPage=t.addChatPage=t.updateMessageCount=t.rebuildChat=t.loadChat=void 0;var o=n(22),r=n(106),i=(0,o.createAction)("chat/load");t.loadChat=i;var a=(0,o.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,o.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,o.createAction)("chat/addPage",(function(){return{payload:(0,r.createPage)()}}));t.addChatPage=s;var l=(0,o.createAction)("chat/changePage");t.changeChatPage=l;var u=(0,o.createAction)("chat/updatePage");t.updateChatPage=u;var d=(0,o.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=d;var g=(0,o.createAction)("chat/removePage");t.removeChatPage=g;var p=(0,o.createAction)("chat/changeScrollTracking");t.changeScrollTracking=p;var h=(0,o.createAction)("chat/saveToDisk");t.saveChatToDisk=h}}); \ No newline at end of file +!function(e){function t(t){for(var o,a,c=t[0],s=t[1],l=t[2],u=0,g=[];u=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=a.IMAGE_RETRY_LIMIT)u.error("failed to load an image after "+n+" attempts");else{var o=t.src;t.src=null,t.src=o+"#"+n,t.setAttribute("data-reload-n",n+1)}}),a.IMAGE_RETRY_DELAY)},m=function(e){var t=e.node,n=e.times;if(t&&n){var o=t.querySelector(".Chat__badge"),i=o||document.createElement("div");i.textContent=n,i.className=(0,r.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),o||t.appendChild(i)}},v=function(){function t(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new o.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,o=n.scrollHeight,r=n.scrollTop+n.offsetHeight,i=Math.abs(o-r)<24;i!==e.scrollTracking&&(e.scrollTracking=i,e.events.emit("scrollTrackingChanged",i),u.debug("tracking",e.scrollTracking))},this.ensureScrollTracking=function(){e.scrollTracking&&e.scrollToBottom()},setInterval((function(){return e.pruneMessages()}),a.MESSAGE_PRUNE_INTERVAL)}var n=t.prototype;return n.isReady=function(){return this.loaded&&this.rootNode&&this.page},n.mount=function(t){var n=this;this.rootNode?t.appendChild(this.rootNode):this.rootNode=t,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},n.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1&&n.test(e)}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);this.highlightRegex=new RegExp("("+o.join("|")+")","gi"),this.highlightColor=t},n.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},n.changePage=function(e){if(!this.isReady())return this.page=e,void this.tryFlushQueue();this.page=e,this.rootNode.textContent="",this.visibleMessages=[];for(var t,n,o=document.createDocumentFragment(),r=l(this.messages);!(n=r()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,o.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(o),t.scrollIntoView())},n.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,o=n-1,r=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=o;i>=r;i--){var s=this.visibleMessages[i];if(!s.type.startsWith(a.MESSAGE_TYPE_INTERNAL)&&(0,c.isSameMessage)(s,e)&&t0){this.visibleMessages=e.slice(t);for(var n=0;n0&&(this.messages=this.messages.slice(r),u.log("pruned "+r+" stored messages"))}else u.debug("pruning delayed")},n.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),o=l(n);!(e=o()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},n.saveToDisk=function(){if(!Byond.IS_LTE_IE10){for(var e="",t=document.styleSheets,n=0;n\n\n\nSS13 Chat Log\n\n\n\n
\n'+a+"
\n\n\n"]),u=(new Date).toISOString().substring(0,19).replace(/[-:]/g,"").replace("T","-");window.navigator.msSaveBlob(d,"ss13-chatlog-"+u+".html")}},t}();window.__chatRenderer__||(window.__chatRenderer__=new v);var E=window.__chatRenderer__;t.chatRenderer=E}).call(this,n(102).setImmediate)},218:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=t.gameMiddleware=t.useGame=void 0;var o=n(694);t.useGame=o.useGame;var r=n(695);t.gameMiddleware=r.gameMiddleware;var i=n(697);t.gameReducer=i.gameReducer},219:function(e,t,n){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},220:function(e,t,n){"use strict";t.__esModule=!0,t.connectionRestored=t.connectionLost=t.roundRestarted=void 0;var o=n(22),r=(0,o.createAction)("roundrestart");t.roundRestarted=r;var i=(0,o.createAction)("game/connectionLost");t.connectionLost=i;var a=(0,o.createAction)("game/connectionRestored");t.connectionRestored=a},221:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.PingIndicator=t.pingMiddleware=void 0;var o=n(699);t.pingMiddleware=o.pingMiddleware;var r=n(700);t.PingIndicator=r.PingIndicator;var i=n(703);t.pingReducer=i.pingReducer},222:function(e,t,n){"use strict";t.__esModule=!0,t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=t.PING_TIMEOUT=t.PING_INTERVAL=void 0;t.PING_INTERVAL=2500;t.PING_TIMEOUT=2e3;t.PING_MAX_FAILS=3;t.PING_QUEUE_SIZE=8;t.PING_ROUNDTRIP_BEST=50;t.PING_ROUNDTRIP_WORST=200},65:function(e,t,n){"use strict";t.__esModule=!0,t.openChatSettings=t.toggleSettings=t.changeSettingsTab=t.loadSettings=t.updateSettings=void 0;var o=n(22),r=(0,o.createAction)("settings/update");t.updateSettings=r;var i=(0,o.createAction)("settings/load");t.loadSettings=i;var a=(0,o.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,o.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,o.createAction)("settings/openChatTab");t.openChatSettings=s},675:function(e,t,n){n(149),e.exports=n(676)},676:function(e,t,n){"use strict";var o=n(0);n(677),n(678);var r,i,a=n(100),c=n(22),s=(n(101),n(57)),l=n(187),d=n(136),u=n(188),g=n(213),p=n(146),h=n(218),f=n(698),m=n(221),v=n(145),E=n(704);a.perf.mark("inception",null==(r=window.performance)||null==(i=r.timing)?void 0:i.navigationStart),a.perf.mark("init");var y=(0,u.configureStore)({reducer:(0,c.combineReducers)({audio:g.audioReducer,chat:p.chatReducer,game:h.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[p.chatMiddleware,m.pingMiddleware,E.telemetryMiddleware,v.settingsMiddleware,g.audioMiddleware,h.gameMiddleware]}}),b=(0,d.createRenderer)((function(){var e=n(705).Panel;return(0,o.createComponentVNode)(2,u.StoreProvider,{store:y,children:(0,o.createComponentVNode)(2,e)})}));!function S(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,l.captureExternalLinks)(),y.subscribe(b),window.update=function(e){return y.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}Byond.winset("output",{"is-visible":!1}),Byond.winset("browseroutput",{"is-visible":!0,"is-disabled":!1,pos:"0x0",size:"0x0"})}else document.addEventListener("DOMContentLoaded",S)}()},677:function(e,t,n){},678:function(e,t,n){},679:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var o=n(22),r=n(214);t.useAudio=function(e){var t=(0,o.useSelector)(e,r.selectAudio),n=(0,o.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},680:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var o=n(681);t.audioMiddleware=function(e){var t=new o.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var o=n.type,r=n.payload;if("audio/playMusic"===o){var i=r.url,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(r,["url"]);return t.play(i,a),e(n)}if("audio/stopMusic"===o)return t.stop(),e(n);if("settings/update"===o||"settings/load"===o){var c=null==r?void 0:r.adminMusicVolume;return"number"==typeof c&&t.setVolume(c),e(n)}return e(n)}}}},681:function(e,t,n){"use strict";function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&e.node.currentTime>=e.options.end&&e.stop())}),1e3))}var t=e.prototype;return t.destroy=function(){this.node&&(this.node.stop(),document.removeChild(this.node),clearInterval(this.playbackInterval))},t.play=function(e,t){void 0===t&&(t={}),this.node&&(i.log("playing",e,t),this.options=t,this.node.src=e)},t.stop=function(){if(this.node){if(this.playing)for(var e,t=o(this.onStopSubscribers);!(e=t()).done;)(0,e.value)();i.log("stopping"),this.playing=!1,this.node.src=""}},t.setVolume=function(e){this.node&&(this.volume=e,this.node.volume=e)},t.onPlay=function(e){this.node&&this.onPlaySubscribers.push(e)},t.onStop=function(e){this.node&&this.onStopSubscribers.push(e)},e}();t.AudioPlayer=a},682:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var o=n(0),r=n(9),i=n(22),a=n(1),c=n(145),s=n(214);t.NowPlayingWidget=function(e,t){var n,l=(0,i.useSelector)(t,s.selectAudio),d=(0,i.useDispatch)(t),u=(0,c.useSettings)(t),g=null==(n=l.meta)?void 0:n.title;return(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[l.playing&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:g||"Unknown Track"})],4)||(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),l.playing&&(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return d({type:"audio/stopMusic"})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:u.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,r.toFixed)(100*e)+"%"},onDrag:function(e,t){return u.update({adminMusicVolume:t})}})})]})}},683:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var o=n(22),r=n(65),i=n(105);t.useSettings=function(e){var t=(0,o.useSelector)(e,i.selectSettings),n=(0,o.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,r.toggleSettings)())},update:function(e){return n((0,r.updateSettings)(e))}})}},684:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var o=n(79),r=n(215),i=n(65),a=n(105);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(c){var s,l=c.type,d=c.payload;if(t||(t=!0,o.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),l===i.updateSettings.type||l===i.loadSettings.type){var u=null==d?void 0:d.theme;u&&(0,r.setClientTheme)(u),n(c);var g=(0,a.selectSettings)(e.getState());return s=g.fontSize,document.documentElement.style.setProperty("font-size",s+"px"),document.body.style.setProperty("font-size",s+"px"),void o.storage.set("panel-settings",g)}return n(c)}}}},685:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var o=n(65),r={version:1,fontSize:13,lineHeight:1.2,theme:"default",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",view:{visible:!1,activeTab:n(216).SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=t.payload;if(n===o.updateSettings.type)return Object.assign({},e,i);if(n===o.loadSettings.type)return(null==i?void 0:i.version)?(delete i.view,Object.assign({},e,i)):e;if(n===o.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===o.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===o.changeSettingsTab.type){var a=i.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},686:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsGeneral=t.SettingsPanel=void 0;var o=n(0),r=n(9),i=n(22),a=n(1),c=n(146),s=n(80),l=n(215),d=n(65),u=n(216),g=n(105);t.SettingsPanel=function(e,t){var n=(0,i.useSelector)(t,g.selectActiveTab),r=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:u.SETTINGS_TABS.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e.id===n,onClick:function(){return r((0,d.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:["general"===n&&(0,o.createComponentVNode)(2,p),"chatPage"===n&&(0,o.createComponentVNode)(2,c.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,i.useSelector)(t,g.selectSettings),c=n.theme,u=n.fontSize,p=n.lineHeight,h=n.highlightText,f=n.highlightColor,m=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Theme",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:c,options:l.THEMES,onSelected:function(e){return m((0,d.updateSettings)({theme:e}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Font size",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:u,unit:"px",format:function(e){return(0,r.toFixed)(e)},onChange:function(e,t){return m((0,d.updateSettings)({fontSize:t}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Line height",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:p,format:function(e){return(0,r.toFixed)(e,2)},onDrag:function(e,t){return m((0,d.updateSettings)({lineHeight:t}))}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,color:"label",align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:"Highlight words (comma separated):"}),(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,children:[(0,o.createComponentVNode)(2,a.ColorBox,{mr:1,color:f}),(0,o.createComponentVNode)(2,a.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:f,onInput:function(e,t){return m((0,d.updateSettings)({highlightColor:t}))}})]})]}),(0,o.createComponentVNode)(2,a.TextArea,{height:"3em",value:h,onChange:function(e,t){return m((0,d.updateSettings)({highlightText:t}))}})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"check",onClick:function(){return m((0,s.rebuildChat)())},children:"Apply now"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return m((0,s.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},687:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var o=n(0),r=n(22),i=n(1),a=n(80),c=n(107),s=n(147);t.ChatPageSettings=function(e,t){var n=(0,r.useSelector)(t,s.selectCurrentChatPage),l=(0,r.useDispatch)(t);return(0,o.createComponentVNode)(2,i.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,i.Flex,{mx:-.5,align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return l((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return l((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Section,{title:"Messages to display",level:2,children:[c.MESSAGE_TYPES.filter((function(e){return!e.important&&!e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,o.createComponentVNode)(2,i.Collapsible,{mt:1,color:"transparent",title:"Admin stuff",children:c.MESSAGE_TYPES.filter((function(e){return!e.important&&e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},688:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var o=n(0),r=n(6),i=n(1),a=n(217);var c=function(e){var t,n;function c(){var t;return(t=e.call(this)||this).ref=(0,o.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},s.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},s.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,r.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},s.render=function(){var e=this.state.scrollTracking;return(0,o.createFragment)([(0,o.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,o.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},c}(o.Component);t.ChatPanel=c},689:function(e,t,n){"use strict";t.__esModule=!0,t.linkifyNode=t.highlightNode=t.replaceInTextNode=void 0;var o=function(e,t){return function(n){for(var o,r,i=n.textContent,a=i.length,c=0,s=0;o=e.exec(i);){s+=1,r||(r=document.createDocumentFragment());var l=o[0],d=l.length,u=o.index;c0&&(0,o.createComponentVNode)(2,l,{value:e.unreadCount}),onClick:function(){return u((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){u((0,a.addChatPage)()),u((0,s.openChatSettings)())}})})]})}},691:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var o=n(79),r=n(65),i=n(105),a=n(80),c=n(107),s=n(106),l=n(217),d=n(147);n(24);function u(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){u(i,o,r,a,c,"next",e)}function c(e){u(i,o,r,a,c,"throw",e)}a(undefined)}))}}var p=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,d.selectChat)(e.getState()),r=Math.max(0,l.chatRenderer.messages.length-c.MAX_PERSISTED_MESSAGES),i=l.chatRenderer.messages.slice(r).map((function(e){return(0,s.serializeMessage)(e)})),o.storage.set("chat-state",n),o.storage.set("chat-messages",i);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([o.storage.get("chat-state"),o.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],i=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,a.loadChat)()),t.abrupt("return");case 8:i&&(c=[].concat(i,[(0,s.createMessage)({type:"internal/reconnected"})]),l.chatRenderer.processBatch(c,{prepend:!0})),e.dispatch((0,a.loadChat)(r));case 10:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}();t.chatMiddleware=function(e){var t=!1,n=!1;return l.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,a.updateMessageCount)(t))})),l.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,a.changeScrollTracking)(t))})),setInterval((function(){return p(e)}),c.MESSAGE_SAVE_INTERVAL),function(o){return function(c){var s=c.type,u=c.payload;if(t||(t=!0,h(e)),"chat/message"!==s){if(s===a.loadChat.type){o(c);var g=(0,d.selectCurrentChatPage)(e.getState());return l.chatRenderer.changePage(g),l.chatRenderer.onStateLoaded(),void(n=!0)}if(s!==a.changeChatPage.type&&s!==a.addChatPage.type&&s!==a.removeChatPage.type&&s!==a.toggleAcceptedType.type){if(s===a.rebuildChat.type)return l.chatRenderer.rebuildChat(),o(c);if(s!==r.updateSettings.type&&s!==r.loadSettings.type){if("roundrestart"===s)return p(e),o(c);if(s!==a.saveChatToDisk.type)return o(c);l.chatRenderer.saveToDisk()}else{o(c);var f=(0,i.selectSettings)(e.getState());l.chatRenderer.setHighlight(f.highlightText,f.highlightColor)}}else{o(c);var m=(0,d.selectCurrentChatPage)(e.getState());l.chatRenderer.changePage(m)}}else{var v=Array.isArray(u)?u:[u];l.chatRenderer.processBatch(v)}}}}},692:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.initialState=void 0;var o,r=n(80),i=n(106);function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&(_[A.id]=Object.assign({},A,{unreadCount:A.unreadCount+M}))}return Object.assign({},e,{pageById:_})}if(o===r.addChatPage.type)return Object.assign({},e,{currentPageId:c.id,pages:[].concat(e.pages,[c.id]),pageById:Object.assign({},e.pageById,(n={},n[c.id]=c,n))});if(o===r.changeChatPage.type){var I,P=c.pageId,x=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(I={},I[P]=x,I))})}if(o===r.updateChatPage.type){var k,R=c.pageId,O=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(c,["pageId"]),V=Object.assign({},e.pageById[R],O);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(k={},k[R]=V,k))})}if(o===r.toggleAcceptedType.type){var G,B=c.pageId,L=c.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[L]=!D.acceptedTypes[L],Object.assign({},e,{pageById:Object.assign({},e.pageById,(G={},G[B]=D,G))})}if(o===r.removeChatPage.type){var F=c.pageId,j=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete j.pageById[F],j.pages=j.pages.filter((function(e){return e!==F})),0===j.pages.length&&(j.pages.push(s.id),j.pageById[s.id]=s,j.currentPageId=s.id),j.currentPageId&&j.currentPageId!==F||(j.currentPageId=j.pages[0]),j}return e}},693:function(e,t,n){"use strict";t.__esModule=!0,t.audioReducer=void 0;var o={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=o);var n=t.type,r=t.payload;return"audio/playing"===n?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===n?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===n?Object.assign({},e,{meta:r}):"audio/stopMusic"===n?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===n?Object.assign({},e,{visible:!e.visible}):e}},694:function(e,t,n){"use strict";t.__esModule=!0,t.useGame=void 0;var o=n(22),r=n(219);t.useGame=function(e){return(0,o.useSelector)(e,r.selectGame)}},695:function(e,t,n){"use strict";t.__esModule=!0,t.gameMiddleware=void 0;var o=n(148),r=n(220),i=n(219),a=n(696),c=function(e){return Object.assign({},e,{meta:Object.assign({},e.meta,{now:Date.now()})})};t.gameMiddleware=function(e){var t;return setInterval((function(){var n=e.getState();if(n){var o=(0,i.selectGame)(n),s=t&&Date.now()>=t+a.CONNECTION_LOST_AFTER;!o.connectionLostAt&&s&&e.dispatch(c((0,r.connectionLost)())),o.connectionLostAt&&!s&&e.dispatch(c((0,r.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===o.pingSuccess.type?(t=a.now,e(n)):i===r.roundRestarted.type?e(c(n)):e(n)}}}},696:function(e,t,n){"use strict";t.__esModule=!0,t.CONNECTION_LOST_AFTER=void 0;t.CONNECTION_LOST_AFTER=15e3},697:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var o=n(220),r={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===o.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===o.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},698:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.setupPanelFocusHacks=void 0;var o=n(103),r=n(57),i=n(190),a=function(){return e((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,r.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var r=[n.screenX,n.screenY];(0,o.vecLength)((0,o.vecSubtract)(r,t))>=10&&(e=!0)}e||a()})),r.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}}).call(this,n(102).setImmediate)},699:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var o=n(2),r=n(148),i=n(222);t.pingMiddleware=function(e){var t=!1,n=0,a=[],c=function(){for(var t=0;ti.PING_TIMEOUT&&(a[t]=null,e.dispatch((0,r.pingFail)()))}var s={index:n,sentAt:Date.now()};a[n]=s,(0,o.sendMessage)({type:"ping",payload:{index:n}}),n=(n+1)%i.PING_QUEUE_SIZE};return function(e){return function(n){var o=n.type,s=n.payload;if(t||(t=!0,setInterval(c,i.PING_INTERVAL),c()),"pingReply"===o){var l=s.index,d=a[l];if(!d)return;return a[l]=null,e((0,r.pingSuccess)(d))}return e(n)}}}},700:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var o=n(0),r=n(701),i=n(9),a=n(22),c=n(1),s=n(702);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),l=r.Color.lookup(n.networkQuality,[new r.Color(220,40,40),new r.Color(220,200,40),new r.Color(60,220,40)]),d=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,o.createVNode)(1,"div","Ping",[(0,o.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:l}),d],0)}},701:function(e,t,n){"use strict";t.__esModule=!0,t.Color=void 0;var o=function(){function e(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=1),this.r=e,this.g=t,this.b=n,this.a=o}return e.prototype.toString=function(){return"rgba("+(0|this.r)+", "+(0|this.g)+", "+(0|this.b)+", "+(0|this.a)+")"},e}();t.Color=o,o.fromHex=function(e){return new o(parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16))},o.lerp=function(e,t,n){return new o((t.r-e.r)*n+e.r,(t.g-e.g)*n+e.g,(t.b-e.b)*n+e.b,(t.a-e.a)*n+e.a)},o.lookup=function(e,t){void 0===t&&(t=[]);var n=t.length;if(n<2)throw new Error("Needs at least two colors!");var r=e*(n-1);if(e<1e-4)return t[0];if(e>=.9999)return t[n-1];var i=r%1,a=0|r;return o.lerp(t[a],t[a+1],i)}},702:function(e,t,n){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},703:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var o=n(9),r=n(148),i=n(222);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===r.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,l=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:l,failCount:0,networkQuality:1-(0,o.scale)(l,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===r.pingFail.type){var d=e.failCount,u=void 0===d?0:d,g=(0,o.clamp01)(e.networkQuality-u/i.PING_MAX_FAILS),p=Object.assign({},e,{failCount:u+1,networkQuality:g});return u>i.PING_MAX_FAILS&&(p.roundtrip=undefined,p.roundtripAvg=undefined),p}return e}},704:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var o=n(2),r=n(79);function i(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}var a=(0,n(24).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(c){return function(s){var l,d=s.type,u=s.payload;if("telemetry/request"!==d)return"backend/update"===d?(c(s),void(l=regeneratorRuntime.mark((function h(){var o,i,c,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(i=null==u||null==(o=u.config)?void 0:o.client){l.next=4;break}return a.error("backend/update payload is missing client data!"),l.abrupt("return");case 4:if(t){l.next=13;break}return l.next=7,r.storage.get("telemetry");case 7:if(l.t0=l.sent,l.t0){l.next=10;break}l.t0={};case 10:(t=l.t0).connections||(t.connections=[]),a.debug("retrieved telemetry from storage",t);case 13:c=!1,t.connections.find((function(e){return n=i,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(c=!0,t.connections.unshift(i),t.connections.length>10&&t.connections.pop()),c&&(a.debug("saving telemetry to storage",t),r.storage.set("telemetry",t)),n&&(s=n,n=null,e.dispatch({type:"telemetry/request",payload:s}));case 18:case"end":return l.stop()}}),h)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var r=l.apply(e,t);function a(e){i(r,n,o,a,c,"next",e)}function c(e){i(r,n,o,a,c,"throw",e)}a(undefined)}))})()):c(s);if(!t)return a.debug("deferred"),void(n=u);a.debug("sending");var g=(null==u?void 0:u.limits)||{},p=t.connections.slice(0,g.connections);(0,o.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},705:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var o=n(0),r=n(1),i=n(3),a=n(213),c=n(146),s=n(218),l=n(706),d=n(221),u=n(145);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,o.createComponentVNode)(2,g);var n=(0,a.useAudio)(t),p=(0,u.useSettings)(t),h=(0,s.useGame)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===p.theme?"light":p.theme,children:(0,o.createComponentVNode)(2,r.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Section,{fitted:!0,children:(0,o.createComponentVNode)(2,r.Flex,{mx:.5,align:"center",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,grow:1,overflowX:"auto",children:(0,o.createComponentVNode)(2,c.ChatTabs)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,d.PingIndicator)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-left",onClick:function(){return n.toggle()}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{icon:p.visible?"times":"cog",selected:p.visible,tooltip:p.visible?"Close settings":"Open settings",tooltipPosition:"bottom-left",onClick:function(){return p.toggle()}})})]})})}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,r.Section,{children:(0,o.createComponentVNode)(2,a.NowPlayingWidget)})}),p.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,u.SettingsPanel)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,r.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:p.lineHeight})}),(0,o.createComponentVNode)(2,l.Notifications,{children:[h.connectionLostAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{rightSlot:(0,o.createComponentVNode)(2,r.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),h.roundRestartedAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var g=function(e,t){var n=(0,u.useSettings)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===n.theme?"light":n.theme,children:(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,u.SettingsPanel)})||(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},706:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var o=n(0),r=n(1),i=function(e){var t=e.children;return(0,o.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,o.createComponentVNode)(2,r.Flex,{align:"center",className:"Notification",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},80:function(e,t,n){"use strict";t.__esModule=!0,t.saveChatToDisk=t.changeScrollTracking=t.removeChatPage=t.toggleAcceptedType=t.updateChatPage=t.changeChatPage=t.addChatPage=t.updateMessageCount=t.rebuildChat=t.loadChat=void 0;var o=n(22),r=n(106),i=(0,o.createAction)("chat/load");t.loadChat=i;var a=(0,o.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,o.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,o.createAction)("chat/addPage",(function(){return{payload:(0,r.createPage)()}}));t.addChatPage=s;var l=(0,o.createAction)("chat/changePage");t.changeChatPage=l;var d=(0,o.createAction)("chat/updatePage");t.updateChatPage=d;var u=(0,o.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=u;var g=(0,o.createAction)("chat/removePage");t.removeChatPage=g;var p=(0,o.createAction)("chat/changeScrollTracking");t.changeScrollTracking=p;var h=(0,o.createAction)("chat/saveToDisk");t.saveChatToDisk=h}}); \ No newline at end of file diff --git a/tgui/public/tgui.html b/tgui/public/tgui.html new file mode 100644 index 00000000000..d4516855ee9 --- /dev/null +++ b/tgui/public/tgui.html @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/vorestation.dme b/vorestation.dme index e3a5d38ec6e..0f0e63ea2a9 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -79,6 +79,7 @@ #include "code\__DEFINES\targeting.dm" #include "code\__DEFINES\tgs.config.dm" #include "code\__DEFINES\tgs.dm" +#include "code\__DEFINES\tgui.dm" #include "code\__DEFINES\time.dm" #include "code\__DEFINES\traits.dm" #include "code\__DEFINES\turfs.dm" @@ -127,6 +128,7 @@ #include "code\__HELPERS\names.dm" #include "code\__HELPERS\roundend.dm" #include "code\__HELPERS\sanitize_values.dm" +#include "code\__HELPERS\shell.dm" #include "code\__HELPERS\storage.dm" #include "code\__HELPERS\text.dm" #include "code\__HELPERS\text_vr.dm" @@ -231,6 +233,7 @@ #include "code\controllers\subsystems\atoms.dm" #include "code\controllers\subsystems\bellies_vr.dm" #include "code\controllers\subsystems\character_setup.dm" +#include "code\controllers\subsystems\chat.dm" #include "code\controllers\subsystems\circuits.dm" #include "code\controllers\subsystems\dcs.dm" #include "code\controllers\subsystems\emergency_shuttle.dm" @@ -251,7 +254,6 @@ #include "code\controllers\subsystems\openspace.dm" #include "code\controllers\subsystems\overlays.dm" #include "code\controllers\subsystems\persist_vr.dm" -#include "code\controllers\subsystems\ping.dm" #include "code\controllers\subsystems\planets.dm" #include "code\controllers\subsystems\radiation.dm" #include "code\controllers\subsystems\server_maint.dm" @@ -261,6 +263,7 @@ #include "code\controllers\subsystems\spacedrift.dm" #include "code\controllers\subsystems\sun.dm" #include "code\controllers\subsystems\supply.dm" +#include "code\controllers\subsystems\tgui.dm" #include "code\controllers\subsystems\ticker.dm" #include "code\controllers\subsystems\time_track.dm" #include "code\controllers\subsystems\timer.dm" @@ -2040,8 +2043,6 @@ #include "code\modules\games\tarot.dm" #include "code\modules\genetics\side_effects.dm" #include "code\modules\ghosttrap\trap.dm" -#include "code\modules\goonchat\browserOutput.dm" -#include "code\modules\goonchat\jsErrorHandler.dm" #include "code\modules\holodeck\HolodeckControl.dm" #include "code\modules\holodeck\HolodeckObjects.dm" #include "code\modules\holodeck\HolodeckPrograms.dm" @@ -3279,7 +3280,31 @@ #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" #include "code\modules\tension\tension.dm" +#include "code\modules\tgchat\message.dm" +#include "code\modules\tgchat\to_chat.dm" #include "code\modules\tgs\includes.dm" +#include "code\modules\tgui\external.dm" +#include "code\modules\tgui\states.dm" +#include "code\modules\tgui\tgui.dm" +#include "code\modules\tgui\tgui_window.dm" +#include "code\modules\tgui\states\admin.dm" +#include "code\modules\tgui\states\always.dm" +#include "code\modules\tgui\states\conscious.dm" +#include "code\modules\tgui\states\contained.dm" +#include "code\modules\tgui\states\debug.dm" +#include "code\modules\tgui\states\deep_inventory.dm" +#include "code\modules\tgui\states\default.dm" +#include "code\modules\tgui\states\human_adjacent.dm" +#include "code\modules\tgui\states\inventory.dm" +#include "code\modules\tgui\states\notcontained.dm" +#include "code\modules\tgui\states\observer.dm" +#include "code\modules\tgui\states\physical.dm" +#include "code\modules\tgui\states\self.dm" +#include "code\modules\tgui\states\zlevel.dm" +#include "code\modules\tgui_panel\audio.dm" +#include "code\modules\tgui_panel\external.dm" +#include "code\modules\tgui_panel\telemetry.dm" +#include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\turbolift\_turbolift.dm" #include "code\modules\turbolift\turbolift.dm"