diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm index 1c4a448cee..e85541a55d 100644 --- a/code/datums/uplink/announcements.dm +++ b/code/datums/uplink/announcements.dm @@ -25,16 +25,7 @@ return list("title" = title, "message" = message) /datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args) - for (var/obj/machinery/computer/communications/C in machines) - if(! (C.stat & (BROKEN|NOPOWER) ) ) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc ) - P.name = "'[command_name()] Update.'" - P.info = replacetext(args["message"], "\n", "
") - P.update_space(P.info) - P.update_icon() - C.messagetitle.Add(args["title"]) - C.messagetext.Add(P.info) - + post_comm_message(args["title"], replacetext(args["message"], "\n", "
")) command_announcement.Announce(args["message"], args["title"]) return 1 diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 4ee64999fa..b49c41f30f 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -180,7 +180,7 @@ /proc/get_access_by_id(id) var/list/AS = get_all_access_datums_by_id() - return AS[id] + return AS["[id]"] /proc/get_all_jobs() var/list/all_jobs = list() diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 7833a58d72..0f52e67b8c 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -26,7 +26,7 @@ var/list/formatted = list() for(var/job in jobs) formatted.Add(list(list( - "display_name" = replacetext(job, " ", " "), + "display_name" = replacetext(job, " ", " "), "target_rank" = get_target_rank(), "job" = job))) @@ -68,7 +68,7 @@ id_card.forceMove(src) modify = id_card - SSnanoui.update_uis(src) + SStgui.update_uis(src) attack_hand(user) /obj/machinery/computer/card/attack_ai(var/mob/user as mob) @@ -77,20 +77,27 @@ /obj/machinery/computer/card/attack_hand(mob/user as mob) if(..()) return if(stat & (NOPOWER|BROKEN)) return - ui_interact(user) + tgui_interact(user) -/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) - user.set_machine(src) +/obj/machinery/computer/card/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "IdentificationComputer", name) + ui.open() +/obj/machinery/computer/card/tgui_static_data(mob/user) + var/list/data = ..() if(data_core) data_core.get_manifest_list() + data["manifest"] = PDA_Manifest + return data + +/obj/machinery/computer/card/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = ..() - var/data[0] - data["src"] = "\ref[src]" data["station_name"] = station_name() data["mode"] = mode data["printing"] = printing - data["manifest"] = PDA_Manifest data["target_name"] = modify ? modify.name : "-----" data["target_owner"] = modify && modify.registered_name ? modify.registered_name : "-----" data["target_rank"] = get_target_rank() @@ -110,27 +117,27 @@ continue if(dept.centcom_only && !is_centcom()) continue - departments[++departments.len] = list("department_name" = dept.name, "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) ) - + departments.Add(list(list( + "department_name" = dept.name, + "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) + ))) data["departments"] = departments - if (modify && is_centcom()) - var/list/all_centcom_access = list() + var/list/all_centcom_access = list() + var/list/regions = list() + if(modify && is_centcom()) for(var/access in get_all_centcom_access()) all_centcom_access.Add(list(list( - "desc" = replacetext(get_centcom_access_desc(access), " ", " "), + "desc" = replacetext(get_centcom_access_desc(access), " ", " "), "ref" = access, "allowed" = (access in modify.access) ? 1 : 0))) - - data["all_centcom_access"] = all_centcom_access - else if (modify) - var/list/regions = list() - for(var/i = 1; i <= 7; i++) + else if(modify) + for(var/i in ACCESS_REGION_SECURITY to ACCESS_REGION_SUPPLY) var/list/accesses = list() for(var/access in get_region_accesses(i)) if (get_access_desc(access)) accesses.Add(list(list( - "desc" = replacetext(get_access_desc(access), " ", " "), + "desc" = replacetext(get_access_desc(access), " ", " "), "ref" = access, "allowed" = (access in modify.access) ? 1 : 0))) @@ -138,23 +145,20 @@ "name" = get_region_accesses_name(i), "accesses" = accesses))) - data["regions"] = regions + data["regions"] = regions + data["all_centcom_access"] = all_centcom_access - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700) - ui.set_initial_data(data) - ui.open() + return data -/obj/machinery/computer/card/Topic(href, href_list) +/obj/machinery/computer/card/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) - return 1 + return TRUE - switch(href_list["choice"]) - if ("modify") - if (modify) + switch(action) + if("modify") + if(modify) data_core.manifest_modify(modify.registered_name, modify.assignment) - modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") + modify.name = "[modify.registered_name]'s ID Card ([modify.assignment])" if(ishuman(usr)) modify.forceMove(get_turf(src)) if(!usr.get_active_hand()) @@ -165,12 +169,13 @@ modify = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + if(istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) I.forceMove(src) modify = I + . = TRUE - if ("scan") - if (scan) + if("scan") + if(scan) if(ishuman(usr)) scan.forceMove(get_turf(src)) if(!usr.get_active_hand()) @@ -181,25 +186,26 @@ scan = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id)) + if(istype(I, /obj/item/weapon/card/id)) usr.drop_item() I.forceMove(src) scan = I + . = TRUE if("access") - if(href_list["allowed"]) - if(is_authenticated()) - var/access_type = text2num(href_list["access_target"]) - var/access_allowed = text2num(href_list["allowed"]) - if(access_type in (is_centcom() ? get_all_centcom_access() : get_all_station_access())) - modify.access -= access_type - if(!access_allowed) - modify.access += access_type - modify.lost_access = list() //VOREStation addition: reset the lost access upon any modifications + if(is_authenticated()) + var/access_type = text2num(params["access_target"]) + var/access_allowed = text2num(params["allowed"]) + if(access_type in (is_centcom() ? get_all_centcom_access() : get_all_station_access())) + modify.access -= access_type + if(!access_allowed) + modify.access += access_type + modify.lost_access = list() //VOREStation addition: reset the lost access upon any modifications + . = TRUE - if ("assign") - if (is_authenticated() && modify) - var/t1 = href_list["assign_target"] + if("assign") + if(is_authenticated() && modify) + var/t1 = params["assign_target"] if(t1 == "Custom") var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"), 45) //let custom jobs function as an impromptu alt title, mainly for sechuds @@ -222,44 +228,42 @@ modify.lost_access = list() //VOREStation addition: reset the lost access upon any modifications callHook("reassign_employee", list(modify)) + . = TRUE - if ("reg") - if (is_authenticated()) - var/t2 = modify - if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) - var/temp_name = sanitizeName(href_list["reg"]) - if(temp_name) - modify.registered_name = temp_name - else - src.visible_message("[src] buzzes rudely.") - SSnanoui.update_uis(src) + if("reg") + if(is_authenticated()) + var/temp_name = sanitizeName(params["reg"]) + if(temp_name) + modify.registered_name = temp_name + else + visible_message("[src] buzzes rudely.") + . = TRUE - if ("account") - if (is_authenticated()) - var/t2 = modify - if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) - var/account_num = text2num(href_list["account"]) - modify.associated_account_number = account_num - SSnanoui.update_uis(src) + if("account") + if(is_authenticated()) + var/account_num = text2num(params["account"]) + modify.associated_account_number = account_num + . = TRUE - if ("mode") - mode = text2num(href_list["mode_target"]) + if("mode") + mode = text2num(params["mode_target"]) + . = TRUE - if ("print") - if (!printing) + if("print") + if(!printing) printing = 1 spawn(50) printing = null - SSnanoui.update_uis(src) + SStgui.update_uis(src) var/obj/item/weapon/paper/P = new(loc) - if (mode) + if(mode) P.name = text("crew manifest ([])", stationtime2text()) P.info = {"

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""] "} - else if (modify) + else if(modify) P.name = "access report" P.info = {"

Access Report

Prepared By: [scan.registered_name ? scan.registered_name : "Unknown"]
@@ -273,19 +277,20 @@ for(var/A in modify.access) P.info += " [get_access_desc(A)]" + . = TRUE - if ("terminate") - if (is_authenticated()) + if("terminate") + if(is_authenticated()) modify.assignment = "Dismissed" //VOREStation Edit: setting adjustment modify.access = list() modify.lost_access = list() //VOREStation addition: reset the lost access upon any modifications callHook("terminate_employee", list(modify)) - if (modify) - modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") + . = TRUE - return 1 + if(modify) + modify.name = "[modify.registered_name]'s ID Card ([modify.assignment])" /obj/machinery/computer/card/centcom name = "\improper CentCom ID card modification console" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 9333e32556..e878aaaf8a 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -9,553 +9,24 @@ light_color = "#0099ff" req_access = list(access_heads) circuit = /obj/item/weapon/circuitboard/communications - var/prints_intercept = 1 - var/authenticated = 0 - var/list/messagetitle = list() - var/list/messagetext = list() - var/currmsg = 0 - var/aicurrmsg = 0 - var/state = STATE_DEFAULT - var/aistate = STATE_DEFAULT - var/message_cooldown = 0 - var/centcomm_message_cooldown = 0 - var/tmp_alertlevel = 0 - var/const/STATE_DEFAULT = 1 - var/const/STATE_CALLSHUTTLE = 2 - var/const/STATE_CANCELSHUTTLE = 3 - var/const/STATE_MESSAGELIST = 4 - var/const/STATE_VIEWMESSAGE = 5 - var/const/STATE_DELMESSAGE = 6 - var/const/STATE_STATUSDISPLAY = 7 - var/const/STATE_ALERT_LEVEL = 8 - var/const/STATE_CONFIRM_LEVEL = 9 - var/const/STATE_CREWTRANSFER = 10 - var/status_display_freq = "1435" - var/stat_msg1 - var/stat_msg2 + var/datum/tgui_module/communications/communications - var/datum/lore/atc_controller/ATC - var/datum/announcement/priority/crew_announcement = new - -/obj/machinery/computer/communications/New() - ..() - ATC = atc - crew_announcement.newscast = 1 - -/obj/machinery/computer/communications/process() - if(..()) - if(state != STATE_STATUSDISPLAY) - src.updateDialog() - - -/obj/machinery/computer/communications/Topic(href, href_list) - if(..()) - return 1 - if (using_map && !(src.z in using_map.contact_levels)) - to_chat(usr, "Unable to establish a connection: You're too far away from the station!") - return - usr.set_machine(src) - - if(!href_list["operation"]) - return - switch(href_list["operation"]) - // main interface - if("main") - src.state = STATE_DEFAULT - if("login") - var/mob/M = usr - var/obj/item/weapon/card/id/I = M.GetIdCard() - if (I && istype(I)) - if(src.check_access(I)) - authenticated = 1 - if(access_captain in I.access) - authenticated = 2 - crew_announcement.announcer = GetNameAndAssignmentFromId(I) - if("logout") - authenticated = 0 - crew_announcement.announcer = "" - - if("swipeidseclevel") - if(src.authenticated) //Let heads change the alert level. - var/old_level = security_level - if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this - set_security_level(tmp_alertlevel) - if(security_level != old_level) - //Only notify the admins if an actual change happened - log_game("[key_name(usr)] has changed the security level to [get_security_level()].") - message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") - switch(security_level) - if(SEC_LEVEL_GREEN) - feedback_inc("alert_comms_green",1) - if(SEC_LEVEL_YELLOW) - feedback_inc("alert_comms_yellow",1) - if(SEC_LEVEL_VIOLET) - feedback_inc("alert_comms_violet",1) - if(SEC_LEVEL_ORANGE) - feedback_inc("alert_comms_orange",1) - if(SEC_LEVEL_BLUE) - feedback_inc("alert_comms_blue",1) - tmp_alertlevel = 0 - state = STATE_DEFAULT - - if("announce") - if(src.authenticated==2) - if(message_cooldown) - to_chat(usr, "Please allow at least one minute to pass between announcements") - return - var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|message - if(!input || !(usr in view(1,src))) - return - crew_announcement.Announce(input) - message_cooldown = 1 - spawn(600)//One minute cooldown - message_cooldown = 0 - - if("callshuttle") - src.state = STATE_DEFAULT - if(src.authenticated) - src.state = STATE_CALLSHUTTLE - if("callshuttle2") - if(src.authenticated) - call_shuttle_proc(usr) - if(emergency_shuttle.online()) - post_status("shuttle") - src.state = STATE_DEFAULT - if("cancelshuttle") - src.state = STATE_DEFAULT - if(src.authenticated) - src.state = STATE_CANCELSHUTTLE - if("cancelshuttle2") - if(src.authenticated) - cancel_call_proc(usr) - src.state = STATE_DEFAULT - if("messagelist") - src.currmsg = 0 - src.state = STATE_MESSAGELIST - if("toggleatc") - src.ATC.squelched = !src.ATC.squelched - if("viewmessage") - src.state = STATE_VIEWMESSAGE - if (!src.currmsg) - if(href_list["message-num"]) - src.currmsg = text2num(href_list["message-num"]) - else - src.state = STATE_MESSAGELIST - if("delmessage") - src.state = (src.currmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST - if("delmessage2") - if(src.authenticated) - if(src.currmsg) - var/title = src.messagetitle[src.currmsg] - var/text = src.messagetext[src.currmsg] - src.messagetitle.Remove(title) - src.messagetext.Remove(text) - if(src.currmsg == src.aicurrmsg) - src.aicurrmsg = 0 - src.currmsg = 0 - src.state = STATE_MESSAGELIST - else - src.state = STATE_VIEWMESSAGE - if("status") - src.state = STATE_STATUSDISPLAY - - // Status display stuff - if("setstat") - switch(href_list["statdisp"]) - if("message") - post_status("message", stat_msg1, stat_msg2) - if("alert") - post_status("alert", href_list["alert"]) - else - post_status(href_list["statdisp"]) - - if("setmsg1") - stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40) - src.updateDialog() - if("setmsg2") - stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40) - src.updateDialog() - - // OMG CENTCOMM LETTERHEAD - if("MessageCentCom") - if(src.authenticated==2) - if(centcomm_message_cooldown) - to_chat(usr, "Arrays recycling. Please stand by.") - return - var/input = sanitize(input("Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \ - Please be aware that this process is very expensive, and abuse will lead to... termination. \ - Transmission does not guarantee a response. \ - There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging") as null|message) - if(!input || !(usr in view(1,src))) - return - CentCom_announce(input, usr) - to_chat(usr, "Message transmitted.") - log_game("[key_name(usr)] has made an IA [using_map.boss_short] announcement: [input]") - centcomm_message_cooldown = 1 - spawn(300)//10 minute cooldown - centcomm_message_cooldown = 0 - - - // OMG SYNDICATE ...LETTERHEAD - if("MessageSyndicate") - if((src.authenticated==2) && (src.emagged)) - if(centcomm_message_cooldown) - to_chat(usr, "Arrays recycling. Please stand by.") - return - var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) - if(!input || !(usr in view(1,src))) - return - Syndicate_announce(input, usr) - to_chat(usr, "Message transmitted.") - log_game("[key_name(usr)] has made an illegal announcement: [input]") - centcomm_message_cooldown = 1 - spawn(300)//10 minute cooldown - centcomm_message_cooldown = 0 - - if("RestoreBackup") - to_chat(usr, "Backup routing data restored!") - src.emagged = 0 - src.updateDialog() - - - - // AI interface - if("ai-main") - src.aicurrmsg = 0 - src.aistate = STATE_DEFAULT - if("ai-callshuttle") - src.aistate = STATE_CALLSHUTTLE - if("ai-callshuttle2") - call_shuttle_proc(usr) - src.aistate = STATE_DEFAULT - if("ai-messagelist") - src.aicurrmsg = 0 - src.aistate = STATE_MESSAGELIST - if("ai-viewmessage") - src.aistate = STATE_VIEWMESSAGE - if (!src.aicurrmsg) - if(href_list["message-num"]) - src.aicurrmsg = text2num(href_list["message-num"]) - else - src.aistate = STATE_MESSAGELIST - if("ai-delmessage") - src.aistate = (src.aicurrmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST - if("ai-delmessage2") - if(src.aicurrmsg) - var/title = src.messagetitle[src.aicurrmsg] - var/text = src.messagetext[src.aicurrmsg] - src.messagetitle.Remove(title) - src.messagetext.Remove(text) - if(src.currmsg == src.aicurrmsg) - src.currmsg = 0 - src.aicurrmsg = 0 - src.aistate = STATE_MESSAGELIST - if("ai-status") - src.aistate = STATE_STATUSDISPLAY - - if("securitylevel") - src.tmp_alertlevel = text2num( href_list["newalertlevel"] ) - if(!tmp_alertlevel) tmp_alertlevel = 0 - state = STATE_CONFIRM_LEVEL - - if("changeseclevel") - state = STATE_ALERT_LEVEL - - - - src.updateUsrDialog() +/obj/machinery/computer/communications/Initialize() + . = ..() + communications = new(src) /obj/machinery/computer/communications/emag_act(var/remaining_charges, var/mob/user) if(!emagged) - src.emagged = 1 + emagged = TRUE + communications.emagged = TRUE to_chat(user, "You scramble the communication routing circuits!") - return 1 + return TRUE -/obj/machinery/computer/communications/attack_ai(var/mob/user as mob) - return src.attack_hand(user) +/obj/machinery/computer/communications/attack_ai(mob/user) + return attack_hand(user) -/obj/machinery/computer/communications/attack_hand(var/mob/user as mob) +/obj/machinery/computer/communications/attack_hand(mob/user) if(..()) return - if (using_map && !(src.z in using_map.contact_levels)) - to_chat(user, "Unable to establish a connection: You're too far away from the station!") - return - - user.set_machine(src) - var/dat = "Communications Console" - if (emergency_shuttle.has_eta()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - dat += "Emergency shuttle\n
\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]
" - - if (istype(user, /mob/living/silicon)) - var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access - if(dat2) - dat += dat2 - user << browse(dat, "window=communications;size=400x500") - onclose(user, "communications") - return - - switch(src.state) - if(STATE_DEFAULT) - if (src.authenticated) - dat += "
\[ Log Out \]" - if (src.authenticated==2) - dat += "
\[ Make An Announcement \]" - if(src.emagged == 0) - dat += "
\[ Send an emergency message to [using_map.boss_short] \]" - else - dat += "
\[ Send an emergency message to \[UNKNOWN\] \]" - dat += "
\[ Restore Backup Routing Data \]" - - dat += "
\[ Change alert level \]" - if(emergency_shuttle.location()) - if (emergency_shuttle.online()) - dat += "
\[ Cancel Shuttle Call \]" - else - dat += "
\[ Call Emergency Shuttle \]" - - dat += "
\[ Set Status Display \]" - else - dat += "
\[ Log In \]" - dat += "
\[ Message List \]" - dat += "
\[ [ATC.squelched ? "Enable" : "Disable"] ATC Relay \]" - if(STATE_CALLSHUTTLE) - dat += "Are you sure you want to call the shuttle? \[ OK | Cancel \]" - if(STATE_CANCELSHUTTLE) - dat += "Are you sure you want to cancel the shuttle? \[ OK | Cancel \]" - if(STATE_MESSAGELIST) - dat += "Messages:" - for(var/i = 1; i<=src.messagetitle.len; i++) - dat += "
[src.messagetitle[i]]" - if(STATE_VIEWMESSAGE) - if (src.currmsg) - dat += "[src.messagetitle[src.currmsg]]

[src.messagetext[src.currmsg]]" - if (src.authenticated) - dat += "

\[ Delete \]" - else - src.state = STATE_MESSAGELIST - src.attack_hand(user) - return - if(STATE_DELMESSAGE) - if (src.currmsg) - dat += "Are you sure you want to delete this message? \[ OK | Cancel \]" - else - src.state = STATE_MESSAGELIST - src.attack_hand(user) - return - if(STATE_STATUSDISPLAY) - dat += "Set Status Displays
" - dat += "\[ Clear \]
" - dat += "\[ Station Time \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - dat += "
" - dat += "\[ Alert: None |" - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]

" - if(STATE_ALERT_LEVEL) - dat += "Current alert level: [get_security_level()]
" - if(security_level == SEC_LEVEL_DELTA) - dat += "The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate." - else - dat += "Blue
" - dat += "Orange
" - dat += "Violet
" - dat += "Yellow
" - dat += "Green" - if(STATE_CONFIRM_LEVEL) - dat += "Current alert level: [get_security_level()]
" - dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]
" - dat += "OK to confirm change.
" - - dat += "
\[ [(src.state != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]" - user << browse(dat, "window=communications;size=400x500") - onclose(user, "communications") - - - - -/obj/machinery/computer/communications/proc/interact_ai(var/mob/living/silicon/ai/user as mob) - var/dat = "" - switch(src.aistate) - if(STATE_DEFAULT) - if(emergency_shuttle.location() && !emergency_shuttle.online()) - dat += "
\[ Call Emergency Shuttle \]" - dat += "
\[ Message List \]" - dat += "
\[ Set Status Display \]" - dat += "
\[ [ATC.squelched ? "Enable" : "Disable"] ATC Relay \]" - if(STATE_CALLSHUTTLE) - dat += "Are you sure you want to call the shuttle? \[ OK | Cancel \]" - if(STATE_MESSAGELIST) - dat += "Messages:" - for(var/i = 1; i<=src.messagetitle.len; i++) - dat += "
[src.messagetitle[i]]" - if(STATE_VIEWMESSAGE) - if (src.aicurrmsg) - dat += "[src.messagetitle[src.aicurrmsg]]

[src.messagetext[src.aicurrmsg]]" - dat += "

\[ Delete \]" - else - src.aistate = STATE_MESSAGELIST - src.attack_hand(user) - return null - if(STATE_DELMESSAGE) - if(src.aicurrmsg) - dat += "Are you sure you want to delete this message? \[ OK | Cancel \]" - else - src.aistate = STATE_MESSAGELIST - src.attack_hand(user) - return - - if(STATE_STATUSDISPLAY) - dat += "Set Status Displays
" - dat += "\[ Clear \]
" - dat += "\[ Station Time \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - dat += "
" - dat += "\[ Alert: None |" - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]

" - - - dat += "
\[ [(src.aistate != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]" - return dat - -/proc/enable_prison_shuttle(var/mob/user) - for(var/obj/machinery/computer/prison_shuttle/PS in machines) - PS.allowedtocall = !(PS.allowedtocall) - -/proc/call_shuttle_proc(var/mob/user) - if ((!( ticker ) || !emergency_shuttle.location())) - return - - if(!universe.OnShuttleCall(usr)) - to_chat(user, "Cannot establish a bluespace connection.") - return - - if(deathsquad.deployed) - to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.") - return - - if(emergency_shuttle.deny_shuttle) - to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.") - return - - if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE - to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.") - return - - if(emergency_shuttle.going_to_centcom()) - to_chat(user, "The emergency shuttle may not be called while returning to [using_map.boss_short].") - return - - if(emergency_shuttle.online()) - to_chat(user, "The emergency shuttle is already on its way.") - return - - if(ticker.mode.name == "blob") - to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") - return - - emergency_shuttle.call_evac() - log_game("[key_name(user)] has called the shuttle.") - message_admins("[key_name_admin(user)] has called the shuttle.", 1) - admin_chat_message(message = "Emergency evac beginning! Called by [key_name(user)]!", color = "#CC2222") //VOREStation Add - - - return - -/proc/init_shift_change(var/mob/user, var/force = 0) - if ((!( ticker ) || !emergency_shuttle.location())) - return - - if(emergency_shuttle.going_to_centcom()) - to_chat(user, "The shuttle may not be called while returning to [using_map.boss_short].") - return - - if(emergency_shuttle.online()) - to_chat(user, "The shuttle is already on its way.") - return - - // if force is 0, some things may stop the shuttle call - if(!force) - if(emergency_shuttle.deny_shuttle) - to_chat(user, "[using_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.") - return - - if(deathsquad.deployed == 1) - to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.") - return - - if(world.time < 54000) // 30 minute grace period to let the game get going - to_chat(user, "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again.") - return - - if(ticker.mode.auto_recall_shuttle) - //New version pretends to call the shuttle but cause the shuttle to return after a random duration. - emergency_shuttle.auto_recall = 1 - - if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic") - to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") - return - - emergency_shuttle.call_transfer() - - //delay events in case of an autotransfer - if (isnull(user)) - SSevents.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes - SSevents.delay_events(EVENT_LEVEL_MAJOR, 9000) - - log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.") - message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1) - admin_chat_message(message = "Autotransfer shuttle dispatched, shift ending soon.", color = "#2277BB") //VOREStation Add - - return - -/proc/cancel_call_proc(var/mob/user) - if (!( ticker ) || !emergency_shuttle.can_recall()) - return - if((ticker.mode.name == "blob")||(ticker.mode.name == "Meteor")) - return - - if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom - emergency_shuttle.recall() - log_game("[key_name(user)] has recalled the shuttle.") - message_admins("[key_name_admin(user)] has recalled the shuttle.", 1) - return - - -/proc/is_relay_online() - for(var/obj/machinery/telecomms/relay/M in world) - if(M.stat == 0) - return 1 - return 0 - -/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2) - - var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) - - if(!frequency) return - - var/datum/signal/status_signal = new - status_signal.source = src - status_signal.transmission_method = TRANSMISSION_RADIO - status_signal.data["command"] = command - - switch(command) - if("message") - status_signal.data["msg1"] = data1 - status_signal.data["msg2"] = data2 - log_admin("STATUS: [src.fingerprintslast] set status screen message with [src]: [data1] [data2]") - //message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]") - if("alert") - status_signal.data["picture_state"] = data1 - - frequency.post_signal(src, status_signal) + communications.tgui_interact(user) diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm new file mode 100644 index 0000000000..1d9cbf047e --- /dev/null +++ b/code/game/objects/items/stacks/tickets.dm @@ -0,0 +1,32 @@ +/obj/item/stack/arcadeticket + name = "arcade tickets" + desc = "Wow! With enough of these, you could buy a bike! ...Pssh, yeah right." + singular_name = "arcade ticket" + icon_state = "arcade-ticket" + item_state = "tickets" + w_class = ITEMSIZE_TINY + max_amount = 30 + +/obj/item/stack/arcadeticket/New(loc, amount = null) + . = ..() + update_icon() + +/obj/item/stack/arcadeticket/update_icon() + var/amount = get_amount() + switch(amount) + if(12 to INFINITY) + icon_state = "arcade-ticket_4" + if(6 to 12) + icon_state = "arcade-ticket_3" + if(2 to 6) + icon_state = "arcade-ticket_2" + else + icon_state = "arcade-ticket" + +/obj/item/stack/arcadeticket/proc/pay_tickets() + amount -= 2 + if(amount == 0) + qdel(src) + +/obj/item/stack/arcadeticket/thirty + amount = 30 \ No newline at end of file diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 384dcbcd9b..df3e695628 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -6,36 +6,36 @@ "tgui.bundle.css" = 'tgui/packages/tgui/public/tgui.bundle.css', ) -// /datum/asset/simple/headers -// assets = list( -// "alarm_green.gif" = 'icons/program_icons/alarm_green.gif', -// "alarm_red.gif" = 'icons/program_icons/alarm_red.gif', -// "batt_5.gif" = 'icons/program_icons/batt_5.gif', -// "batt_20.gif" = 'icons/program_icons/batt_20.gif', -// "batt_40.gif" = 'icons/program_icons/batt_40.gif', -// "batt_60.gif" = 'icons/program_icons/batt_60.gif', -// "batt_80.gif" = 'icons/program_icons/batt_80.gif', -// "batt_100.gif" = 'icons/program_icons/batt_100.gif', -// "charging.gif" = 'icons/program_icons/charging.gif', -// "downloader_finished.gif" = 'icons/program_icons/downloader_finished.gif', -// "downloader_running.gif" = 'icons/program_icons/downloader_running.gif', -// "ntnrc_idle.gif" = 'icons/program_icons/ntnrc_idle.gif', -// "ntnrc_new.gif" = 'icons/program_icons/ntnrc_new.gif', -// "power_norm.gif" = 'icons/program_icons/power_norm.gif', -// "power_warn.gif" = 'icons/program_icons/power_warn.gif', -// "sig_high.gif" = 'icons/program_icons/sig_high.gif', -// "sig_low.gif" = 'icons/program_icons/sig_low.gif', -// "sig_lan.gif" = 'icons/program_icons/sig_lan.gif', -// "sig_none.gif" = 'icons/program_icons/sig_none.gif', -// "smmon_0.gif" = 'icons/program_icons/smmon_0.gif', -// "smmon_1.gif" = 'icons/program_icons/smmon_1.gif', -// "smmon_2.gif" = 'icons/program_icons/smmon_2.gif', -// "smmon_3.gif" = 'icons/program_icons/smmon_3.gif', -// "smmon_4.gif" = 'icons/program_icons/smmon_4.gif', -// "smmon_5.gif" = 'icons/program_icons/smmon_5.gif', -// "smmon_6.gif" = 'icons/program_icons/smmon_6.gif', -// "borg_mon.gif" = 'icons/program_icons/borg_mon.gif' -// ) +/datum/asset/simple/headers + assets = list( + "alarm_green.gif" = 'icons/program_icons/alarm_green.gif', + "alarm_red.gif" = 'icons/program_icons/alarm_red.gif', + "batt_5.gif" = 'icons/program_icons/batt_5.gif', + "batt_20.gif" = 'icons/program_icons/batt_20.gif', + "batt_40.gif" = 'icons/program_icons/batt_40.gif', + "batt_60.gif" = 'icons/program_icons/batt_60.gif', + "batt_80.gif" = 'icons/program_icons/batt_80.gif', + "batt_100.gif" = 'icons/program_icons/batt_100.gif', + "charging.gif" = 'icons/program_icons/charging.gif', + "downloader_finished.gif" = 'icons/program_icons/downloader_finished.gif', + "downloader_running.gif" = 'icons/program_icons/downloader_running.gif', + "ntnrc_idle.gif" = 'icons/program_icons/ntnrc_idle.gif', + "ntnrc_new.gif" = 'icons/program_icons/ntnrc_new.gif', + "power_norm.gif" = 'icons/program_icons/power_norm.gif', + "power_warn.gif" = 'icons/program_icons/power_warn.gif', + "sig_high.gif" = 'icons/program_icons/sig_high.gif', + "sig_low.gif" = 'icons/program_icons/sig_low.gif', + "sig_lan.gif" = 'icons/program_icons/sig_lan.gif', + "sig_none.gif" = 'icons/program_icons/sig_none.gif', + "smmon_0.gif" = 'icons/program_icons/smmon_0.gif', + "smmon_1.gif" = 'icons/program_icons/smmon_1.gif', + "smmon_2.gif" = 'icons/program_icons/smmon_2.gif', + "smmon_3.gif" = 'icons/program_icons/smmon_3.gif', + "smmon_4.gif" = 'icons/program_icons/smmon_4.gif', + "smmon_5.gif" = 'icons/program_icons/smmon_5.gif', + "smmon_6.gif" = 'icons/program_icons/smmon_6.gif', + // "borg_mon.gif" = 'icons/program_icons/borg_mon.gif' + ) // /datum/asset/simple/radar_assets // assets = list( @@ -206,15 +206,15 @@ // "none_button.png" = 'html/none_button.png', // ) -// /datum/asset/simple/arcade -// assets = list( -// "boss1.gif" = 'icons/UI_Icons/Arcade/boss1.gif', -// "boss2.gif" = 'icons/UI_Icons/Arcade/boss2.gif', -// "boss3.gif" = 'icons/UI_Icons/Arcade/boss3.gif', -// "boss4.gif" = 'icons/UI_Icons/Arcade/boss4.gif', -// "boss5.gif" = 'icons/UI_Icons/Arcade/boss5.gif', -// "boss6.gif" = 'icons/UI_Icons/Arcade/boss6.gif', -// ) +/datum/asset/simple/arcade + assets = list( + "boss1.gif" = 'icons/UI_Icons/Arcade/boss1.gif', + "boss2.gif" = 'icons/UI_Icons/Arcade/boss2.gif', + "boss3.gif" = 'icons/UI_Icons/Arcade/boss3.gif', + "boss4.gif" = 'icons/UI_Icons/Arcade/boss4.gif', + "boss5.gif" = 'icons/UI_Icons/Arcade/boss5.gif', + "boss6.gif" = 'icons/UI_Icons/Arcade/boss6.gif', + ) // /datum/asset/spritesheet/simple/achievements // name ="achievements" diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm index 6c59145fe5..6447630c9e 100644 --- a/code/modules/events/supply_demand_vr.dm +++ b/code/modules/events/supply_demand_vr.dm @@ -84,17 +84,9 @@ var/datum/supply_demand_order/random = pick(required_items) command_announcement.Announce("What happened? Accounting is here right now and they're already asking where that [random.name] is. Damn, I gotta go", my_department) var/message = "The delivery deadline was reached with the following needs outstanding:
" - for (var/datum/supply_demand_order/req in required_items) + for(var/datum/supply_demand_order/req in required_items) message += req.describe() + "
" - for (var/obj/machinery/computer/communications/C in machines) - if(C.operable()) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc ) - P.name = "'[my_department] Mission Summary'" - P.info = message - P.update_space(P.info) - P.update_icon() - C.messagetitle.Add("[my_department] Mission Summary") - C.messagetext.Add(P.info) + post_comm_message("'[my_department] Mission Summary'", message) /** * Event Handler for responding to the supply shuttle arriving at centcom. */ diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 60966f6da2..4ee1d8935c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -399,9 +399,7 @@ var/list/ai_verbs_default = list( // hack to display shuttle timer if(emergency_shuttle.online()) - var/obj/machinery/computer/communications/C = locate() in machines - if(C) - C.post_status("shuttle") + post_status(src, "shuttle", user = src) /mob/living/silicon/ai/proc/ai_recall_shuttle() set category = "AI Commands" diff --git a/code/modules/modular_computers/NTNet/NTNet.dm b/code/modules/modular_computers/NTNet/NTNet.dm index 8370683522..6479f92a21 100644 --- a/code/modules/modular_computers/NTNet/NTNet.dm +++ b/code/modules/modular_computers/NTNet/NTNet.dm @@ -181,5 +181,8 @@ var/global/datum/ntnet/ntnet_global = new() return 1 return 0 - +/datum/ntnet/proc/get_chat_channel_by_id(id) + for(var/datum/ntnet_conversation/chan in chat_channels) + if(chan.id == id) + return chan diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm index 97b4cfe851..a2749836aa 100644 --- a/code/modules/modular_computers/computers/modular_computer/core.dm +++ b/code/modules/modular_computers/computers/modular_computer/core.dm @@ -119,7 +119,7 @@ active_program = null var/mob/user = usr if(user && istype(user)) - ui_interact(user) // Re-open the UI on this computer. It should show the main screen now. + tgui_interact(user) // Re-open the UI on this computer. It should show the main screen now. update_icon() // Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on) @@ -154,7 +154,7 @@ run_program(autorun.stored_data) if(user) - ui_interact(user) + tgui_interact(user) /obj/item/modular_computer/proc/minimize_program(mob/user) if(!active_program || !processor_unit) @@ -162,12 +162,11 @@ idle_threads.Add(active_program) active_program.program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs - SSnanoui.close_uis(active_program.NM ? active_program.NM : active_program) SStgui.close_uis(active_program.TM ? active_program.TM : active_program) active_program = null update_icon() if(istype(user)) - ui_interact(user) // Re-open the UI on this computer. It should show the main screen now. + tgui_interact(user) // Re-open the UI on this computer. It should show the main screen now. /obj/item/modular_computer/proc/run_program(prog) @@ -207,12 +206,12 @@ return 1 /obj/item/modular_computer/proc/update_uis() - if(active_program) //Should we update program ui or computer ui? - SSnanoui.update_uis(active_program) - if(active_program.NM) - SSnanoui.update_uis(active_program.NM) + if(active_program) + SStgui.update_uis(active_program) + if(active_program.TM) + SStgui.update_uis(active_program.TM) else - SSnanoui.update_uis(src) + SStgui.update_uis(src) /obj/item/modular_computer/proc/check_update_ui_need() var/ui_update_needed = 0 diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index c9ee11a77e..24c02c1add 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -99,7 +99,7 @@ /obj/item/modular_computer/attack_ghost(var/mob/observer/ghost/user) if(enabled) - ui_interact(user) + tgui_interact(user) else if(check_rights(R_ADMIN|R_EVENT, 0, user)) var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No") if(response == "Yes") @@ -116,7 +116,7 @@ // On-click handling. Turns on the computer if it's off and opens the GUI. /obj/item/modular_computer/attack_self(var/mob/user) if(enabled && screen_on) - ui_interact(user) + tgui_interact(user) else if(!enabled && screen_on) turn_on(user) diff --git a/code/modules/modular_computers/computers/modular_computer/ui.dm b/code/modules/modular_computers/computers/modular_computer/ui.dm index 81081c0cb1..5166d0d777 100644 --- a/code/modules/modular_computers/computers/modular_computer/ui.dm +++ b/code/modules/modular_computers/computers/modular_computer/ui.dm @@ -1,5 +1,10 @@ -// Operates NanoUI -/obj/item/modular_computer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +// Operates TGUI +/obj/item/modular_computer/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/simple/headers) + ) + +/obj/item/modular_computer/tgui_interact(mob/user, datum/tgui/ui) if(!screen_on || !enabled) if(ui) ui.close() @@ -13,7 +18,7 @@ if(active_program) if(ui) // This is the main laptop screen. Since we are switching to program's UI close it for now. ui.close() - active_program.ui_interact(user) + active_program.tgui_interact(user) return // We are still here, that means there is no program loaded. Load the BIOS/ROM/OS/whatever you want to call it. @@ -22,80 +27,100 @@ visible_message("\The [src] beeps three times, it's screen displaying \"DISK ERROR\" warning.") return // No HDD, No HDD files list or no stored files. Something is very broken. - var/datum/computer_file/data/autorun = hard_drive.find_file_by_name("autorun") - - var/list/data = get_header_data() - - var/list/programs = list() - for(var/datum/computer_file/program/P in hard_drive.stored_files) - var/list/program = list() - program["name"] = P.filename - program["desc"] = P.filedesc - program["icon"] = P.program_menu_icon - program["autorun"] = (istype(autorun) && (autorun.stored_data == P.filename)) ? 1 : 0 - if(P in idle_threads) - program["running"] = 1 - programs.Add(list(program)) - - data["programs"] = programs - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "laptop_mainscreen.tmpl", "NTOS Main Menu", 400, 500) - ui.auto_update_layout = 1 - ui.set_initial_data(data) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "NtosMain") + ui.set_autoupdate(TRUE) ui.open() - ui.set_auto_update(1) + +/obj/item/modular_computer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() + data["device_theme"] = device_theme + + data["login"] = list() + var/obj/item/weapon/computer_hardware/card_slot/cardholder = card_slot + if(cardholder) + var/obj/item/weapon/card/id/stored_card = cardholder.stored_card + if(stored_card) + var/stored_name = stored_card.registered_name + var/stored_title = stored_card.assignment + if(!stored_name) + stored_name = "Unknown" + if(!stored_title) + stored_title = "Unknown" + data["login"] = list( + IDName = stored_name, + IDJob = stored_title, + ) + + data["removable_media"] = list() + + var/datum/computer_file/data/autorun = hard_drive.find_file_by_name("autorun") + data["programs"] = list() + for(var/datum/computer_file/program/P in hard_drive.stored_files) + var/running = FALSE + if(P in idle_threads) + running = TRUE + + data["programs"] += list(list( + "name" = P.filename, + "desc" = P.filedesc, + "icon" = P.program_menu_icon, + "running" = running, + "autorun" = (istype(autorun) && (autorun.stored_data == P.filename)) ? 1 : 0 + )) + + data["has_light"] = FALSE // has_light + data["light_on"] = FALSE // light_on + data["comp_light_color"] = null // comp_light_color + + return data // Handles user's GUI input -/obj/item/modular_computer/Topic(href, href_list) +/obj/item/modular_computer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) - return 1 - if( href_list["PC_exit"] ) - kill_program() - return 1 - if( href_list["PC_enable_component"] ) - var/obj/item/weapon/computer_hardware/H = find_hardware_by_name(href_list["PC_enable_component"]) - if(H && istype(H) && !H.enabled) - H.enabled = 1 - . = 1 - if( href_list["PC_disable_component"] ) - var/obj/item/weapon/computer_hardware/H = find_hardware_by_name(href_list["PC_disable_component"]) - if(H && istype(H) && H.enabled) - H.enabled = 0 - . = 1 - if( href_list["PC_shutdown"] ) - shutdown_computer() - return 1 - if( href_list["PC_minimize"] ) - var/mob/user = usr - minimize_program(user) + return TRUE + + switch(action) + if("PC_exit") + kill_program() + return TRUE + if("PC_shutdown") + shutdown_computer() + return TRUE + if("PC_minimize") + var/mob/user = usr + minimize_program(user) + if("PC_killprogram") + var/prog = params["name"] + var/datum/computer_file/program/P = null + var/mob/user = usr + if(hard_drive) + P = hard_drive.find_file_by_name(prog) - if( href_list["PC_killprogram"] ) - var/prog = href_list["PC_killprogram"] - var/datum/computer_file/program/P = null - var/mob/user = usr - if(hard_drive) - P = hard_drive.find_file_by_name(prog) + if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED) + return - if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED) + P.kill_program(1) + to_chat(user, "Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.") + return TRUE + if("PC_runprogram") + return run_program(params["name"]) + if("PC_setautorun") + if(!hard_drive) + return + set_autorun(params["name"]) + return TRUE + if("PC_Eject_Disk") + var/param = params["name"] + switch(param) + if("ID") + proc_eject_id(usr) + return TRUE + else return - P.kill_program(1) - update_uis() - to_chat(user, "Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.") - - if( href_list["PC_runprogram"] ) - return run_program(href_list["PC_runprogram"]) - - if( href_list["PC_setautorun"] ) - if(!hard_drive) - return - set_autorun(href_list["PC_setautorun"]) - - if(.) - update_uis() - -// Function used by NanoUI's to obtain data for header. All relevant entries begin with "PC_" +// Function used by TGUI's to obtain data for header. All relevant entries begin with "PC_" /obj/item/modular_computer/proc/get_header_data() var/list/data = list() @@ -152,4 +177,4 @@ data["PC_stationtime"] = stationtime2text() data["PC_hasheader"] = 1 data["PC_showexitprogram"] = active_program ? 1 : 0 // Hides "Exit Program" button on mainscreen - return data \ No newline at end of file + return data diff --git a/code/modules/modular_computers/computers/modular_computer/variables.dm b/code/modules/modular_computers/computers/modular_computer/variables.dm index 8a1641a125..d89a82a0f3 100644 --- a/code/modules/modular_computers/computers/modular_computer/variables.dm +++ b/code/modules/modular_computers/computers/modular_computer/variables.dm @@ -6,6 +6,7 @@ var/enabled = 0 // Whether the computer is turned on. var/screen_on = 1 // Whether the computer is active/opened/it's screen is on. + var/device_theme = "ntos" // Sets the theme for the main menu, hardware config, and file browser apps. Overridden by certain non-NT devices. var/datum/computer_file/program/active_program = null // A currently active program running on the computer. var/hardware_flag = 0 // A flag that describes this device type var/last_power_usage = 0 // Last tick power usage of this computer diff --git a/code/modules/modular_computers/file_system/news_article.dm b/code/modules/modular_computers/file_system/news_article.dm index 833ba382e9..dffb978383 100644 --- a/code/modules/modular_computers/file_system/news_article.dm +++ b/code/modules/modular_computers/file_system/news_article.dm @@ -17,7 +17,7 @@ // NEWS DEFINITIONS BELOW THIS LINE -/* KEPT HERE AS AN EXAMPLE +/* /datum/computer_file/data/news_article/space/vol_one filename = "SPACE Magazine vol. 1" server_file_path = 'news_articles/space_magazine_1.html' diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 08589fb13c..8bc12174bf 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -5,9 +5,6 @@ var/required_access = null // List of required accesses to run/download the program. var/requires_access_to_run = 1 // Whether the program checks for required_access when run. var/requires_access_to_download = 1 // Whether the program checks for required_access when downloading. - // NanoModule - var/datum/nano_module/NM = null // If the program uses NanoModule, put it here and it will be automagically opened. Otherwise implement ui_interact. - var/nanomodule_path = null // Path to nanomodule, make sure to set this if implementing new program. // TGUIModule var/datum/tgui_module/TM = null // If the program uses TGUIModule, put it here and it will be automagically opened. Otherwise implement tgui_interact. var/tguimodule_path = null // Path to tguimodule, make sure to set this if implementing new program. @@ -29,6 +26,8 @@ var/computer_emagged = 0 // Set to 1 if computer that's running us was emagged. Computer updates this every Process() tick var/ui_header = null // Example: "something.gif" - a header image that will be rendered in computer's UI when this program is running at background. Images are taken from /nano/images/status_icons. Be careful not to use too large images! var/ntnet_speed = 0 // GQ/s - current network connectivity transfer rate + /// Name of the tgui interface + var/tgui_id /datum/computer_file/program/New(var/obj/item/modular_computer/comp = null) ..() @@ -39,16 +38,12 @@ computer = null . = ..() -/datum/computer_file/program/nano_host() - return computer.nano_host() - /datum/computer_file/program/tgui_host() return computer.tgui_host() /datum/computer_file/program/clone() var/datum/computer_file/program/temp = ..() temp.required_access = required_access - temp.nanomodule_path = nanomodule_path temp.filedesc = filedesc temp.program_icon_state = program_icon_state temp.requires_ntnet = requires_ntnet @@ -134,13 +129,9 @@ /datum/computer_file/program/proc/run_program(var/mob/living/user) if(can_run(user, 1) || !requires_access_to_run) computer.active_program = src - if(nanomodule_path) - NM = new nanomodule_path(src, new /datum/topic_manager/program(src), src) - NM.using_access = user.GetAccess() if(tguimodule_path) TM = new tguimodule_path(src) TM.using_access = user.GetAccess() - TM.tgui_interact(user) if(requires_ntnet && network_destination) generate_network_log("Connection opened to [network_destination].") program_state = PROGRAM_STATE_ACTIVE @@ -152,26 +143,28 @@ program_state = PROGRAM_STATE_KILLED if(network_destination) generate_network_log("Connection to [network_destination] closed.") - QDEL_NULL(NM) if(TM) SStgui.close_uis(TM) - qdel(TM) - TM = null + QDEL_NULL(TM) return 1 -// This is called every tick when the program is enabled. Ensure you do parent call if you override it. If parent returns 1 continue with UI initialisation. -// It returns 0 if it can't run or if NanoModule was used instead. I suggest using NanoModules where applicable. -/datum/computer_file/program/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(program_state != PROGRAM_STATE_ACTIVE) // Our program was closed. Close the ui if it exists. +/datum/computer_file/program/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/simple/headers) + ) + +/datum/computer_file/program/tgui_interact(mob/user, datum/tgui/ui) + if(program_state != PROGRAM_STATE_ACTIVE) if(ui) ui.close() - return computer.ui_interact(user) - if(istype(NM)) - NM.ui_interact(user, ui_key, null, force_open) - return 0 + return computer.tgui_interact(user) if(istype(TM)) TM.tgui_interact(user) return 0 + ui = SStgui.try_update_ui(user, src, ui) + if(!ui && tgui_id) + ui = new(user, src, tgui_id, filedesc) + ui.open() return 1 // CONVENTIONS, READ THIS WHEN CREATING NEW PROGRAM AND OVERRIDING THIS PROC: @@ -185,10 +178,43 @@ if(computer) return computer.Topic(href, href_list) +// CONVENTIONS, READ THIS WHEN CREATING NEW PROGRAM AND OVERRIDING THIS PROC: +// Topic calls are automagically forwarded from NanoModule this program contains. +// Calls beginning with "PRG_" are reserved for programs handling. +// Calls beginning with "PC_" are reserved for computer handling (by whatever runs the program) +// ALWAYS INCLUDE PARENT CALL ..() OR DIE IN FIRE. +/datum/computer_file/program/tgui_act(action,list/params, datum/tgui/ui) + if(..()) + return 1 + if(computer) + switch(action) + if("PC_exit") + computer.kill_program() + ui.close() + return 1 + if("PC_shutdown") + computer.shutdown_computer() + ui.close() + return 1 + if("PC_minimize") + var/mob/user = usr + if(!computer.active_program) + return + + computer.idle_threads.Add(computer.active_program) + program_state = PROGRAM_STATE_BACKGROUND // Should close any existing UIs + + computer.active_program = null + computer.update_icon() + ui.close() + + if(user && istype(user)) + computer.tgui_interact(user) // Re-open the UI on this computer. It should show the main screen now. + + + // Relays the call to nano module, if we have one /datum/computer_file/program/proc/check_eye(var/mob/user) - if(NM) - return NM.check_eye(user) if(TM) return TM.check_eye(user) else @@ -200,34 +226,14 @@ /obj/item/modular_computer/update_layout() return TRUE -/datum/nano_module/program - //available_to_ai = FALSE - var/datum/computer_file/program/program = null // Program-Based computer program that runs this nano module. Defaults to null. - -/datum/nano_module/program/New(var/host, var/topic_manager, var/program) - ..() - src.program = program - -/datum/topic_manager/program - var/datum/program - -/datum/topic_manager/program/New(var/datum/program) - ..() - src.program = program - -// Calls forwarded to PROGRAM itself should begin with "PRG_" -// Calls forwarded to COMPUTER running the program should begin with "PC_" -/datum/topic_manager/program/Topic(href, href_list) - return program && program.Topic(href, href_list) - /datum/computer_file/program/apply_visual(mob/M) - if(NM) - return NM.apply_visual(M) + if(TM) + return TM.apply_visual(M) /datum/computer_file/program/remove_visual(mob/M) - if(NM) - return NM.remove_visual(M) + if(TM) + return TM.remove_visual(M) /datum/computer_file/program/proc/relaymove(var/mob/M, direction) - if(NM) - return NM.relaymove(M, direction) \ No newline at end of file + if(TM) + return TM.relaymove(M, direction) \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm b/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm index 04bf931593..11547e3426 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/access_decrypter.dm @@ -6,15 +6,17 @@ program_menu_icon = "unlocked" extended_desc = "This highly advanced script can very slowly decrypt operational codes used in almost any network. These codes can be downloaded to an ID card to expand the available access. The system administrator will probably notice this." size = 34 - requires_ntnet = 1 - available_on_ntnet = 0 - available_on_syndinet = 1 - nanomodule_path = /datum/nano_module/program/access_decrypter/ + requires_ntnet = TRUE + available_on_ntnet = FALSE + available_on_syndinet = TRUE + tgui_id = "NtosAccessDecrypter" + var/message = "" var/running = FALSE var/progress = 0 var/target_progress = 300 var/datum/access/target_access = null + var/list/restricted_access_codes = list(access_change_ids, access_network) // access codes that are not hackable due to balance reasons /datum/computer_file/program/access_decrypter/kill_program(var/forced) reset() @@ -48,82 +50,63 @@ message = "Successfully decrypted and saved operational key codes. Downloaded access codes for: [target_access.desc]" target_access = null -/datum/computer_file/program/access_decrypter/Topic(href, href_list) +/datum/computer_file/program/access_decrypter/tgui_act(action, list/params, datum/tgui/ui) if(..()) - return 1 - if(href_list["PRG_reset"]) - reset() - return 1 - if(href_list["PRG_execute"]) - if(running) - return 1 - if(text2num(href_list["allowed"])) - return 1 - var/obj/item/weapon/computer_hardware/processor_unit/CPU = computer.processor_unit - var/obj/item/weapon/computer_hardware/card_slot/RFID = computer.card_slot - if(!istype(CPU) || !CPU.check_functionality() || !istype(RFID) || !RFID.check_functionality()) - message = "A fatal hardware error has been detected." - return - if(!istype(RFID.stored_card)) - message = "RFID card is not present in the device. Operation aborted." - return - running = TRUE - target_access = get_access_by_id(href_list["PRG_execute"]) - if(ntnet_global.intrusion_detection_enabled) - ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]") - ntnet_global.intrusion_detection_alarm = 1 - return 1 + return TRUE + switch(action) + if("PRG_reset") + reset() + return TRUE + if("PRG_execute") + if(running) + return TRUE + if(text2num(params["allowed"])) + return TRUE + var/obj/item/weapon/computer_hardware/processor_unit/CPU = computer.processor_unit + var/obj/item/weapon/computer_hardware/card_slot/RFID = computer.card_slot + if(!istype(CPU) || !CPU.check_functionality() || !istype(RFID) || !RFID.check_functionality()) + message = "A fatal hardware error has been detected." + return + if(!istype(RFID.stored_card)) + message = "RFID card is not present in the device. Operation aborted." + return + running = TRUE + target_access = get_access_by_id("[params["access_target"]]") + if(ntnet_global.intrusion_detection_enabled) + ntnet_global.add_log("IDS WARNING - Unauthorised access attempt to primary keycode database from device: [computer.network_card.get_network_tag()]") + ntnet_global.intrusion_detection_alarm = TRUE + return TRUE -/datum/nano_module/program/access_decrypter - name = "NTNet Access Decrypter" - var/list/restricted_access_codes = list(access_change_ids, access_network) // access codes that are not hackable due to balance reasons - -/datum/nano_module/program/access_decrypter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) +/datum/computer_file/program/access_decrypter/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) if(!ntnet_global) return - var/datum/computer_file/program/access_decrypter/PRG = program - var/list/data = list() - if(!istype(PRG)) - return - data = PRG.get_header_data() + var/list/data = get_header_data() - if(PRG.message) - data["message"] = PRG.message - else if(PRG.running) + var/list/regions = list() + data["message"] = null + data["running"] = running + if(message) + data["message"] = message + else if(running) data["running"] = 1 - data["rate"] = PRG.computer.processor_unit.max_idle_programs - - // Stolen from DOS traffic generator, generates strings of 1s and 0s - var/percentage = (PRG.progress / PRG.target_progress) * 100 - var/list/strings[0] - for(var/j, j<10, j++) - var/string = "" - for(var/i, i<20, i++) - string = "[string][prob(percentage)]" - strings.Add(string) - data["dos_strings"] = strings - else if(program.computer.card_slot && program.computer.card_slot.stored_card) - var/obj/item/weapon/card/id/id_card = program.computer.card_slot.stored_card - var/list/regions = list() + data["rate"] = computer.processor_unit.max_idle_programs + data["factor"] = (progress / target_progress) + else if(computer?.card_slot?.stored_card) + var/obj/item/weapon/card/id/id_card = computer.card_slot.stored_card for(var/i = 1; i <= 7; i++) var/list/accesses = list() for(var/access in get_region_accesses(i)) - if (get_access_desc(access)) + if(get_access_desc(access) && !(access in restricted_access_codes)) accesses.Add(list(list( - "desc" = replacetext(get_access_desc(access), " ", " "), + "desc" = replacetext(get_access_desc(access), " ", " "), "ref" = access, - "allowed" = (access in id_card.access) ? 1 : 0, - "blocked" = (access in restricted_access_codes) ? 1 : 0))) + "allowed" = (access in id_card.access) ? 1 : 0 + ))) regions.Add(list(list( "name" = get_region_accesses_name(i), - "accesses" = accesses))) - data["regions"] = regions + "accesses" = accesses + ))) + data["regions"] = regions - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "access_decrypter.tmpl", "NTNet Access Decrypter", 550, 400, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) \ No newline at end of file + return data \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm index 0e0a1381bd..e1fa0cfa8a 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm @@ -6,10 +6,11 @@ program_menu_icon = "arrow-4-diag" extended_desc = "This advanced script can perform denial of service attacks against NTNet quantum relays. The system administrator will probably notice this. Multiple devices can run this program together against same relay for increased effect" size = 20 - requires_ntnet = 1 - available_on_ntnet = 0 - available_on_syndinet = 1 - nanomodule_path = /datum/nano_module/program/computer_dos/ + requires_ntnet = TRUE + available_on_ntnet = FALSE + available_on_syndinet = TRUE + tgui_id = "NtosNetDos" + var/obj/machinery/ntnet_relay/target = null var/dos_speed = 0 var/error = "" @@ -39,70 +40,51 @@ ..(forced) -/datum/nano_module/program/computer_dos - name = "DoS Traffic Generator" - -/datum/nano_module/program/computer_dos/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) +/datum/computer_file/program/ntnet_dos/tgui_data(mob/user) if(!ntnet_global) return - var/datum/computer_file/program/ntnet_dos/PRG = program - var/list/data = list() - if(!istype(PRG)) - return - data = PRG.get_header_data() - if(PRG.error) - data["error"] = PRG.error - else if(PRG.target && PRG.executed) - data["target"] = 1 - data["speed"] = PRG.dos_speed + var/list/data = get_header_data() - // This is mostly visual, generate some strings of 1s and 0s - // Probability of 1 is equal of completion percentage of DoS attack on this relay. - // Combined with UI updates this adds quite nice effect to the UI - var/percentage = PRG.target.dos_overload * 100 / PRG.target.dos_capacity - var/list/strings[0] - for(var/j, j<10, j++) - var/string = "" - for(var/i, i<20, i++) - string = "[string][prob(percentage)]" - strings.Add(string) - data["dos_strings"] = strings + data["error"] = error + if(target && executed) + data["target"] = TRUE + data["speed"] = dos_speed + + data["overload"] = target.dos_overload + data["capacity"] = target.dos_capacity else - var/list/relays[0] + data["target"] = FALSE + data["relays"] = list() for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays) - relays.Add(R.uid) - data["relays"] = relays - data["focus"] = PRG.target ? PRG.target.uid : null + data["relays"] += list(list("id" = R.uid)) + data["focus"] = target ? target.uid : null - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "ntnet_dos.tmpl", "DoS Traffic Generator", 400, 250, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data -/datum/computer_file/program/ntnet_dos/Topic(href, href_list) +/datum/computer_file/program/ntnet_dos/tgui_act(action, params) if(..()) - return 1 - if(href_list["PRG_target_relay"]) - for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays) - if("[R.uid]" == href_list["PRG_target_relay"]) - target = R - return 1 - if(href_list["PRG_reset"]) - if(target) - target.dos_sources.Remove(src) - target = null - executed = 0 - error = "" - return 1 - if(href_list["PRG_execute"]) - if(target) - executed = 1 - target.dos_sources.Add(src) - if(ntnet_global.intrusion_detection_enabled) - ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [computer.network_card.get_network_tag()]") - ntnet_global.intrusion_detection_alarm = 1 - return 1 + return TRUE + switch(action) + if("PRG_target_relay") + for(var/obj/machinery/ntnet_relay/R in ntnet_global.relays) + if(R.uid == text2num(params["targid"])) + target = R + break + return TRUE + if("PRG_reset") + if(target) + target.dos_sources.Remove(src) + target = null + executed = FALSE + error = "" + return TRUE + if("PRG_execute") + if(target) + executed = TRUE + target.dos_sources.Add(src) + if(ntnet_global.intrusion_detection_enabled) + var/obj/item/weapon/computer_hardware/network_card/network_card = computer.network_card + ntnet_global.add_log("IDS WARNING - Excess traffic flood targeting relay [target.uid] detected from device: [network_card.get_network_tag()]") + ntnet_global.intrusion_detection_alarm = TRUE + return TRUE diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 17199c3b18..5d0e291336 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -6,10 +6,10 @@ program_menu_icon = "home" extended_desc = "This virus can destroy hard drive of system it is executed on. It may be obfuscated to look like another non-malicious program. Once armed, it will destroy the system upon next execution." size = 13 - requires_ntnet = 0 - available_on_ntnet = 0 - available_on_syndinet = 1 - nanomodule_path = /datum/nano_module/program/revelation/ + requires_ntnet = FALSE + available_on_ntnet = FALSE + available_on_syndinet = TRUE + tgui_id = "NtosRevelation" var/armed = 0 /datum/computer_file/program/revelation/run_program(var/mob/living/user) @@ -37,48 +37,31 @@ if(computer.tesla_link && prob(50)) qdel(computer.tesla_link) -/datum/computer_file/program/revelation/Topic(href, href_list) +/datum/computer_file/program/revelation/tgui_act(action, params) if(..()) - return 1 - else if(href_list["PRG_arm"]) - armed = !armed - else if(href_list["PRG_activate"]) - activate() - else if(href_list["PRG_obfuscate"]) - var/mob/living/user = usr - var/newname = sanitize(input(user, "Enter new program name: ")) - if(!newname) - return - filedesc = newname - for(var/datum/computer_file/program/P in ntnet_global.available_station_software) - if(filedesc == P.filedesc) - program_menu_icon = P.program_menu_icon - break - return 1 + return + switch(action) + if("PRG_arm") + armed = !armed + return TRUE + if("PRG_activate") + activate() + return TRUE + if("PRG_obfuscate") + var/newname = params["new_name"] + if(!newname) + return + filedesc = newname + return TRUE /datum/computer_file/program/revelation/clone() var/datum/computer_file/program/revelation/temp = ..() temp.armed = armed return temp -/datum/nano_module/program/revelation - name = "Revelation Virus" +/datum/computer_file/program/revelation/tgui_data(mob/user) + var/list/data = get_header_data() -/datum/nano_module/program/revelation/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = list() - var/datum/computer_file/program/revelation/PRG = program - if(!istype(PRG)) - return - - data = PRG.get_header_data() - - data["armed"] = PRG.armed - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "revelation.tmpl", "Revelation Virus", 400, 250, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + data["armed"] = armed + return data \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm index aa122c0abf..47fe4ea2b3 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -1,7 +1,7 @@ /datum/computer_file/program/card_mod filename = "cardmod" filedesc = "ID card modification program" - nanomodule_path = /datum/nano_module/program/card_mod + tguimodule_path = /datum/tgui_module/cardmod program_icon_state = "id" program_key_state = "id_key" program_menu_icon = "key" @@ -9,220 +9,3 @@ required_access = access_change_ids requires_ntnet = 0 size = 8 - -/datum/nano_module/program/card_mod - name = "ID card modification program" - var/mod_mode = 1 - var/is_centcom = 0 - var/show_assignments = 0 - -/datum/nano_module/program/card_mod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - - data["src"] = "\ref[src]" - data["station_name"] = station_name() - data["manifest"] = data_core ? data_core.get_manifest(0) : null - data["assignments"] = show_assignments - if(program && program.computer) - data["have_id_slot"] = !!program.computer.card_slot - data["have_printer"] = !!program.computer.nano_printer - data["authenticated"] = program.can_run(user) - if(!program.computer.card_slot) - mod_mode = 0 //We can't modify IDs when there is no card reader - else - data["have_id_slot"] = 0 - data["have_printer"] = 0 - data["authenticated"] = 0 - data["mmode"] = mod_mode - data["centcom_access"] = is_centcom - - if(program && program.computer && program.computer.card_slot) - var/obj/item/weapon/card/id/id_card = program.computer.card_slot.stored_card - data["has_id"] = !!id_card - data["id_account_number"] = id_card ? id_card.associated_account_number : null - data["id_rank"] = id_card && id_card.assignment ? id_card.assignment : "Unassigned" - data["id_owner"] = id_card && id_card.registered_name ? id_card.registered_name : "-----" - data["id_name"] = id_card ? id_card.name : "-----" - - var/list/departments = list() - for(var/D in SSjob.get_all_department_datums()) - var/datum/department/dept = D - if(!dept.assignable) // No AI ID cards for you. - continue - if(dept.centcom_only && !is_centcom) - continue - departments[++departments.len] = list("department_name" = dept.name, "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) ) - - data["departments"] = departments - - data["all_centcom_access"] = is_centcom ? get_accesses(1) : null - data["regions"] = get_accesses() - - if(program.computer.card_slot && program.computer.card_slot.stored_card) - var/obj/item/weapon/card/id/id_card = program.computer.card_slot.stored_card - if(is_centcom) - var/list/all_centcom_access = list() - for(var/access in get_all_centcom_access()) - all_centcom_access.Add(list(list( - "desc" = replacetext(get_centcom_access_desc(access), " ", " "), - "ref" = access, - "allowed" = (access in id_card.access) ? 1 : 0))) - data["all_centcom_access"] = all_centcom_access - else - var/list/regions = list() - for(var/i = 1; i <= 7; i++) - var/list/accesses = list() - for(var/access in get_region_accesses(i)) - if (get_access_desc(access)) - accesses.Add(list(list( - "desc" = replacetext(get_access_desc(access), " ", " "), - "ref" = access, - "allowed" = (access in id_card.access) ? 1 : 0))) - - regions.Add(list(list( - "name" = get_region_accesses_name(i), - "accesses" = accesses))) - data["regions"] = regions - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "mod_identification_computer.tmpl", name, 600, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - -/datum/nano_module/program/card_mod/proc/format_jobs(list/jobs) - var/obj/item/weapon/card/id/id_card = program.computer.card_slot ? program.computer.card_slot.stored_card : null - var/list/formatted = list() - for(var/job in jobs) - formatted.Add(list(list( - "display_name" = replacetext(job, " ", " "), - "target_rank" = id_card && id_card.assignment ? id_card.assignment : "Unassigned", - "job" = job))) - - return formatted - -/datum/nano_module/program/card_mod/proc/get_accesses(var/is_centcom = 0) - return null - - -/datum/computer_file/program/card_mod/Topic(href, href_list) - if(..()) - return 1 - - var/mob/user = usr - var/obj/item/weapon/card/id/user_id_card = user.GetIdCard() - var/obj/item/weapon/card/id/id_card - if (computer.card_slot) - id_card = computer.card_slot.stored_card - - var/datum/nano_module/program/card_mod/module = NM - switch(href_list["action"]) - if("switchm") - if(href_list["target"] == "mod") - module.mod_mode = 1 - else if (href_list["target"] == "manifest") - module.mod_mode = 0 - if("togglea") - if(module.show_assignments) - module.show_assignments = 0 - else - module.show_assignments = 1 - if("print") - if(computer && computer.nano_printer) //This option should never be called if there is no printer - if(module.mod_mode) - if(can_run(user, 1)) - var/contents = {"

Access Report

- Prepared By: [user_id_card.registered_name ? user_id_card.registered_name : "Unknown"]
- For: [id_card.registered_name ? id_card.registered_name : "Unregistered"]
-
- Assignment: [id_card.assignment]
- Account Number: #[id_card.associated_account_number]
- Blood Type: [id_card.blood_type]

- Access:
- "} - - var/known_access_rights = get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM) - for(var/A in id_card.access) - if(A in known_access_rights) - contents += " [get_access_desc(A)]" - - if(!computer.nano_printer.print_text(contents,"access report")) - to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") - return - else - computer.visible_message("\The [computer] prints out paper.") - else - var/contents = {"

Crew Manifest

-
- [data_core ? data_core.get_manifest(0) : ""] - "} - if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", stationtime2text()))) - to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") - return - else - computer.visible_message("\The [computer] prints out paper.") - if("eject") - if(computer && computer.card_slot) - if(id_card) - data_core.manifest_modify(id_card.registered_name, id_card.assignment) - computer.proc_eject_id(user) - if("terminate") - if(computer && can_run(user, 1)) - id_card.assignment = "Dismissed" //VOREStation Edit: setting adjustment - id_card.access = list() - callHook("terminate_employee", list(id_card)) - if("edit") - if(computer && can_run(user, 1)) - if(href_list["name"]) - var/temp_name = sanitizeName(input("Enter name.", "Name", id_card.registered_name),allow_numbers=TRUE) - if(temp_name) - id_card.registered_name = temp_name - else - computer.visible_message("[computer] buzzes rudely.") - else if(href_list["account"]) - var/account_num = text2num(input("Enter account number.", "Account", id_card.associated_account_number)) - id_card.associated_account_number = account_num - if("assign") - if(computer && can_run(user, 1) && id_card) - var/t1 = href_list["assign_target"] - if(t1 == "Custom") - var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment", id_card.assignment), 45) - //let custom jobs function as an impromptu alt title, mainly for sechuds - if(temp_t) - id_card.assignment = temp_t - else - var/list/access = list() - if(module.is_centcom) - access = get_centcom_access(t1) - else - var/datum/job/jobdatum - for(var/jobtype in typesof(/datum/job)) - var/datum/job/J = new jobtype - if(ckey(J.title) == ckey(t1)) - jobdatum = J - break - if(!jobdatum) - to_chat(usr, "No log exists for this job: [t1]") - return - - access = jobdatum.get_access() - - id_card.access = access - id_card.assignment = t1 - id_card.rank = t1 - - callHook("reassign_employee", list(id_card)) - if("access") - if(href_list["allowed"] && computer && can_run(user, 1)) - var/access_type = text2num(href_list["access_target"]) - var/access_allowed = text2num(href_list["allowed"]) - if(access_type in get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)) - id_card.access -= access_type - if(!access_allowed) - id_card.access += access_type - if(id_card) - id_card.name = text("[id_card.registered_name]'s ID Card ([id_card.assignment])") - - SSnanoui.update_uis(NM) - return 1 diff --git a/code/modules/modular_computers/file_system/programs/command/comm.dm b/code/modules/modular_computers/file_system/programs/command/comm.dm index fc2efa8820..a2079ad494 100644 --- a/code/modules/modular_computers/file_system/programs/command/comm.dm +++ b/code/modules/modular_computers/file_system/programs/command/comm.dm @@ -9,7 +9,7 @@ program_icon_state = "comm" program_key_state = "med_key" program_menu_icon = "flag" - nanomodule_path = /datum/nano_module/program/comm + tguimodule_path = /datum/tgui_module/communications/ntos extended_desc = "Used to command and control. Can relay long-range communications. This program can not be run on tablet computers." required_access = access_heads requires_ntnet = 1 @@ -24,269 +24,6 @@ temp.message_core.messages = message_core.messages.Copy() return temp -/datum/nano_module/program/comm - name = "Command and Communications Program" - //available_to_ai = TRUE - var/current_status = STATE_DEFAULT - var/msg_line1 = "" - var/msg_line2 = "" - var/centcomm_message_cooldown = 0 - var/announcment_cooldown = 0 - var/datum/announcement/priority/crew_announcement = new - var/current_viewing_message_id = 0 - var/current_viewing_message = null - -/datum/nano_module/program/comm/New() - ..() - crew_announcement.newscast = 1 - -/datum/nano_module/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - - if(program) - data["emagged"] = program.computer_emagged - data["net_comms"] = !!program.get_signal(NTNET_COMMUNICATION) //Double !! is needed to get 1 or 0 answer - data["net_syscont"] = !!program.get_signal(NTNET_SYSTEMCONTROL) - if(program.computer) - data["have_printer"] = !!program.computer.nano_printer - else - data["have_printer"] = 0 - else - data["emagged"] = 0 - data["net_comms"] = 1 - data["net_syscont"] = 1 - data["have_printer"] = 0 - - data["message_line1"] = msg_line1 - data["message_line2"] = msg_line2 - data["state"] = current_status - data["isAI"] = issilicon(usr) - data["authenticated"] = get_authentication_level(user) - data["current_security_level"] = security_level - data["current_security_level_title"] = num2seclevel(security_level) - - data["def_SEC_LEVEL_DELTA"] = SEC_LEVEL_DELTA - data["def_SEC_LEVEL_YELLOW"] = SEC_LEVEL_YELLOW - data["def_SEC_LEVEL_ORANGE"] = SEC_LEVEL_ORANGE - data["def_SEC_LEVEL_VIOLET"] = SEC_LEVEL_VIOLET - data["def_SEC_LEVEL_BLUE"] = SEC_LEVEL_BLUE - data["def_SEC_LEVEL_GREEN"] = SEC_LEVEL_GREEN - - var/datum/comm_message_listener/l = obtain_message_listener() - data["messages"] = l.messages - data["message_deletion_allowed"] = l != global_message_listener - data["message_current_id"] = current_viewing_message_id - if(current_viewing_message) - data["message_current"] = current_viewing_message - - if(emergency_shuttle.location()) - data["have_shuttle"] = 1 - if(emergency_shuttle.online()) - data["have_shuttle_called"] = 1 - else - data["have_shuttle_called"] = 0 - else - data["have_shuttle"] = 0 - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "mod_communication.tmpl", name, 550, 420, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - -/datum/nano_module/program/comm/proc/get_authentication_level(var/mob/user) - if(program) - if(program.can_run(user, 0, access_captain)) - return 2 - else - return program.can_run(user) - return 1 - -/datum/nano_module/program/comm/proc/obtain_message_listener() - if(program) - var/datum/computer_file/program/comm/P = program - return P.message_core - return global_message_listener - -/datum/nano_module/program/comm/Topic(href, href_list) - if(..()) - return 1 - var/mob/user = usr - var/ntn_comm = program ? !!program.get_signal(NTNET_COMMUNICATION) : 1 - var/ntn_cont = program ? !!program.get_signal(NTNET_SYSTEMCONTROL) : 1 - var/datum/comm_message_listener/l = obtain_message_listener() - switch(href_list["action"]) - if("sw_menu") - . = 1 - current_status = text2num(href_list["target"]) - if("announce") - . = 1 - if(get_authentication_level(user) == 2 && !issilicon(usr) && ntn_comm) - if(user) - var/obj/item/weapon/card/id/id_card = user.GetIdCard() - crew_announcement.announcer = GetNameAndAssignmentFromId(id_card) - else - crew_announcement.announcer = "Unknown" - if(announcment_cooldown) - to_chat(usr, "Please allow at least one minute to pass between announcements") - return TRUE - var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|message - if(!input || !can_still_topic()) - return 1 - crew_announcement.Announce(input) - announcment_cooldown = 1 - spawn(600)//One minute cooldown - announcment_cooldown = 0 - if("message") - . = 1 - if(href_list["target"] == "emagged") - if(program) - if(get_authentication_level(user) == 2 && program.computer_emagged && !issilicon(usr) && ntn_comm) - if(centcomm_message_cooldown) - to_chat(usr, "Arrays recycling. Please stand by.") - SSnanoui.update_uis(src) - return - var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") as null|text) - if(!input || !can_still_topic()) - return 1 - Syndicate_announce(input, usr) - to_chat(usr, "Message transmitted.") - log_say("[key_name(usr)] has made an illegal announcement: [input]") - centcomm_message_cooldown = 1 - spawn(300)//30 second cooldown - centcomm_message_cooldown = 0 - else if(href_list["target"] == "regular") - if(get_authentication_level(user) == 2 && !issilicon(usr) && ntn_comm) - if(centcomm_message_cooldown) - to_chat(usr, "Arrays recycling. Please stand by.") - SSnanoui.update_uis(src) - return - if(!is_relay_online())//Contact Centcom has a check, Syndie doesn't to allow for Traitor funs. - to_chat(usr, "No Emergency Bluespace Relay detected. Unable to transmit message.") - return 1 - var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. \ - Please be aware that this process is very expensive, and abuse will lead to... termination. \ - Transmission does not guarantee a response. There is a 30 second delay before you may send another message, \ - be clear, full and concise.", "Central Command Quantum Messaging") as null|message) - if(!input || !can_still_topic()) - return 1 - CentCom_announce(input, usr) - to_chat(usr, "Message transmitted.") - log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]") - centcomm_message_cooldown = 1 - spawn(300) //30 second cooldown - centcomm_message_cooldown = 0 - if("shuttle") - . = 1 - if(get_authentication_level(user) && ntn_cont) - if(href_list["target"] == "call") - var/confirm = alert("Are you sure you want to call the shuttle?", name, "No", "Yes") - if(confirm == "Yes" && can_still_topic()) - call_shuttle_proc(usr) - - if(href_list["target"] == "cancel" && !issilicon(usr)) - var/confirm = alert("Are you sure you want to cancel the shuttle?", name, "No", "Yes") - if(confirm == "Yes" && can_still_topic()) - cancel_call_proc(usr) - if("setstatus") - . = 1 - if(get_authentication_level(user) && ntn_cont) - switch(href_list["target"]) - if("line1") - var/linput = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", msg_line1) as text|null, 40), 40) - if(can_still_topic()) - msg_line1 = linput - if("line2") - var/linput = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", msg_line2) as text|null, 40), 40) - if(can_still_topic()) - msg_line2 = linput - if("message") - post_status("message", msg_line1, msg_line2) - if("alert") - post_status("alert", href_list["alert"]) - else - post_status(href_list["target"]) - if("setalert") - . = 1 - if(get_authentication_level(user) && !issilicon(usr) && ntn_cont && ntn_comm) - var/current_level = text2num(href_list["target"]) - var/confirm = alert("Are you sure you want to change alert level to [num2seclevel(current_level)]?", name, "No", "Yes") - if(confirm == "Yes" && can_still_topic()) - var/old_level = security_level - if(!current_level) current_level = SEC_LEVEL_GREEN - if(current_level < SEC_LEVEL_GREEN) current_level = SEC_LEVEL_GREEN - if(current_level > SEC_LEVEL_BLUE) current_level = SEC_LEVEL_BLUE //Cannot engage delta with this - set_security_level(current_level) - if(security_level != old_level) - log_game("[key_name(usr)] has changed the security level to [get_security_level()].") - message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") - switch(security_level) - if(SEC_LEVEL_GREEN) - feedback_inc("alert_comms_green",1) - if(SEC_LEVEL_YELLOW) - feedback_inc("alert_comms_yellow",1) - if(SEC_LEVEL_ORANGE) - feedback_inc("alert_comms_orange",1) - if(SEC_LEVEL_VIOLET) - feedback_inc("alert_comms_violet",1) - if(SEC_LEVEL_BLUE) - feedback_inc("alert_comms_blue",1) - else - to_chat(usr, "You press button, but red light flashes and nothing happens.")//This should never happen - - current_status = STATE_DEFAULT - if("viewmessage") - . = 1 - if(get_authentication_level(user) && ntn_comm) - current_viewing_message_id = text2num(href_list["target"]) - for(var/list/m in l.messages) - if(m["id"] == current_viewing_message_id) - current_viewing_message = m - current_status = STATE_VIEWMESSAGE - if("delmessage") - . = 1 - if(get_authentication_level(user) && ntn_comm && l != global_message_listener) - l.Remove(current_viewing_message) - current_status = STATE_MESSAGELIST - if("printmessage") - . = 1 - if(get_authentication_level(user) && ntn_comm) - if(program && program.computer && program.computer.nano_printer) - if(!program.computer.nano_printer.print_text(current_viewing_message["contents"],current_viewing_message["title"])) - to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") - else - program.computer.visible_message("\The [program.computer] prints out paper.") - - -/datum/nano_module/program/comm/proc/post_status(var/command, var/data1, var/data2) - - var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) - - if(!frequency) return - - - var/datum/signal/status_signal = new - status_signal.source = src - status_signal.transmission_method = TRANSMISSION_RADIO - status_signal.data["command"] = command - - switch(command) - if("message") - status_signal.data["msg1"] = data1 - status_signal.data["msg2"] = data2 - log_admin("STATUS: [key_name(usr)] set status screen message with [src]: [data1] [data2]") - if("alert") - status_signal.data["picture_state"] = data1 - - frequency.post_signal(src, status_signal) - -#undef STATE_DEFAULT -#undef STATE_MESSAGELIST -#undef STATE_VIEWMESSAGE -#undef STATE_STATUSDISPLAY -#undef STATE_ALERT_LEVEL - /* General message handling stuff */ @@ -304,19 +41,9 @@ proc/post_comm_message(var/message_title, var/message_text) message["title"] = message_title message["contents"] = message_text - for (var/datum/comm_message_listener/l in comm_message_listeners) + for(var/datum/comm_message_listener/l in comm_message_listeners) l.Add(message) - //Old console support - for (var/obj/machinery/computer/communications/comm in machines) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = message_title - intercept.info = message_text - - comm.messagetitle.Add(message_title) - comm.messagetext.Add(message_text) - /datum/comm_message_listener var/list/messages diff --git a/code/modules/modular_computers/file_system/programs/generic/configurator.dm b/code/modules/modular_computers/file_system/programs/generic/configurator.dm index c3ce1e358a..2d660c8b7e 100644 --- a/code/modules/modular_computers/file_system/programs/generic/configurator.dm +++ b/code/modules/modular_computers/file_system/programs/generic/configurator.dm @@ -14,51 +14,4 @@ size = 4 available_on_ntnet = 0 requires_ntnet = 0 - nanomodule_path = /datum/nano_module/program/computer_configurator/ - -/datum/nano_module/program/computer_configurator - name = "NTOS Computer Configuration Tool" - var/obj/item/modular_computer/movable = null - -/datum/nano_module/program/computer_configurator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - if(program) - movable = program.computer - if(!istype(movable)) - movable = null - - // No computer connection, we can't get data from that. - if(!movable) - return 0 - - var/list/data = list() - - if(program) - data = program.get_header_data() - - var/list/hardware = movable.get_all_components() - - data["disk_size"] = movable.hard_drive.max_capacity - data["disk_used"] = movable.hard_drive.used_capacity - data["power_usage"] = movable.last_power_usage - data["battery_exists"] = movable.battery_module ? 1 : 0 - if(movable.battery_module) - data["battery_rating"] = movable.battery_module.battery.maxcharge - data["battery_percent"] = round(movable.battery_module.battery.percent()) - - var/list/all_entries[0] - for(var/obj/item/weapon/computer_hardware/H in hardware) - all_entries.Add(list(list( - "name" = H.name, - "desc" = H.desc, - "enabled" = H.enabled, - "critical" = H.critical, - "powerusage" = H.power_usage - ))) - - data["hardware"] = all_entries - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "laptop_configuration.tmpl", "NTOS Configuration Utility", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() \ No newline at end of file + tguimodule_path = /datum/tgui_module/computer_configurator diff --git a/code/modules/modular_computers/file_system/programs/generic/email_client.dm b/code/modules/modular_computers/file_system/programs/generic/email_client.dm index 3e2f979bb5..32d635fef4 100644 --- a/code/modules/modular_computers/file_system/programs/generic/email_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/email_client.dm @@ -11,15 +11,15 @@ var/stored_login = "" var/stored_password = "" - nanomodule_path = /datum/nano_module/email_client + tguimodule_path = /datum/tgui_module/email_client // Persistency. Unless you log out, or unless your password changes, this will pre-fill the login data when restarting the program /datum/computer_file/program/email_client/kill_program() - if(NM) - var/datum/nano_module/email_client/NME = NM - if(NME.current_account) - stored_login = NME.stored_login - stored_password = NME.stored_password + if(TM) + var/datum/tgui_module/email_client/TME = TM + if(TME.current_account) + stored_login = TME.stored_login + stored_password = TME.stored_password else stored_login = "" stored_password = "" @@ -27,473 +27,31 @@ /datum/computer_file/program/email_client/run_program() . = ..() - if(NM) - var/datum/nano_module/email_client/NME = NM - NME.stored_login = stored_login - NME.stored_password = stored_password - NME.log_in() - NME.error = "" - NME.check_for_new_messages(1) + if(TM) + var/datum/tgui_module/email_client/TME = TM + TME.stored_login = stored_login + TME.stored_password = stored_password + TME.log_in() + TME.error = "" + TME.check_for_new_messages(1) /datum/computer_file/program/email_client/proc/new_mail_notify() - computer.visible_message("\The [computer] beeps softly, indicating a new email has been received.", 1) + var/turf/T = get_turf(computer) // Because visible_message is being a butt + if(T) + T.visible_message("[computer] beeps softly, indicating a new email has been received.") + playsound(computer, 'sound/misc/server-ready.ogg', 100, 0) /datum/computer_file/program/email_client/process_tick() ..() - var/datum/nano_module/email_client/NME = NM - if(!istype(NME)) + var/datum/tgui_module/email_client/TME = TM + if(!istype(TME)) return - NME.relayed_process(ntnet_speed) + TME.relayed_process(ntnet_speed) - var/check_count = NME.check_for_new_messages() + var/check_count = TME.check_for_new_messages() if(check_count) if(check_count == 2) new_mail_notify() ui_header = "ntnrc_new.gif" else ui_header = "ntnrc_idle.gif" - -/datum/nano_module/email_client/ - name = "Email Client" - var/stored_login = "" - var/stored_password = "" - var/error = "" - - var/msg_title = "" - var/msg_body = "" - var/msg_recipient = "" - var/datum/computer_file/msg_attachment = null - var/folder = "Inbox" - var/addressbook = FALSE - var/new_message = FALSE - - var/last_message_count = 0 // How many messages were there during last check. - var/read_message_count = 0 // How many messages were there when user has last accessed the UI. - - var/datum/computer_file/downloading = null - var/download_progress = 0 - var/download_speed = 0 - - var/datum/computer_file/data/email_account/current_account = null - var/datum/computer_file/data/email_message/current_message = null - -/datum/nano_module/email_client/proc/log_in() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) - if(!account.can_login) - continue - if(account.login == stored_login) - if(account.password == stored_password) - if(account.suspended) - error = "This account has been suspended. Please contact the system administrator for assistance." - return 0 - current_account = account - return 1 - else - error = "Invalid Password" - return 0 - error = "Invalid Login" - return 0 - -// Returns 0 if no new messages were received, 1 if there is an unread message but notification has already been sent. -// and 2 if there is a new message that appeared in this tick (and therefore notification should be sent by the program). -/datum/nano_module/email_client/proc/check_for_new_messages(var/messages_read = FALSE) - if(!current_account) - return 0 - - var/list/allmails = current_account.all_emails() - - if(allmails.len > last_message_count) - . = 2 - else if(allmails.len > read_message_count) - . = 1 - else - . = 0 - - last_message_count = allmails.len - if(messages_read) - read_message_count = allmails.len - - -/datum/nano_module/email_client/proc/log_out() - current_account = null - downloading = null - download_progress = 0 - last_message_count = 0 - read_message_count = 0 - -/datum/nano_module/email_client/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - - // Password has been changed by other client connected to this email account - if(current_account) - if(current_account.password != stored_password) - log_out() - error = "Invalid Password" - // Banned. - if(current_account.suspended) - log_out() - error = "This account has been suspended. Please contact the system administrator for assistance." - - if(error) - data["error"] = error - else if(downloading) - data["downloading"] = 1 - data["down_filename"] = "[downloading.filename].[downloading.filetype]" - data["down_progress"] = download_progress - data["down_size"] = downloading.size - data["down_speed"] = download_speed - - else if(istype(current_account)) - data["current_account"] = current_account.login - if(addressbook) - var/list/all_accounts = list() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) - if(!account.can_login) - continue - all_accounts.Add(list(list( - "login" = account.login - ))) - data["addressbook"] = 1 - data["accounts"] = all_accounts - else if(new_message) - data["new_message"] = 1 - data["msg_title"] = msg_title - data["msg_body"] = pencode2html(msg_body) - data["msg_recipient"] = msg_recipient - if(msg_attachment) - data["msg_hasattachment"] = 1 - data["msg_attachment_filename"] = "[msg_attachment.filename].[msg_attachment.filetype]" - data["msg_attachment_size"] = msg_attachment.size - else if (current_message) - data["cur_title"] = current_message.title - data["cur_body"] = pencode2html(current_message.stored_data) - data["cur_timestamp"] = current_message.timestamp - data["cur_source"] = current_message.source - data["cur_uid"] = current_message.uid - if(istype(current_message.attachment)) - data["cur_hasattachment"] = 1 - data["cur_attachment_filename"] = "[current_message.attachment.filename].[current_message.attachment.filetype]" - data["cur_attachment_size"] = current_message.attachment.size - else - data["label_inbox"] = "Inbox ([current_account.inbox.len])" - data["label_spam"] = "Spam ([current_account.spam.len])" - data["label_deleted"] = "Deleted ([current_account.deleted.len])" - var/list/message_source - if(folder == "Inbox") - message_source = current_account.inbox - else if(folder == "Spam") - message_source = current_account.spam - else if(folder == "Deleted") - message_source = current_account.deleted - - if(message_source) - data["folder"] = folder - var/list/all_messages = list() - for(var/datum/computer_file/data/email_message/message in message_source) - all_messages.Add(list(list( - "title" = message.title, - "body" = pencode2html(message.stored_data), - "source" = message.source, - "timestamp" = message.timestamp, - "uid" = message.uid - ))) - data["messages"] = all_messages - data["messagecount"] = all_messages.len - else - data["stored_login"] = stored_login - data["stored_password"] = stars(stored_password, 0) - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "email_client.tmpl", "Email Client", 600, 450, state = state) - if(host.update_layout()) - ui.auto_update_layout = 1 - ui.set_auto_update(1) - ui.set_initial_data(data) - ui.open() - -/datum/nano_module/email_client/proc/find_message_by_fuid(var/fuid) - if(!istype(current_account)) - return - - // href_list works with strings, so this makes it a bit easier for us - if(istext(fuid)) - fuid = text2num(fuid) - - for(var/datum/computer_file/data/email_message/message in current_account.all_emails()) - if(message.uid == fuid) - return message - -/datum/nano_module/email_client/proc/clear_message() - new_message = FALSE - msg_title = "" - msg_body = "" - msg_recipient = "" - msg_attachment = null - current_message = null - -/datum/nano_module/email_client/proc/relayed_process(var/netspeed) - download_speed = netspeed - if(!downloading) - return - download_progress = min(download_progress + netspeed, downloading.size) - if(download_progress >= downloading.size) - var/obj/item/modular_computer/MC = nano_host() - if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) - error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" - downloading = null - download_progress = 0 - return 1 - - if(MC.hard_drive.store_file(downloading)) - error = "File successfully downloaded to local device." - else - error = "Error saving file: I/O Error: The hard drive may be full or nonfunctional." - downloading = null - download_progress = 0 - return 1 - - -/datum/nano_module/email_client/Topic(href, href_list) - if(..()) - return 1 - var/mob/living/user = usr - check_for_new_messages(1) // Any actual interaction (button pressing) is considered as acknowledging received message, for the purpose of notification icons. - if(href_list["login"]) - log_in() - return 1 - - if(href_list["logout"]) - log_out() - return 1 - - if(href_list["reset"]) - error = "" - return 1 - - if(href_list["new_message"]) - new_message = TRUE - return 1 - - if(href_list["cancel"]) - if(addressbook) - addressbook = FALSE - else - clear_message() - return 1 - - if(href_list["addressbook"]) - addressbook = TRUE - return 1 - - if(href_list["set_recipient"]) - msg_recipient = sanitize(href_list["set_recipient"]) - addressbook = FALSE - return 1 - - if(href_list["edit_title"]) - var/newtitle = sanitize(input(user,"Enter title for your message:", "Message title", msg_title), 100) - if(newtitle) - msg_title = newtitle - return 1 - - // This uses similar editing mechanism as the FileManager program, therefore it supports various paper tags and remembers formatting. - if(href_list["edit_body"]) - var/oldtext = html_decode(msg_body) - oldtext = replacetext(oldtext, "\[editorbr\]", "\n") - - var/newtext = sanitize(replacetext(input(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext) as message|null, "\n", "\[editorbr\]"), 20000) - if(newtext) - msg_body = newtext - return 1 - - if(href_list["edit_recipient"]) - var/newrecipient = sanitize(input(user,"Enter recipient's email address:", "Recipient", msg_recipient), 100) - if(newrecipient) - msg_recipient = newrecipient - return 1 - - if(href_list["edit_login"]) - var/newlogin = sanitize(input(user,"Enter login", "Login", stored_login), 100) - if(newlogin) - stored_login = newlogin - return 1 - - if(href_list["edit_password"]) - var/newpass = sanitize(input(user,"Enter password", "Password"), 100) - if(newpass) - stored_password = newpass - return 1 - - if(href_list["delete"]) - if(!istype(current_account)) - return 1 - var/datum/computer_file/data/email_message/M = find_message_by_fuid(href_list["delete"]) - if(!istype(M)) - return 1 - if(folder == "Deleted") - current_account.deleted.Remove(M) - qdel(M) - else - current_account.deleted.Add(M) - current_account.inbox.Remove(M) - current_account.spam.Remove(M) - if(current_message == M) - current_message = null - return 1 - - if(href_list["send"]) - if(!current_account) - return 1 - if((msg_title == "") || (msg_body == "") || (msg_recipient == "")) - error = "Error sending mail: Title or message body is empty!" - return 1 - - var/datum/computer_file/data/email_message/message = new() - message.title = msg_title - message.stored_data = msg_body - message.source = current_account.login - message.attachment = msg_attachment - if(!current_account.send_mail(msg_recipient, message)) - error = "Error sending email: this address doesn't exist." - return 1 - else - error = "Email successfully sent." - clear_message() - return 1 - - if(href_list["set_folder"]) - folder = href_list["set_folder"] - return 1 - - if(href_list["reply"]) - var/datum/computer_file/data/email_message/M = find_message_by_fuid(href_list["reply"]) - if(!istype(M)) - return 1 - - new_message = TRUE - msg_recipient = M.source - msg_title = "Re: [M.title]" - msg_body = "\[editorbr\]\[editorbr\]\[editorbr\]\[br\]==============================\[br\]\[editorbr\]" - msg_body += "Received by [current_account.login] at [M.timestamp]\[br\]\[editorbr\][M.stored_data]" - return 1 - - if(href_list["view"]) - var/datum/computer_file/data/email_message/M = find_message_by_fuid(href_list["view"]) - if(istype(M)) - current_message = M - return 1 - - if(href_list["changepassword"]) - var/oldpassword = sanitize(input(user,"Please enter your old password:", "Password Change"), 100) - if(!oldpassword) - return 1 - var/newpassword1 = sanitize(input(user,"Please enter your new password:", "Password Change"), 100) - if(!newpassword1) - return 1 - var/newpassword2 = sanitize(input(user,"Please re-enter your new password:", "Password Change"), 100) - if(!newpassword2) - return 1 - - if(!istype(current_account)) - error = "Please log in before proceeding." - return 1 - - if(current_account.password != oldpassword) - error = "Incorrect original password" - return 1 - - if(newpassword1 != newpassword2) - error = "The entered passwords do not match." - return 1 - - current_account.password = newpassword1 - stored_password = newpassword1 - error = "Your password has been successfully changed!" - return 1 - - // The following entries are Modular Computer framework only, and therefore won't do anything in other cases (like AI View) - - if(href_list["save"]) - // Fully dependant on modular computers here. - var/obj/item/modular_computer/MC = nano_host() - - if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) - error = "Error exporting file. Are you using a functional and NTOS-compliant device?" - return 1 - - var/filename = sanitize(input(user,"Please specify file name:", "Message export"), 100) - if(!filename) - return 1 - - var/datum/computer_file/data/email_message/M = find_message_by_fuid(href_list["save"]) - var/datum/computer_file/data/mail = istype(M) ? M.export() : null - if(!istype(mail)) - return 1 - mail.filename = filename - if(!MC.hard_drive || !MC.hard_drive.store_file(mail)) - error = "Internal I/O error when writing file, the hard drive may be full." - else - error = "Email exported successfully" - return 1 - - if(href_list["addattachment"]) - var/obj/item/modular_computer/MC = nano_host() - msg_attachment = null - - if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) - error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" - return 1 - - var/list/filenames = list() - for(var/datum/computer_file/CF in MC.hard_drive.stored_files) - if(CF.unsendable) - continue - filenames.Add(CF.filename) - var/picked_file = input(user, "Please pick a file to send as attachment (max 32GQ)") as null|anything in filenames - - if(!picked_file) - return 1 - - if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) - error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" - return 1 - - for(var/datum/computer_file/CF in MC.hard_drive.stored_files) - if(CF.unsendable) - continue - if(CF.filename == picked_file) - msg_attachment = CF.clone() - break - if(!istype(msg_attachment)) - msg_attachment = null - error = "Unknown error when uploading attachment." - return 1 - - if(msg_attachment.size > 32) - error = "Error uploading attachment: File exceeds maximal permitted file size of 32GQ." - msg_attachment = null - else - error = "File [msg_attachment.filename].[msg_attachment.filetype] has been successfully uploaded." - return 1 - - if(href_list["downloadattachment"]) - if(!current_account || !current_message || !current_message.attachment) - return 1 - var/obj/item/modular_computer/MC = nano_host() - if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) - error = "Error downloading file. Are you using a functional and NTOSv2-compliant device?" - return 1 - - downloading = current_message.attachment.clone() - download_progress = 0 - return 1 - - if(href_list["canceldownload"]) - downloading = null - download_progress = 0 - return 1 - - if(href_list["remove_attachment"]) - msg_attachment = null - return 1 \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 42dfdd622d..13a137993e 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -6,202 +6,190 @@ program_key_state = "generic_key" program_menu_icon = "folder-collapsed" size = 8 - requires_ntnet = 0 - available_on_ntnet = 0 - undeletable = 1 - nanomodule_path = /datum/nano_module/program/computer_filemanager/ + requires_ntnet = FALSE + available_on_ntnet = FALSE + undeletable = TRUE + tgui_id = "NtosFileManager" + var/open_file var/error -/datum/computer_file/program/filemanager/Topic(href, href_list) +/datum/computer_file/program/filemanager/tgui_act(action, list/params, datum/tgui/ui) if(..()) - return 1 + return TRUE - if(href_list["PRG_openfile"]) - . = 1 - open_file = href_list["PRG_openfile"] - if(href_list["PRG_newtextfile"]) - . = 1 - var/newname = sanitize(input(usr, "Enter file name or leave blank to cancel:", "File rename")) - if(!newname) - return 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/data/F = new/datum/computer_file/data() - F.filename = newname - F.filetype = "TXT" - HDD.store_file(F) - if(href_list["PRG_deletefile"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/file = HDD.find_file_by_name(href_list["PRG_deletefile"]) - if(!file || file.undeletable) - return 1 - HDD.remove_file(file) - if(href_list["PRG_usbdeletefile"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/RHDD = computer.portable_drive - if(!RHDD) - return 1 - var/datum/computer_file/file = RHDD.find_file_by_name(href_list["PRG_usbdeletefile"]) - if(!file || file.undeletable) - return 1 - RHDD.remove_file(file) - if(href_list["PRG_closefile"]) - . = 1 - open_file = null - error = null - if(href_list["PRG_clone"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/F = HDD.find_file_by_name(href_list["PRG_clone"]) - if(!F || !istype(F)) - return 1 - var/datum/computer_file/C = F.clone(1) - HDD.store_file(C) - if(href_list["PRG_rename"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/file = HDD.find_file_by_name(href_list["PRG_rename"]) - if(!file || !istype(file)) - return 1 - var/newname = sanitize(input(usr, "Enter new file name:", "File rename", file.filename)) - if(file && newname) + var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive + var/obj/item/weapon/computer_hardware/hard_drive/RHDD = computer.portable_drive + + switch(action) + if("PRG_openfile") + open_file = params["name"] + return TRUE + if("PRG_newtextfile") + if(!HDD) + return + var/newname = sanitize(input(usr, "Enter file name or leave blank to cancel:", "File rename")) + if(!newname) + return + var/datum/computer_file/data/F = new/datum/computer_file/data() + F.filename = newname + F.filetype = "TXT" + HDD.store_file(F) + return TRUE + if("PRG_closefile") + open_file = null + error = null + return TRUE + if("PRG_clone") + if(!HDD) + return + var/datum/computer_file/F = HDD.find_file_by_name(params["name"]) + if(!F || !istype(F)) + return + var/datum/computer_file/C = F.clone(1) + HDD.store_file(C) + return TRUE + if("PRG_edit") + if(!HDD) + return + if(!open_file) + return + var/datum/computer_file/data/F = HDD.find_file_by_name(open_file) + if(!F || !istype(F)) + return + if(F.do_not_edit && (alert("WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No")) + return + + var/oldtext = html_decode(F.stored_data) + oldtext = replacetext(oldtext, "\[br\]", "\n") + + var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + if(!newtext) + return + + if(F) + var/datum/computer_file/data/backup = F.clone() + HDD.remove_file(F) + F.stored_data = newtext + F.calculate_size() + // We can't store the updated file, it's probably too large. Print an error and restore backed up version. + // This is mostly intended to prevent people from losing texts they spent lot of time working on due to running out of space. + // They will be able to copy-paste the text from error screen and store it in notepad or something. + if(!HDD.store_file(F)) + error = "I/O error: Unable to overwrite file. Hard drive is probably full. You may want to backup your changes before closing this window:

[html_decode(F.stored_data)]

" + HDD.store_file(backup) + return TRUE + if("PRG_printfile") + if(!HDD) + return + if(!open_file) + return + var/datum/computer_file/data/F = HDD.find_file_by_name(open_file) + if(!F || !istype(F)) + return + if(!computer.nano_printer) + error = "Missing Hardware: Your computer does not have required hardware to complete this operation." + return + if(!computer.nano_printer.print_text(pencode2html(F.stored_data))) + error = "Hardware error: Printer was unable to print the file. It may be out of paper." + return + return TRUE + if("PRG_deletefile") + if(!HDD) + return + var/datum/computer_file/file = HDD.find_file_by_name(params["name"]) + if(!file || file.undeletable) + return + HDD.remove_file(file) + return TRUE + if("PRG_usbdeletefile") + if(!RHDD) + return + var/datum/computer_file/file = RHDD.find_file_by_name(params["name"]) + if(!file || file.undeletable) + return + RHDD.remove_file(file) + return TRUE + if("PRG_rename") + if(!HDD) + return + var/datum/computer_file/file = HDD.find_file_by_name(params["name"]) + if(!file) + return + var/newname = params["new_name"] + if(!newname) + return file.filename = newname - if(href_list["PRG_edit"]) - . = 1 - if(!open_file) - return 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/data/F = HDD.find_file_by_name(open_file) - if(!F || !istype(F)) - return 1 - if(F.do_not_edit && (alert("WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No")) - return 1 + return TRUE + if("PRG_copytousb") + if(!HDD || !RHDD) + return + var/datum/computer_file/F = HDD.find_file_by_name(params["name"]) + if(!F) + return + var/datum/computer_file/C = F.clone(FALSE) + RHDD.store_file(C) + return TRUE + if("PRG_copyfromusb") + if(!HDD || !RHDD) + return + var/datum/computer_file/F = RHDD.find_file_by_name(params["name"]) + if(!F || !istype(F)) + return + var/datum/computer_file/C = F.clone(FALSE) + HDD.store_file(C) + return TRUE - var/oldtext = html_decode(F.stored_data) - oldtext = replacetext(oldtext, "\[br\]", "\n") +/datum/computer_file/program/filemanager/tgui_data(mob/user) + var/list/data = get_header_data() - var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) - if(!newtext) - return + var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive + var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD = computer.portable_drive - if(F) - var/datum/computer_file/data/backup = F.clone() - HDD.remove_file(F) - F.stored_data = newtext - F.calculate_size() - // We can't store the updated file, it's probably too large. Print an error and restore backed up version. - // This is mostly intended to prevent people from losing texts they spent lot of time working on due to running out of space. - // They will be able to copy-paste the text from error screen and store it in notepad or something. - if(!HDD.store_file(F)) - error = "I/O error: Unable to overwrite file. Hard drive is probably full. You may want to backup your changes before closing this window:

[html_decode(F.stored_data)]

" - HDD.store_file(backup) - if(href_list["PRG_printfile"]) - . = 1 - if(!open_file) - return 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/data/F = HDD.find_file_by_name(open_file) - if(!F || !istype(F)) - return 1 - if(!computer.nano_printer) - error = "Missing Hardware: Your computer does not have required hardware to complete this operation." - return 1 - if(!computer.nano_printer.print_text(pencode2html(F.stored_data))) - error = "Hardware error: Printer was unable to print the file. It may be out of paper." - return 1 - if(href_list["PRG_copytousb"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD = computer.portable_drive - if(!HDD || !RHDD) - return 1 - var/datum/computer_file/F = HDD.find_file_by_name(href_list["PRG_copytousb"]) - if(!F || !istype(F)) - return 1 - var/datum/computer_file/C = F.clone(0) - RHDD.store_file(C) - if(href_list["PRG_copyfromusb"]) - . = 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD = computer.portable_drive - if(!HDD || !RHDD) - return 1 - var/datum/computer_file/F = RHDD.find_file_by_name(href_list["PRG_copyfromusb"]) - if(!F || !istype(F)) - return 1 - var/datum/computer_file/C = F.clone(0) - HDD.store_file(C) - if(.) - SSnanoui.update_uis(NM) + data["error"] = null + if(error) + data["error"] = error + if(!computer || !HDD) + data["error"] = "I/O ERROR: Unable to access hard drive." + + data["filedata"] = null + data["filename"] = null + data["files"] = list() + data["usbconnected"] = FALSE + data["usbfiles"] = list() -/datum/nano_module/program/computer_filemanager - name = "NTOS File Manager" - -/datum/nano_module/program/computer_filemanager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - var/datum/computer_file/program/filemanager/PRG - PRG = program - - var/obj/item/weapon/computer_hardware/hard_drive/HDD - var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD - if(PRG.error) - data["error"] = PRG.error - if(PRG.open_file) + if(open_file) var/datum/computer_file/data/file - if(!PRG.computer || !PRG.computer.hard_drive) + if(!computer || !computer.hard_drive) data["error"] = "I/O ERROR: Unable to access hard drive." else - HDD = PRG.computer.hard_drive - file = HDD.find_file_by_name(PRG.open_file) + file = HDD.find_file_by_name(open_file) if(!istype(file)) data["error"] = "I/O ERROR: Unable to open file." else data["filedata"] = pencode2html(file.stored_data) data["filename"] = "[file.filename].[file.filetype]" else - if(!PRG.computer || !PRG.computer.hard_drive) - data["error"] = "I/O ERROR: Unable to access hard drive." - else - HDD = PRG.computer.hard_drive - RHDD = PRG.computer.portable_drive - var/list/files[0] - for(var/datum/computer_file/F in HDD.stored_files) - files.Add(list(list( + var/list/files = list() + for(var/datum/computer_file/F in HDD.stored_files) + files += list(list( + "name" = F.filename, + "type" = F.filetype, + "size" = F.size, + "undeletable" = F.undeletable + )) + data["files"] = files + if(RHDD) + data["usbconnected"] = TRUE + var/list/usbfiles = list() + for(var/datum/computer_file/F in RHDD.stored_files) + usbfiles += list(list( "name" = F.filename, "type" = F.filetype, "size" = F.size, "undeletable" = F.undeletable - ))) - data["files"] = files - if(RHDD) - data["usbconnected"] = 1 - var/list/usbfiles[0] - for(var/datum/computer_file/F in RHDD.stored_files) - usbfiles.Add(list(list( - "name" = F.filename, - "type" = F.filetype, - "size" = F.size, - "undeletable" = F.undeletable - ))) - data["usbfiles"] = usbfiles + )) + data["usbfiles"] = usbfiles - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "file_manager.tmpl", "NTOS File Manager", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() \ No newline at end of file + return data diff --git a/code/modules/modular_computers/file_system/programs/generic/game.dm b/code/modules/modular_computers/file_system/programs/generic/game.dm index b4c0688c29..4d21095f9d 100644 --- a/code/modules/modular_computers/file_system/programs/generic/game.dm +++ b/code/modules/modular_computers/file_system/programs/generic/game.dm @@ -1,152 +1,188 @@ // This file is used as a reference for Modular Computers Development guide on the wiki. It contains a lot of excess comments, as it is intended as explanation // for someone who may not be as experienced in coding. When making changes, please try to keep it this way. -// An actual program definition. /datum/computer_file/program/game - filename = "arcadec" // File name, as shown in the file browser program. - filedesc = "Unknown Game" // User-Friendly name. In this case, we will generate a random name in constructor. - program_icon_state = "game" // Icon state of this program's screen. - program_menu_icon = "script" - extended_desc = "Fun for the whole family! Probably not an AAA title, but at least you can download it on the corporate network.." // A nice description. - size = 5 // Size in GQ. Integers only. Smaller sizes should be used for utility/low use programs (like this one), while large sizes are for important programs. - requires_ntnet = 0 // This particular program does not require NTNet network conectivity... - available_on_ntnet = 1 // ... but we want it to be available for download. - nanomodule_path = /datum/nano_module/arcade_classic/ // Path of relevant nano module. The nano module is defined further in the file. - var/picked_enemy_name + filename = "dsarcade" // File name, as shown in the file browser program. + filedesc = "Donksoft Micro Arcade" // User-Friendly name. + program_icon_state = "arcade" // Icon state of this program's screen. + extended_desc = "This is a port of the classic game 'Outbomb Cuban Pete', redesigned to run on tablets; Now with thrilling graphics and chilling storytelling." // A nice description. + size = 6 // Size in GQ. Integers only. Smaller sizes should be used for utility/low use programs (like this one), while large sizes are for important programs. + requires_ntnet = FALSE // This particular program does not require NTNet network conectivity... + available_on_ntnet = TRUE // ... but we want it to be available for download. + tgui_id = "NtosArcade" // Path of relevant tgui template.js file. -// Blatantly stolen and shortened version from arcade machines. Generates a random enemy name -/datum/computer_file/program/game/proc/random_enemy_name() - var/name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") - var/name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "Slime", "Lizard Man", "Unicorn") - return "[name_part1] [name_part2]" + ///Returns TRUE if the game is being played. + var/game_active = TRUE + ///This disables buttom actions from having any impact if TRUE. Resets to FALSE when the player is allowed to make an action again. + var/pause_state = FALSE + var/boss_hp = 45 + var/boss_mp = 15 + var/player_hp = 30 + var/player_mp = 10 + var/ticket_count = 0 + ///Shows what text is shown on the app, usually showing the log of combat actions taken by the player. + var/heads_up = "Nanotrasen says, winners make us money." + var/boss_name = "Cuban Pete's Minion" + ///Determines which boss image to use on the UI. + var/boss_id = 1 -// When the program is first created, we generate a new enemy name and name ourselves accordingly. -/datum/computer_file/program/game/New() - ..() - picked_enemy_name = random_enemy_name() - filedesc = "Defeat [picked_enemy_name]" +// This is the primary game loop, which handles the logic of being defeated or winning. +/datum/computer_file/program/game/proc/game_check(mob/user) + sleep(5) + if(boss_hp <= 0) + heads_up = "You have crushed [boss_name]! Rejoice!" + playsound(computer.loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10) + game_active = FALSE + program_icon_state = "arcade_off" + if(istype(computer)) + computer.update_icon() + ticket_count += 1 + // user?.mind?.adjust_experience(/datum/skill/gaming, 50) + sleep(10) + else if(player_hp <= 0 || player_mp <= 0) + heads_up = "You have been defeated... how will the station survive?" + playsound(computer.loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10) + game_active = FALSE + program_icon_state = "arcade_off" + if(istype(computer)) + computer.update_icon() + // user?.mind?.adjust_experience(/datum/skill/gaming, 10) + sleep(10) -// Important in order to ensure that copied versions will have the same enemy name. -/datum/computer_file/program/game/clone() - var/datum/computer_file/program/game/G = ..() - G.picked_enemy_name = picked_enemy_name - return G - -// When running the program, we also want to pass our enemy name to the nano module. -/datum/computer_file/program/game/run_program() - . = ..() - if(. && NM) - var/datum/nano_module/arcade_classic/NMC = NM - NMC.enemy_name = picked_enemy_name - - -// Nano module the program uses. -// This can be either /datum/nano_module/ or /datum/nano_module/program. The latter is intended for nano modules that are suposed to be exclusively used with modular computers, -// and should generally not be used, as such nano modules are hard to use on other places. -/datum/nano_module/arcade_classic/ - name = "Classic Arcade" - var/player_mana // Various variables specific to the nano module. In this case, the nano module is a simple arcade game, so the variables store health and other stats. - var/player_health - var/enemy_mana - var/enemy_health - var/enemy_name = "Greytide Horde" - var/gameover - var/information - -/datum/nano_module/arcade_classic/New() - ..() - new_game() - -// ui_interact handles transfer of data to NanoUI. Keep in mind that data you pass from here is actually sent to the client. In other words, don't send anything you don't want a client -// to see, and don't send unnecessarily large amounts of data (due to laginess). -/datum/nano_module/arcade_classic/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - - data["player_health"] = player_health - data["player_mana"] = player_mana - data["enemy_health"] = enemy_health - data["enemy_mana"] = enemy_mana - data["enemy_name"] = enemy_name - data["gameover"] = gameover - data["information"] = information - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "arcade_classic.tmpl", "Defeat [enemy_name]", 500, 350, state = state) - if(host.update_layout()) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - -// Three helper procs i've created. These are unique to this particular nano module. If you are creating your own nano module, you'll most likely create similar procs too. -/datum/nano_module/arcade_classic/proc/enemy_play() - if((enemy_mana < 5) && prob(60)) - var/steal = rand(2, 3) - player_mana -= steal - enemy_mana += steal - information += "[enemy_name] steals [steal] of your power!" - else if((enemy_health < 15) && (enemy_mana > 3) && prob(80)) - var/healamt = min(rand(3, 5), enemy_mana) - enemy_mana -= healamt - enemy_health += healamt - information += "[enemy_name] heals for [healamt] health!" +// This handles the boss "AI". +/datum/computer_file/program/game/proc/enemy_check(mob/user) + var/boss_attackamt = 0 //Spam protection from boss attacks as well. + var/boss_mpamt = 0 + var/bossheal = 0 + if(pause_state == TRUE) + boss_attackamt = rand(3,6) + boss_mpamt = rand (2,4) + bossheal = rand (4,6) + if(game_active == FALSE) + return + if(boss_mp <= 5) + heads_up = "[boss_mpamt] magic power has been stolen from you!" + playsound(computer.loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3, falloff = 10) + player_mp -= boss_mpamt + boss_mp += boss_mpamt + else if(boss_mp > 5 && boss_hp <12) + heads_up = "[boss_name] heals for [bossheal] health!" + playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10) + boss_hp += bossheal + boss_mp -= boss_mpamt else - var/dam = rand(3,6) - player_health -= dam - information += "[enemy_name] attacks for [dam] damage!" + heads_up = "[boss_name] attacks you for [boss_attackamt] damage!" + playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10) + player_hp -= boss_attackamt -/datum/nano_module/arcade_classic/proc/check_gameover() - if((player_health <= 0) || player_mana <= 0) - if(enemy_health <= 0) - information += "You have defeated [enemy_name], but you have died in the fight!" - else - information += "You have been defeated by [enemy_name]!" - gameover = 1 + pause_state = FALSE + game_check() + +/** + * UI assets define a list of asset datums to be sent with the UI. + * In this case, it's a bunch of cute enemy sprites. + */ +/datum/computer_file/program/game/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/simple/arcade), + ) + +/** + * This provides all of the relevant data to the UI in a list(). + */ +/datum/computer_file/program/game/tgui_data(mob/user) + var/list/data = get_header_data() + data["Hitpoints"] = boss_hp + data["PlayerHitpoints"] = player_hp + data["PlayerMP"] = player_mp + data["TicketCount"] = ticket_count + data["GameActive"] = game_active + data["PauseState"] = pause_state + data["Status"] = heads_up + data["BossID"] = "boss[boss_id].gif" + return data + +/** + * This is tgui's replacement for Topic(). It handles any user input from the UI. + */ +/datum/computer_file/program/game/tgui_act(action, list/params) + if(..()) // Always call parent in tgui_act, it handles making sure the user is allowed to interact with the UI. return TRUE - else if(enemy_health <= 0) - gameover = 1 - information += "Congratulations! You have defeated [enemy_name]!" - return TRUE - return FALSE -/datum/nano_module/arcade_classic/proc/new_game() - player_mana = 10 - player_health = 30 - enemy_mana = 20 - enemy_health = 45 - gameover = FALSE - information = "A new game has started!" + var/obj/item/weapon/computer_hardware/nano_printer/printer + if(computer) + printer = computer.nano_printer - - -/datum/nano_module/arcade_classic/Topic(href, href_list) - if(..()) // Always begin your Topic() calls with a parent call! - return 1 - if(href_list["new_game"]) - new_game() - return 1 // Returning 1 (TRUE) in Topic automatically handles UI updates. - if(gameover) // If the game has already ended, we don't want the following three topic calls to be processed at all. - return 1 // Instead of adding checks into each of those three, we can easily add this one check here to reduce on code copy-paste. - if(href_list["attack"]) - var/damage = rand(2, 6) - information = "You attack for [damage] damage." - enemy_health -= damage - enemy_play() - check_gameover() - return 1 - if(href_list["heal"]) - var/healfor = rand(6, 8) - var/cost = rand(1, 3) - information = "You heal yourself for [healfor] damage, using [cost] energy in the process." - player_health += healfor - player_mana -= cost - enemy_play() - check_gameover() - return 1 - if(href_list["regain_mana"]) - var/regen = rand(4, 7) - information = "You rest of a while, regaining [regen] energy." - player_mana += regen - enemy_play() - check_gameover() - return 1 \ No newline at end of file + // var/gamerSkillLevel = usr.mind?.get_skill_level(/datum/skill/gaming) + // var/gamerSkill = usr.mind?.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER) + switch(action) + if("Attack") + var/attackamt = 0 //Spam prevention. + if(pause_state == FALSE) + attackamt = rand(2,6) // + rand(0, gamerSkill) + pause_state = TRUE + heads_up = "You attack for [attackamt] damage." + playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10) + boss_hp -= attackamt + sleep(10) + game_check() + enemy_check() + return TRUE + if("Heal") + var/healamt = 0 //More Spam Prevention. + var/healcost = 0 + if(pause_state == FALSE) + healamt = rand(6,8) // + rand(0, gamerSkill) + var/maxPointCost = 3 + // if(gamerSkillLevel >= SKILL_LEVEL_JOURNEYMAN) + // maxPointCost = 2 + healcost = rand(1, maxPointCost) + pause_state = TRUE + heads_up = "You heal for [healamt] damage." + playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10) + player_hp += healamt + player_mp -= healcost + sleep(10) + game_check() + enemy_check() + return TRUE + if("Recharge_Power") + var/rechargeamt = 0 //As above. + if(pause_state == FALSE) + rechargeamt = rand(4,7) // + rand(0, gamerSkill) + pause_state = TRUE + heads_up = "You regain [rechargeamt] magic power." + playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3, falloff = 10) + player_mp += rechargeamt + sleep(10) + game_check() + enemy_check() + return TRUE + if("Dispense_Tickets") + if(!printer) + to_chat(usr, "Hardware error: A printer is required to redeem tickets.") + return + if(printer.stored_paper <= 0) + to_chat(usr, "Hardware error: Printer is out of paper.") + return + else + computer.visible_message("\The [computer] prints out paper.") + if(ticket_count >= 1) + new /obj/item/stack/arcadeticket((get_turf(computer)), 1) + to_chat(usr, "[src] dispenses a ticket!") + ticket_count -= 1 + printer.stored_paper -= 1 + else + to_chat(usr, "You don't have any stored tickets!") + return TRUE + if("Start_Game") + game_active = TRUE + boss_hp = 45 + player_hp = 30 + player_mp = 10 + heads_up = "You stand before [boss_name]! Prepare for battle!" + program_icon_state = "arcade" + boss_id = rand(1,6) + pause_state = FALSE + if(istype(computer)) + computer.update_icon() diff --git a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm index 1d4da6d4d5..e72e30fd38 100644 --- a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm @@ -6,16 +6,17 @@ program_key_state = "generic_key" program_menu_icon = "contact" size = 4 - requires_ntnet = 1 - available_on_ntnet = 1 + requires_ntnet = TRUE + available_on_ntnet = TRUE + + tgui_id = "NtosNewsBrowser" - nanomodule_path = /datum/nano_module/program/computer_newsbrowser/ var/datum/computer_file/data/news_article/loaded_article var/download_progress = 0 var/download_netspeed = 0 - var/downloading = 0 + var/downloading = FALSE var/message = "" - var/show_archived = 0 + var/show_archived = FALSE /datum/computer_file/program/newsbrowser/process_tick() if(!downloading) @@ -33,86 +34,31 @@ if(download_progress >= loaded_article.size) downloading = 0 requires_ntnet = 0 // Turn off NTNet requirement as we already loaded the file into local memory. - SSnanoui.update_uis(NM) + SStgui.update_uis(src) -/datum/computer_file/program/newsbrowser/kill_program() - ..() - requires_ntnet = 1 - loaded_article = null - download_progress = 0 - downloading = 0 - show_archived = 0 +/datum/computer_file/program/newsbrowser/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() -/datum/computer_file/program/newsbrowser/Topic(href, href_list) - if(..()) - return 1 - if(href_list["PRG_openarticle"]) - . = 1 - if(downloading || loaded_article) - return 1 - - for(var/datum/computer_file/data/news_article/N in ntnet_global.available_news) - if(N.uid == text2num(href_list["PRG_openarticle"])) - loaded_article = N.clone() - downloading = 1 - break - if(href_list["PRG_reset"]) - . = 1 - downloading = 0 - download_progress = 0 - requires_ntnet = 1 - loaded_article = null - if(href_list["PRG_clearmessage"]) - . = 1 - message = "" - if(href_list["PRG_savearticle"]) - . = 1 - if(downloading || !loaded_article) - return - - var/savename = sanitize(input(usr, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename)) - if(!savename) - return 1 - var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive - if(!HDD) - return 1 - var/datum/computer_file/data/news_article/N = loaded_article.clone() - N.filename = savename - HDD.store_file(N) - if(href_list["PRG_toggle_archived"]) - . = 1 - show_archived = !show_archived - if(.) - SSnanoui.update_uis(NM) - - -/datum/nano_module/program/computer_newsbrowser - name = "NTNet/ExoNet News Browser" - -/datum/nano_module/program/computer_newsbrowser/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - - var/datum/computer_file/program/newsbrowser/PRG - var/list/data = list() - if(program) - data = program.get_header_data() - PRG = program - else - return - - data["message"] = PRG.message - if(PRG.loaded_article && !PRG.downloading) // Viewing an article. - data["title"] = PRG.loaded_article.filename - data["cover"] = PRG.loaded_article.cover - data["article"] = PRG.loaded_article.stored_data - else if(PRG.downloading) // Downloading an article. - data["download_running"] = 1 - data["download_progress"] = PRG.download_progress - data["download_maxprogress"] = PRG.loaded_article.size - data["download_rate"] = PRG.download_netspeed + var/list/all_articles = list() + data["message"] = message + data["showing_archived"] = show_archived + data["download"] = null + data["article"] = null + if(loaded_article && !downloading) // Viewing an article. + data["article"] = list( + "title" = loaded_article.filename, + "cover" = loaded_article.cover, + "content" = loaded_article.stored_data, + ) + else if(downloading) // Downloading an article. + data["download"] = list( + "download_progress" = download_progress, + "download_maxprogress" = loaded_article.size, + "download_rate" = download_netspeed + ) else // Viewing list of articles - var/list/all_articles[0] for(var/datum/computer_file/data/news_article/F in ntnet_global.available_news) - if(!PRG.show_archived && F.archived) + if(!show_archived && F.archived) continue all_articles.Add(list(list( "name" = F.filename, @@ -120,12 +66,56 @@ "uid" = F.uid, "archived" = F.archived ))) - data["all_articles"] = all_articles - data["showing_archived"] = PRG.show_archived + data["all_articles"] = all_articles + + return data + +/datum/computer_file/program/newsbrowser/kill_program() + ..() + requires_ntnet = TRUE + loaded_article = null + download_progress = 0 + downloading = FALSE + show_archived = FALSE + +/datum/computer_file/program/newsbrowser/tgui_act(action, list/params, datum/tgui/ui) + if(..()) + return TRUE + switch(action) + if("PRG_openarticle") + . = TRUE + if(downloading || loaded_article) + return TRUE + + for(var/datum/computer_file/data/news_article/N in ntnet_global.available_news) + if(N.uid == text2num(params["uid"])) + loaded_article = N.clone() + downloading = 1 + break + if("PRG_reset") + . = TRUE + downloading = 0 + download_progress = 0 + requires_ntnet = 1 + loaded_article = null + if("PRG_clearmessage") + . = TRUE + message = "" + if("PRG_savearticle") + . = TRUE + if(downloading || !loaded_article) + return + + var/savename = sanitize(input(usr, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename)) + if(!savename) + return TRUE + var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive + if(!HDD) + return TRUE + var/datum/computer_file/data/news_article/N = loaded_article.clone() + N.filename = savename + HDD.store_file(N) + if("PRG_toggle_archived") + . = TRUE + show_archived = !show_archived - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "news_browser.tmpl", "NTNet/ExoNet News Browser", 575, 750, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() diff --git a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm index a0b2194168..14e2343e66 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm @@ -5,29 +5,26 @@ program_key_state = "generic_key" program_menu_icon = "arrowthickstop-1-s" extended_desc = "This program allows downloads of software from official NT repositories" - unsendable = 1 - undeletable = 1 + unsendable = TRUE + undeletable = TRUE size = 4 - requires_ntnet = 1 + requires_ntnet = TRUE requires_ntnet_feature = NTNET_SOFTWAREDOWNLOAD - available_on_ntnet = 0 - nanomodule_path = /datum/nano_module/program/computer_ntnetdownload/ + available_on_ntnet = FALSE ui_header = "downloader_finished.gif" + tgui_id = "NtosNetDownloader" + var/datum/computer_file/program/downloaded_file = null var/hacked_download = 0 var/download_completion = 0 //GQ of downloaded data. var/download_netspeed = 0 var/downloaderror = "" + var/obj/item/modular_computer/my_computer = null var/list/downloads_queue[0] /datum/computer_file/program/ntnetdownload/kill_program() ..() - downloaded_file = null - download_completion = 0 - download_netspeed = 0 - downloaderror = "" - ui_header = "downloader_finished.gif" - + abort_file_download() /datum/computer_file/program/ntnetdownload/proc/begin_file_download(var/filename) if(downloaded_file) @@ -108,93 +105,85 @@ download_netspeed = NTNETSPEED_ETHERNET download_completion += download_netspeed -/datum/computer_file/program/ntnetdownload/Topic(href, href_list) +/datum/computer_file/program/ntnetdownload/tgui_act(action, params) if(..()) - return 1 - if(href_list["PRG_downloadfile"]) - if(!downloaded_file) - begin_file_download(href_list["PRG_downloadfile"]) - else if(check_file_download(href_list["PRG_downloadfile"]) && !downloads_queue.Find(href_list["PRG_downloadfile"]) && downloaded_file.filename != href_list["PRG_downloadfile"]) - downloads_queue += href_list["PRG_downloadfile"] - return 1 - if(href_list["PRG_removequeued"]) - downloads_queue.Remove(href_list["PRG_removequeued"]) - return 1 - if(href_list["PRG_reseterror"]) - if(downloaderror) - download_completion = 0 - download_netspeed = 0 - downloaded_file = null - downloaderror = "" - return 1 - return 0 - -/datum/nano_module/program/computer_ntnetdownload - name = "Network Downloader" - var/obj/item/modular_computer/my_computer = null - -/datum/nano_module/program/computer_ntnetdownload/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - if(program) - my_computer = program.computer + return TRUE + switch(action) + if("PRG_downloadfile") + if(!downloaded_file) + begin_file_download(params["filename"]) + else if(check_file_download(params["filename"]) && !downloads_queue.Find(params["filename"]) && downloaded_file.filename != params["filename"]) + downloads_queue += params["filename"] + return TRUE + if("PRG_removequeued") + downloads_queue.Remove(params["filename"]) + return TRUE + if("PRG_reseterror") + if(downloaderror) + download_completion = 0 + download_netspeed = 0 + downloaded_file = null + downloaderror = "" + return TRUE + return FALSE +/datum/computer_file/program/ntnetdownload/tgui_data(mob/user) + my_computer = computer if(!istype(my_computer)) return - var/list/data = list() - var/datum/computer_file/program/ntnetdownload/prog = program - // For now limited to execution by the downloader program - if(!prog || !istype(prog)) - return - if(program) - data = program.get_header_data() + var/list/data = get_header_data() - // This IF cuts on data transferred to client, so i guess it's worth it. - if(prog.downloaderror) // Download errored. Wait until user resets the program. - data["error"] = prog.downloaderror - if(prog.downloaded_file) // Download running. Wait please.. - data["downloadname"] = prog.downloaded_file.filename - data["downloaddesc"] = prog.downloaded_file.filedesc - data["downloadsize"] = prog.downloaded_file.size - data["downloadspeed"] = prog.download_netspeed - data["downloadcompletion"] = round(prog.download_completion, 0.1) + data["downloading"] = !!downloaded_file + data["error"] = downloaderror || FALSE + + if(downloaded_file) // Download running. Wait please.. + data["downloadname"] = downloaded_file.filename + data["downloaddesc"] = downloaded_file.filedesc + data["downloadsize"] = downloaded_file.size + data["downloadspeed"] = download_netspeed + data["downloadcompletion"] = round(download_completion, 0.1) data["disk_size"] = my_computer.hard_drive.max_capacity data["disk_used"] = my_computer.hard_drive.used_capacity var/list/all_entries[0] for(var/datum/computer_file/program/P in ntnet_global.available_station_software) // Only those programs our user can run will show in the list - if(!P.can_run(user) && P.requires_access_to_download) + if(!P.can_run(user) && P.requires_access_to_download || my_computer.hard_drive.find_file_by_name(P.filename)) continue all_entries.Add(list(list( - "filename" = P.filename, - "filedesc" = P.filedesc, - "fileinfo" = P.extended_desc, - "size" = P.size, - "icon" = P.program_menu_icon - ))) - data["hackedavailable"] = 0 - if(prog.computer_emagged) // If we are running on emagged computer we have access to some "bonus" software - var/list/hacked_programs[0] - for(var/datum/computer_file/program/P in ntnet_global.available_antag_software) - data["hackedavailable"] = 1 - hacked_programs.Add(list(list( "filename" = P.filename, "filedesc" = P.filedesc, "fileinfo" = P.extended_desc, + "compatibility" = check_compatibility(P), "size" = P.size, "icon" = P.program_menu_icon + ))) + data["hackedavailable"] = FALSE + if(computer_emagged) // If we are running on emagged computer we have access to some "bonus" software + var/list/hacked_programs[0] + for(var/datum/computer_file/program/P in ntnet_global.available_antag_software) + if(my_computer.hard_drive.find_file_by_name(P.filename)) + continue + data["hackedavailable"] = TRUE + hacked_programs.Add(list(list( + "filename" = P.filename, + "filedesc" = P.filedesc, + "fileinfo" = P.extended_desc, + "compatibility" = check_compatibility(P), + "size" = P.size, + "icon" = P.program_menu_icon ))) data["hacked_programs"] = hacked_programs data["downloadable_programs"] = all_entries + data["downloads_queue"] = downloads_queue - if(prog.downloads_queue.len > 0) - data["downloads_queue"] = prog.downloads_queue + return data - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "ntnet_downloader.tmpl", "NTNet Download Program", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) +/datum/computer_file/program/ntnetdownload/proc/check_compatibility(datum/computer_file/program/P) + var/hardflag = computer.hardware_flag + + if(P && P.is_supported_by_hardware(hardflag,0)) + return "Compatible" + return "Incompatible!" diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index 6c67c02c0d..f2466213f3 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -11,222 +11,220 @@ network_destination = "NTNRC server" ui_header = "ntnrc_idle.gif" available_on_ntnet = 1 - nanomodule_path = /datum/nano_module/program/computer_chatclient/ - var/last_message = null // Used to generate the toolbar icon + tgui_id = "NtosNetChat" + var/last_message // Used to generate the toolbar icon var/username - var/datum/ntnet_conversation/channel = null - var/operator_mode = 0 // Channel operator mode - var/netadmin_mode = 0 // Administrator mode (invisible to other users + bypasses passwords) + var/active_channel + var/list/channel_history = list() + var/operator_mode = FALSE // Channel operator mode + var/netadmin_mode = FALSE // Administrator mode (invisible to other users + bypasses passwords) /datum/computer_file/program/chatclient/New() username = "DefaultUser[rand(100, 999)]" -/datum/computer_file/program/chatclient/Topic(href, href_list) +/datum/computer_file/program/chatclient/tgui_act(action, params) if(..()) - return 1 + return - if(href_list["PRG_speak"]) - . = 1 - if(!channel) - return 1 - var/mob/living/user = usr - var/message = sanitize(input(user, "Enter message or leave blank to cancel: "), 512) - if(!message || !channel) - return - channel.add_message(message, username) + var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) + var/authed = FALSE + if(channel && ((channel.operator == src) || netadmin_mode)) + authed = TRUE + switch(action) + if("PRG_speak") + if(!channel || isnull(active_channel)) + return + var/message = reject_bad_text(params["message"]) + if(!message) + return + if(channel.password && !(src in channel.clients)) + if(channel.password == message) + channel.add_client(src) + return TRUE - if(href_list["PRG_joinchannel"]) - . = 1 - var/datum/ntnet_conversation/C - for(var/datum/ntnet_conversation/chan in ntnet_global.chat_channels) - if(chan.id == text2num(href_list["PRG_joinchannel"])) - C = chan - break + channel.add_message(message, username) + // var/mob/living/user = usr + // user.log_talk(message, LOG_CHAT, tag="as [username] to channel [channel.title]") + return TRUE + if("PRG_joinchannel") + var/new_target = text2num(params["id"]) + if(isnull(new_target) || new_target == active_channel) + return - if(!C) - return 1 + if(netadmin_mode) + active_channel = new_target // Bypasses normal leave/join and passwords. Technically makes the user invisible to others. + return TRUE - if(netadmin_mode) - channel = C // Bypasses normal leave/join and passwords. Technically makes the user invisible to others. - return 1 - - if(C.password) + active_channel = new_target + channel = ntnet_global.get_chat_channel_by_id(new_target) + if(!(src in channel.clients) && !channel.password) + channel.add_client(src) + return TRUE + if("PRG_leavechannel") + if(channel) + channel.remove_client(src) + active_channel = null + return TRUE + if("PRG_newchannel") + var/channel_title = reject_bad_text(params["new_channel_name"]) + if(!channel_title) + return + var/datum/ntnet_conversation/C = new /datum/ntnet_conversation() + C.add_client(src) + C.operator = src + C.title = channel_title + active_channel = C.id + return TRUE + if("PRG_toggleadmin") + if(netadmin_mode) + netadmin_mode = FALSE + if(channel) + channel.remove_client(src) // We shouldn't be in channel's user list, but just in case... + return TRUE var/mob/living/user = usr - var/password = sanitize(input(user,"Access Denied. Enter password:")) - if(C && (password == C.password)) - C.add_client(src) - channel = C - return 1 - C.add_client(src) - channel = C - if(href_list["PRG_leavechannel"]) - . = 1 - if(channel) - channel.remove_client(src) - channel = null - if(href_list["PRG_newchannel"]) - . = 1 - var/mob/living/user = usr - var/channel_title = sanitizeSafe(input(user,"Enter channel name or leave blank to cancel:"), 64) - if(!channel_title) - return - var/datum/ntnet_conversation/C = new/datum/ntnet_conversation() - C.add_client(src) - C.operator = src - channel = C - C.title = channel_title - if(href_list["PRG_toggleadmin"]) - . = 1 - if(netadmin_mode) - netadmin_mode = 0 - if(channel) - channel.remove_client(src) // We shouldn't be in channel's user list, but just in case... - channel = null - return 1 - var/mob/living/user = usr - if(can_run(usr, 1, access_network)) - if(channel) - var/response = alert(user, "Really engage admin-mode? You will be disconnected from your current channel!", "NTNRC Admin mode", "Yes", "No") - if(response == "Yes") - if(channel) - channel.remove_client(src) - channel = null - else - return - netadmin_mode = 1 - if(href_list["PRG_changename"]) - . = 1 - var/mob/living/user = usr - var/newname = sanitize(input(user,"Enter new nickname or leave blank to cancel:"), 20) - if(!newname) - return 1 - if(channel) - channel.add_status_message("[username] is now known as [newname].") - username = newname + if(can_run(user, TRUE, access_network)) + for(var/C in ntnet_global.chat_channels) + var/datum/ntnet_conversation/chan = C + chan.remove_client(src) + netadmin_mode = TRUE + return TRUE + if("PRG_changename") + var/newname = sanitize(params["new_name"]) + if(!newname) + return + for(var/C in ntnet_global.chat_channels) + var/datum/ntnet_conversation/chan = C + if(src in chan.clients) + chan.add_status_message("[username] is now known as [newname].") + username = newname + return TRUE + if("PRG_savelog") + if(!channel) + return + var/logname = stripped_input(params["log_name"]) + if(!logname) + return + var/datum/computer_file/data/logfile = new /datum/computer_file/data/logfile() + // Now we will generate HTML-compliant file that can actually be viewed/printed. + logfile.filename = logname + logfile.stored_data = "\[b\]Logfile dump from NTNRC channel [channel.title]\[/b\]\[BR\]" + for(var/logstring in channel.messages) + logfile.stored_data = "[logfile.stored_data][logstring]\[BR\]" + logfile.stored_data = "[logfile.stored_data]\[b\]Logfile dump completed.\[/b\]" + logfile.calculate_size() + if(!computer || !computer.hard_drive || !computer.hard_drive.store_file(logfile)) + if(!computer) + // This program shouldn't even be runnable without computer. + CRASH("Var computer is null!") + if(!computer.hard_drive) + computer.visible_message("\The [computer] shows an \"I/O Error - Hard drive connection error\" warning.") + else // In 99.9% cases this will mean our HDD is full + computer.visible_message("\The [computer] shows an \"I/O Error - Hard drive may be full. Please free some space and try again. Required space: [logfile.size]GQ\" warning.") + return TRUE + if("PRG_renamechannel") + if(!authed) + return + var/newname = reject_bad_text(params["new_name"]) + if(!newname || !channel) + return + channel.add_status_message("Channel renamed from [channel.title] to [newname] by operator.") + channel.title = newname + return TRUE + if("PRG_deletechannel") + if(authed) + qdel(channel) + active_channel = null + return TRUE + if("PRG_setpassword") + if(!authed) + return - if(href_list["PRG_savelog"]) - . = 1 - if(!channel) - return - var/mob/living/user = usr - var/logname = input(user,"Enter desired logfile name (.log) or leave blank to cancel:") - if(!logname || !channel) - return 1 - var/datum/computer_file/data/logfile = new/datum/computer_file/data/logfile() - // Now we will generate HTML-compliant file that can actually be viewed/printed. - logfile.filename = logname - logfile.stored_data = "\[b\]Logfile dump from NTNRC channel [channel.title]\[/b\]\[BR\]" - for(var/logstring in channel.messages) - logfile.stored_data += "[logstring]\[BR\]" - logfile.stored_data += "\[b\]Logfile dump completed.\[/b\]" - logfile.calculate_size() - if(!computer || !computer.hard_drive || !computer.hard_drive.store_file(logfile)) - if(!computer) - // This program shouldn't even be runnable without computer. - CRASH("Var computer is null!") - return 1 - if(!computer.hard_drive) - computer.visible_message("\The [computer] shows an \"I/O Error - Hard drive connection error\" warning.") - else // In 99.9% cases this will mean our HDD is full - computer.visible_message("\The [computer] shows an \"I/O Error - Hard drive may be full. Please free some space and try again. Required space: [logfile.size]GQ\" warning.") - if(href_list["PRG_renamechannel"]) - . = 1 - if(!operator_mode || !channel) - return 1 - var/mob/living/user = usr - var/newname = sanitize(input(user, "Enter new channel name or leave blank to cancel:"), 64) - if(!newname || !channel) - return - channel.add_status_message("Channel renamed from [channel.title] to [newname] by operator.") - channel.title = newname - if(href_list["PRG_deletechannel"]) - . = 1 - if(channel && ((channel.operator == src) || netadmin_mode)) - qdel(channel) - channel = null - if(href_list["PRG_setpassword"]) - . = 1 - if(!channel || ((channel.operator != src) && !netadmin_mode)) - return 1 + var/new_password = sanitize(params["new_password"]) + if(!authed) + return - var/mob/living/user = usr - var/newpassword = sanitize(input(user, "Enter new password for this channel. Leave blank to cancel, enter 'nopassword' to remove password completely:")) - if(!channel || !newpassword || ((channel.operator != src) && !netadmin_mode)) - return 1 - - if(newpassword == "nopassword") - channel.password = "" - else - channel.password = newpassword + channel.password = new_password + return TRUE /datum/computer_file/program/chatclient/process_tick() ..() + var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) if(program_state != PROGRAM_STATE_KILLED) ui_header = "ntnrc_idle.gif" if(channel) // Remember the last message. If there is no message in the channel remember null. - last_message = channel.messages.len ? channel.messages[channel.messages.len - 1] : null + last_message = length(channel.messages) ? channel.messages[channel.messages.len - 1] : null else last_message = null return 1 - if(channel && channel.messages && channel.messages.len) + if(channel?.messages?.len) ui_header = last_message == channel.messages[channel.messages.len - 1] ? "ntnrc_idle.gif" : "ntnrc_new.gif" else ui_header = "ntnrc_idle.gif" -/datum/computer_file/program/chatclient/kill_program(var/forced = 0) - if(channel) +/datum/computer_file/program/chatclient/kill_program(forced = FALSE) + for(var/C in ntnet_global.chat_channels) + var/datum/ntnet_conversation/channel = C channel.remove_client(src) - channel = null - ..(forced) - -/datum/nano_module/program/computer_chatclient - name = "NTNet Relay Chat Client" - -/datum/nano_module/program/computer_chatclient/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - if(!ntnet_global || !ntnet_global.chat_channels) - return + ..() +/datum/computer_file/program/chatclient/tgui_static_data(mob/user) var/list/data = list() - if(program) - data = program.get_header_data() + data["can_admin"] = can_run(user, FALSE, access_network) + return data + +/datum/computer_file/program/chatclient/tgui_data(mob/user) + if(!ntnet_global || !ntnet_global.chat_channels) + return list() - var/datum/computer_file/program/chatclient/C = program - if(!istype(C)) - return + var/list/data = get_header_data() - data["adminmode"] = C.netadmin_mode - if(C.channel) - data["title"] = C.channel.title - var/list/messages[0] - for(var/M in C.channel.messages) - messages.Add(list(list( - "msg" = M + var/list/all_channels = list() + for(var/C in ntnet_global.chat_channels) + var/datum/ntnet_conversation/conv = C + if(conv && conv.title) + all_channels.Add(list(list( + "chan" = conv.title, + "id" = conv.id ))) - data["messages"] = messages - var/list/clients[0] - for(var/datum/computer_file/program/chatclient/cl in C.channel.clients) + data["all_channels"] = all_channels + + data["active_channel"] = active_channel + data["username"] = username + data["adminmode"] = netadmin_mode + var/datum/ntnet_conversation/channel = ntnet_global.get_chat_channel_by_id(active_channel) + if(channel) + data["title"] = channel.title + var/authed = FALSE + if(!channel.password) + authed = TRUE + if(netadmin_mode) + authed = TRUE + var/list/clients = list() + for(var/C in channel.clients) + if(C == src) + authed = TRUE + var/datum/computer_file/program/chatclient/cl = C clients.Add(list(list( "name" = cl.username ))) - data["clients"] = clients - C.operator_mode = (C.channel.operator == C) ? 1 : 0 - data["is_operator"] = C.operator_mode || C.netadmin_mode - - else // Channel selection screen - var/list/all_channels[0] - for(var/datum/ntnet_conversation/conv in ntnet_global.chat_channels) - if(conv && conv.title) - all_channels.Add(list(list( - "chan" = conv.title, - "id" = conv.id + data["authed"] = authed + //no fishing for ui data allowed + if(authed) + data["clients"] = clients + var/list/messages = list() + for(var/M in channel.messages) + messages.Add(list(list( + "msg" = M ))) - data["all_channels"] = all_channels + data["messages"] = messages + data["is_operator"] = (channel.operator == src) || netadmin_mode + else + data["clients"] = list() + data["messages"] = list() + else + data["clients"] = list() + data["authed"] = FALSE + data["messages"] = list() - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "ntnet_chat.tmpl", "NTNet Relay Chat Client", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm index 0efed986ae..ea88d3597e 100644 --- a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm +++ b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm @@ -12,7 +12,7 @@ var/global/nttransfer_uid = 0 requires_ntnet_feature = NTNET_PEERTOPEER network_destination = "other device via P2P tunnel" available_on_ntnet = 1 - nanomodule_path = /datum/nano_module/program/computer_nttransfer/ + tgui_id = "NtosNetTransfer" var/error = "" // Error screen var/server_password = "" // Optional password to download the file. @@ -75,111 +75,101 @@ var/global/nttransfer_uid = 0 remote = null download_completion = 0 +/datum/computer_file/program/nttransfer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() -/datum/nano_module/program/computer_nttransfer - name = "NTNet P2P Transfer Client" + data["error"] = error -/datum/nano_module/program/computer_nttransfer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - if(!program) - return - var/datum/computer_file/program/nttransfer/PRG = program - if(!istype(PRG)) - return - - var/list/data = program.get_header_data() - - if(PRG.error) - data["error"] = PRG.error - else if(PRG.downloaded_file) - data["downloading"] = 1 - data["download_size"] = PRG.downloaded_file.size - data["download_progress"] = PRG.download_completion - data["download_netspeed"] = PRG.actual_netspeed - data["download_name"] = "[PRG.downloaded_file.filename].[PRG.downloaded_file.filetype]" - else if (PRG.provided_file) - data["uploading"] = 1 - data["upload_uid"] = PRG.unique_token - data["upload_clients"] = PRG.connected_clients.len - data["upload_haspassword"] = PRG.server_password ? 1 : 0 - data["upload_filename"] = "[PRG.provided_file.filename].[PRG.provided_file.filetype]" - else if (PRG.upload_menu) - var/list/all_files[0] - for(var/datum/computer_file/F in PRG.computer.hard_drive.stored_files) + data["downloading"] = !!downloaded_file + if(downloaded_file) + data["download_size"] = downloaded_file.size + data["download_progress"] = download_completion + data["download_netspeed"] = actual_netspeed + data["download_name"] = "[downloaded_file.filename].[downloaded_file.filetype]" + + data["uploading"] = !!provided_file + if(provided_file) + data["upload_uid"] = unique_token + data["upload_clients"] = connected_clients.len + data["upload_haspassword"] = server_password ? 1 : 0 + data["upload_filename"] = "[provided_file.filename].[provided_file.filetype]" + + data["upload_filelist"] = list() + if(upload_menu) + var/list/all_files = list() + for(var/datum/computer_file/F in computer.hard_drive.stored_files) all_files.Add(list(list( "uid" = F.uid, "filename" = "[F.filename].[F.filetype]", "size" = F.size ))) data["upload_filelist"] = all_files - else - var/list/all_servers[0] + + data["servers"] = list() + if(!(downloaded_file || provided_file || upload_menu)) + var/list/all_servers = list() for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers) if(!P.provided_file) continue all_servers.Add(list(list( - "uid" = P.unique_token, - "filename" = "[P.provided_file.filename].[P.provided_file.filetype]", - "size" = P.provided_file.size, - "haspassword" = P.server_password ? 1 : 0 + "uid" = P.unique_token, + "filename" = "[P.provided_file.filename].[P.provided_file.filetype]", + "size" = P.provided_file.size, + "haspassword" = P.server_password ? 1 : 0 ))) data["servers"] = all_servers - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "ntnet_transfer.tmpl", "NTNet P2P Transfer Client", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data -/datum/computer_file/program/nttransfer/Topic(href, href_list) +/datum/computer_file/program/nttransfer/tgui_act(action, list/params, datum/tgui/ui) if(..()) - return 1 - if(href_list["PRG_downloadfile"]) - for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers) - if("[P.unique_token]" == href_list["PRG_downloadfile"]) - remote = P - break - if(!remote || !remote.provided_file) - return - if(remote.server_password) - var/pass = sanitize(input(usr, "Code 401 Unauthorized. Please enter password:", "Password required")) - if(pass != remote.server_password) - error = "Incorrect Password" + return TRUE + switch(action) + if("PRG_downloadfile") + for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers) + if(P.unique_token == text2num(params["uid"])) + remote = P + break + if(!remote || !remote.provided_file) return - downloaded_file = remote.provided_file.clone() - remote.connected_clients.Add(src) - return 1 - if(href_list["PRG_reset"]) - error = "" - upload_menu = 0 - finalize_download() - if(src in ntnet_global.fileservers) - ntnet_global.fileservers.Remove(src) - for(var/datum/computer_file/program/nttransfer/T in connected_clients) - T.crash_download("Remote server has forcibly closed the connection") - provided_file = null - return 1 - if(href_list["PRG_setpassword"]) - var/pass = sanitize(input(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none")) - if(!pass) - return - if(pass == "none") - server_password = "" - return - server_password = pass - return 1 - if(href_list["PRG_uploadfile"]) - for(var/datum/computer_file/F in computer.hard_drive.stored_files) - if("[F.uid]" == href_list["PRG_uploadfile"]) - if(F.unsendable) - error = "I/O Error: File locked." + if(remote.server_password) + var/pass = sanitize(input(usr, "Code 401 Unauthorized. Please enter password:", "Password required")) + if(pass != remote.server_password) + error = "Incorrect Password" return - provided_file = F - ntnet_global.fileservers.Add(src) + downloaded_file = remote.provided_file.clone() + remote.connected_clients.Add(src) + return TRUE + if("PRG_reset") + error = "" + upload_menu = 0 + finalize_download() + if(src in ntnet_global.fileservers) + ntnet_global.fileservers.Remove(src) + for(var/datum/computer_file/program/nttransfer/T in connected_clients) + T.crash_download("Remote server has forcibly closed the connection") + provided_file = null + return TRUE + if("PRG_setpassword") + var/pass = sanitize(input(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none")) + if(!pass) return - error = "I/O Error: Unable to locate file on hard drive." - return 1 - if(href_list["PRG_uploadmenu"]) - upload_menu = 1 - return 0 + if(pass == "none") + server_password = "" + return + server_password = pass + return TRUE + if("PRG_uploadfile") + for(var/datum/computer_file/F in computer.hard_drive.stored_files) + if(F.uid == text2num(params["uid"])) + if(F.unsendable) + error = "I/O Error: File locked." + return + provided_file = F + ntnet_global.fileservers |= src + return + error = "I/O Error: Unable to locate file on hard drive." + return TRUE + if("PRG_uploadmenu") + upload_menu = 1 + return TRUE diff --git a/code/modules/modular_computers/file_system/programs/generic/uav.dm b/code/modules/modular_computers/file_system/programs/generic/uav.dm index 0e98d0e0ea..24d677b679 100644 --- a/code/modules/modular_computers/file_system/programs/generic/uav.dm +++ b/code/modules/modular_computers/file_system/programs/generic/uav.dm @@ -4,7 +4,7 @@ /datum/computer_file/program/uav filename = "rigger" filedesc = "UAV Control" - nanomodule_path = /datum/nano_module/uav + tguimodule_path = /datum/tgui_module/uav program_icon_state = "comm_monitor" program_key_state = "generic_key" program_menu_icon = "link" @@ -12,255 +12,3 @@ size = 12 available_on_ntnet = 1 //requires_ntnet = 1 - -/datum/nano_module/uav - name = "UAV Control program" - var/obj/item/device/uav/current_uav = null //The UAV we're watching - var/signal_strength = 0 //Our last signal strength report (cached for a few seconds) - var/signal_test_counter = 0 //How long until next signal strength check - var/list/viewers //Who's viewing a UAV through us - var/adhoc_range = 30 //How far we can operate on a UAV without NTnet - -/datum/nano_module/uav/Destroy() - if(LAZYLEN(viewers)) - for(var/weakref/W in viewers) - var/M = W.resolve() - if(M) - unlook(M) - . = ..() - -/datum/nano_module/uav/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, state = default_state) - var/list/data = host.initial_data() - - if(current_uav) - if(QDELETED(current_uav)) - set_current(null) - else if(signal_test_counter-- <= 0) - signal_strength = get_signal_to(current_uav) - if(!signal_strength) - set_current(null) - else // Don't reset counter until we find a UAV that's actually in range we can stay connected to - signal_test_counter = 20 - - data["current_uav"] = null - if(current_uav) - data["current_uav"] = list("status" = current_uav.get_status_string(), "power" = current_uav.state == 1 ? 1 : null) - data["signal_strength"] = signal_strength ? signal_strength >= 2 ? "High" : "Low" : "None" - data["in_use"] = LAZYLEN(viewers) - - var/list/paired_map = list() - var/obj/item/modular_computer/mc_host = nano_host() - if(istype(mc_host)) - for(var/puav in mc_host.paired_uavs) - var/weakref/wr = puav - var/obj/item/device/uav/U = wr.resolve() - paired_map[++paired_map.len] = list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]") - - data["paired_uavs"] = paired_map - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "mod_uav.tmpl", "UAV Control", 600, 500, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - -/datum/nano_module/uav/Topic(var/href, var/href_list = list(), var/datum/topic_state/state) - if((. = ..())) - return - state = state || DefaultTopicState() || global.default_state - if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE) - CouldUseTopic(usr) - return OnTopic(usr, href_list, state) - CouldNotUseTopic(usr) - return TRUE - -/datum/nano_module/uav/proc/OnTopic(var/mob/user, var/list/href_list) - if(href_list["switch_uav"]) - var/obj/item/device/uav/U = locate(href_list["switch_uav"]) //This is a \ref to the UAV itself - if(!istype(U)) - to_chat(usr,"Something is blocking the connection to that UAV. In-person investigation is required.") - return TOPIC_NOACTION - - if(!get_signal_to(U)) - to_chat(usr,"The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.") - return TOPIC_NOACTION - - set_current(U) - return TOPIC_REFRESH - - if(href_list["del_uav"]) - var/refstring = href_list["del_uav"] //This is a \ref to the UAV itself - var/obj/item/modular_computer/mc_host = nano_host() - //This is so we can really scrape up any weakrefs that can't resolve - for(var/weakref/wr in mc_host.paired_uavs) - if(wr.ref == refstring) - if(current_uav?.weakref == wr) - set_current(null) - LAZYREMOVE(mc_host.paired_uavs, wr) - - else if(href_list["view_uav"]) - if(!current_uav) - return TOPIC_NOACTION - - if(current_uav.check_eye(user) < 0) - to_chat(usr,"The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.") - else - viewing_uav(user) ? unlook(user) : look(user) - return TOPIC_NOACTION - - else if(href_list["power_uav"]) - if(!current_uav) - return TOPIC_NOACTION - else if(current_uav.toggle_power()) - //Clean up viewers faster - if(LAZYLEN(viewers)) - for(var/weakref/W in viewers) - var/M = W.resolve() - if(M) - unlook(M) - return TOPIC_REFRESH - -/datum/nano_module/uav/proc/DefaultTopicState() - return global.default_state - -/datum/nano_module/uav/proc/CouldNotUseTopic(mob/user) - . = ..() - unlook(user) - -/datum/nano_module/uav/proc/CouldUseTopic(mob/user) - . = ..() - if(viewing_uav(user)) - look(user) - -/datum/nano_module/uav/proc/set_current(var/obj/item/device/uav/U) - if(current_uav == U) - return - - signal_strength = 0 - current_uav = U - - if(LAZYLEN(viewers)) - for(var/weakref/W in viewers) - var/M = W.resolve() - if(M) - if(current_uav) - to_chat(M, "You're disconnected from the UAV's camera!") - unlook(M) - else - look(M) - -//// -//// Finding signal strength between us and the UAV -//// -/datum/nano_module/uav/proc/get_signal_to(var/atom/movable/AM) - // Following roughly the ntnet signal levels - // 0 is none - // 1 is weak - // 2 is strong - var/obj/item/modular_computer/host = nano_host() //Better not add this to anything other than modular computers. - if(!istype(host)) - return - var/our_signal = host.get_ntnet_status() //1 low, 2 good, 3 wired, 0 none - var/their_z = get_z(AM) - - //If we have no NTnet connection don't bother getting theirs - if(!our_signal) - if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) - return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs - else - return 0 - - var/list/zlevels_in_range = using_map.get_map_levels(their_z, FALSE) - var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range - var/their_signal = 0 - for(var/relay in ntnet_global.relays) - var/obj/machinery/ntnet_relay/R = relay - if(!R.operable()) - continue - if(R.z == their_z) - their_signal = 2 - break - if(R.z in zlevels_in_range) - their_signal = 2 - break - if(R.z in zlevels_in_long_range) - their_signal = 1 - break - - if(!their_signal) //They have no NTnet at all - if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) - return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs - else - return 0 - else - return max(our_signal, their_signal) - -//// -//// UAV viewer handling -//// -/datum/nano_module/uav/proc/viewing_uav(mob/user) - return (weakref(user) in viewers) - -/datum/nano_module/uav/proc/look(var/mob/user) - if(issilicon(user)) //Too complicated for me to want to mess with at the moment - to_chat(user, "Regulations prevent you from controlling several corporeal forms at the same time!") - return - - if(!current_uav) - return - - user.set_machine(nano_host()) - user.reset_view(current_uav) - current_uav.add_master(user) - LAZYDISTINCTADD(viewers, weakref(user)) - -/datum/nano_module/uav/proc/unlook(var/mob/user) - user.unset_machine() - user.reset_view() - if(current_uav) - current_uav.remove_master(user) - LAZYREMOVE(viewers, weakref(user)) - -/datum/nano_module/uav/check_eye(var/mob/user) - if(get_dist(user, nano_host()) > 1 || user.blinded || !current_uav) - unlook(user) - return -1 - - var/viewflag = current_uav.check_eye(user) - if (viewflag < 0) //camera doesn't work - unlook(user) - return -1 - - return viewflag - -//// -//// Relaying movements to the UAV -//// -/datum/nano_module/uav/relaymove(var/mob/user, direction) - if(current_uav) - return current_uav.relaymove(user, direction, signal_strength) - -//// -//// The effects when looking through a UAV -//// -/datum/nano_module/uav/apply_visual(var/mob/M) - if(!M.client) - return - if(weakref(M) in viewers) - M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed) - M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline) - - if(signal_strength <= 1) - M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise) - else - M.clear_fullscreen("whitenoise", 0) - else - remove_visual(M) - -/datum/nano_module/uav/remove_visual(mob/M) - if(!M.client) - return - M.clear_fullscreen("fishbed",0) - M.clear_fullscreen("scanlines",0) - M.clear_fullscreen("whitenoise",0) diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm index 1a4d7a1871..61f3b43da8 100644 --- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm +++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm @@ -5,9 +5,10 @@ program_icon_state = "word" program_key_state = "atmos_key" size = 4 - requires_ntnet = 0 - available_on_ntnet = 1 - nanomodule_path = /datum/nano_module/program/computer_wordprocessor/ + requires_ntnet = FALSE + available_on_ntnet = TRUE + tgui_id = "NtosWordProcessor" + var/browsing var/open_file var/loaded_data @@ -28,7 +29,7 @@ if(F) open_file = F.filename loaded_data = F.stored_data - return 1 + return TRUE /datum/computer_file/program/wordprocessor/proc/save_file(var/filename) var/datum/computer_file/data/F = get_file(filename) @@ -46,7 +47,7 @@ HDD.store_file(backup) return 0 is_edited = 0 - return 1 + return TRUE /datum/computer_file/program/wordprocessor/proc/create_file(var/newname, var/data = "") if(!newname) @@ -64,142 +65,144 @@ if(HDD.store_file(F)) return F -/datum/computer_file/program/wordprocessor/Topic(href, href_list) +/datum/computer_file/program/wordprocessor/tgui_act(action, list/params, datum/tgui/ui) if(..()) - return 1 + return TRUE - if(href_list["PRG_txtrpeview"]) - show_browser(usr,"[open_file][pencode2html(loaded_data)]", "window=[open_file]") - return 1 + switch(action) + if("PRG_txtrpeview") + show_browser(usr,"[open_file][pencode2html(loaded_data)]", "window=[open_file]") + return TRUE - if(href_list["PRG_taghelp"]) - to_chat(usr, "The hologram of a googly-eyed paper clip helpfully tells you:") - var/help = {" - \[br\] : Creates a linebreak. - \[center\] - \[/center\] : Centers the text. - \[h1\] - \[/h1\] : First level heading. - \[h2\] - \[/h2\] : Second level heading. - \[h3\] - \[/h3\] : Third level heading. - \[b\] - \[/b\] : Bold. - \[i\] - \[/i\] : Italic. - \[u\] - \[/u\] : Underlined. - \[small\] - \[/small\] : Decreases the size of the text. - \[large\] - \[/large\] : Increases the size of the text. - \[field\] : Inserts a blank text field, which can be filled later. Useful for forms. - \[date\] : Current station date. - \[time\] : Current station time. - \[list\] - \[/list\] : Begins and ends a list. - \[*\] : A list item. - \[hr\] : Horizontal rule. - \[table\] - \[/table\] : Creates table using \[row\] and \[cell\] tags. - \[grid\] - \[/grid\] : Table without visible borders, for layouts. - \[row\] - New table row. - \[cell\] - New table cell. - \[logo\] - Inserts NT logo image. - \[redlogo\] - Inserts red NT logo image. - \[sglogo\] - Inserts Solgov insignia image."} + if("PRG_taghelp") + to_chat(usr, "The hologram of a googly-eyed paper clip helpfully tells you:") + var/help = {" + \[br\] : Creates a linebreak. + \[center\] - \[/center\] : Centers the text. + \[h1\] - \[/h1\] : First level heading. + \[h2\] - \[/h2\] : Second level heading. + \[h3\] - \[/h3\] : Third level heading. + \[b\] - \[/b\] : Bold. + \[i\] - \[/i\] : Italic. + \[u\] - \[/u\] : Underlined. + \[small\] - \[/small\] : Decreases the size of the text. + \[large\] - \[/large\] : Increases the size of the text. + \[field\] : Inserts a blank text field, which can be filled later. Useful for forms. + \[date\] : Current station date. + \[time\] : Current station time. + \[list\] - \[/list\] : Begins and ends a list. + \[*\] : A list item. + \[hr\] : Horizontal rule. + \[table\] - \[/table\] : Creates table using \[row\] and \[cell\] tags. + \[grid\] - \[/grid\] : Table without visible borders, for layouts. + \[row\] - New table row. + \[cell\] - New table cell. + \[logo\] - Inserts NT logo image. + \[redlogo\] - Inserts red NT logo image. + \[sglogo\] - Inserts Solgov insignia image."} - to_chat(usr, help) - return 1 + to_chat(usr, help) + return TRUE - if(href_list["PRG_closebrowser"]) - browsing = 0 - return 1 + if("PRG_closebrowser") + browsing = 0 + return TRUE - if(href_list["PRG_backtomenu"]) - error = null - return 1 + if("PRG_backtomenu") + error = null + return TRUE - if(href_list["PRG_loadmenu"]) - browsing = 1 - return 1 + if("PRG_loadmenu") + browsing = 1 + return TRUE - if(href_list["PRG_openfile"]) - . = 1 - if(is_edited) - if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes") - save_file(open_file) - browsing = 0 - if(!open_file(href_list["PRG_openfile"])) - error = "I/O error: Unable to open file '[href_list["PRG_openfile"]]'." + if("PRG_openfile") + if(is_edited) + if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes") + save_file(open_file) + browsing = 0 + if(!open_file(params["PRG_openfile"])) + error = "I/O error: Unable to open file '[params["PRG_openfile"]]'." + return TRUE - if(href_list["PRG_newfile"]) - . = 1 - if(is_edited) - if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes") - save_file(open_file) + if("PRG_newfile") + if(is_edited) + if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes") + save_file(open_file) - var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null) - if(!newname) - return 1 - var/datum/computer_file/data/F = create_file(newname) - if(F) - open_file = F.filename - loaded_data = "" - return 1 - else - error = "I/O error: Unable to create file '[href_list["PRG_saveasfile"]]'." + var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null) + if(!newname) + return TRUE + var/datum/computer_file/data/F = create_file(newname) + if(F) + open_file = F.filename + loaded_data = "" + return TRUE + else + error = "I/O error: Unable to create file '[params["PRG_saveasfile"]]'." + return TRUE - if(href_list["PRG_saveasfile"]) - . = 1 - var/newname = sanitize(input(usr, "Enter file name:", "Save As") as text|null) - if(!newname) - return 1 - var/datum/computer_file/data/F = create_file(newname, loaded_data) - if(F) - open_file = F.filename - else - error = "I/O error: Unable to create file '[href_list["PRG_saveasfile"]]'." - return 1 + if("PRG_saveasfile") + var/newname = sanitize(input(usr, "Enter file name:", "Save As") as text|null) + if(!newname) + return TRUE + var/datum/computer_file/data/F = create_file(newname, loaded_data) + if(F) + open_file = F.filename + else + error = "I/O error: Unable to create file '[params["PRG_saveasfile"]]'." + return TRUE - if(href_list["PRG_savefile"]) - . = 1 - if(!open_file) - open_file = sanitize(input(usr, "Enter file name:", "Save As") as text|null) + if("PRG_savefile") if(!open_file) - return 0 - if(!save_file(open_file)) - error = "I/O error: Unable to save file '[open_file]'." - return 1 + open_file = sanitize(input(usr, "Enter file name:", "Save As") as text|null) + if(!open_file) + return 0 + if(!save_file(open_file)) + error = "I/O error: Unable to save file '[open_file]'." + return TRUE - if(href_list["PRG_editfile"]) - var/oldtext = html_decode(loaded_data) - oldtext = replacetext(oldtext, "\[br\]", "\n") + if("PRG_editfile") + var/oldtext = html_decode(loaded_data) + oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(input(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) - if(!newtext) - return - loaded_data = newtext - is_edited = 1 - return 1 + var/newtext = sanitize(replacetext(input(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + if(!newtext) + return + loaded_data = newtext + is_edited = 1 + return TRUE - if(href_list["PRG_printfile"]) - . = 1 - if(!computer.nano_printer) - error = "Missing Hardware: Your computer does not have the required hardware to complete this operation." - return 1 - if(!computer.nano_printer.print_text(pencode2html(loaded_data))) - error = "Hardware error: Printer was unable to print the file. It may be out of paper." - return 1 + if("PRG_printfile") + if(!computer.nano_printer) + error = "Missing Hardware: Your computer does not have the required hardware to complete this operation." + return TRUE + if(!computer.nano_printer.print_text(pencode2html(loaded_data))) + error = "Hardware error: Printer was unable to print the file. It may be out of paper." + return TRUE + return TRUE -/datum/nano_module/program/computer_wordprocessor - name = "Word Processor" +/datum/computer_file/program/wordprocessor/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() -/datum/nano_module/program/computer_wordprocessor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() - var/datum/computer_file/program/wordprocessor/PRG - PRG = program + var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive + var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD = computer.portable_drive + data["error"] = null + if(error) + data["error"] = error - var/obj/item/weapon/computer_hardware/hard_drive/HDD - var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD - if(PRG.error) - data["error"] = PRG.error - if(PRG.browsing) - data["browsing"] = PRG.browsing - if(!PRG.computer || !PRG.computer.hard_drive) + data["browsing"] = null + data["files"] = list() + data["usbconnected"] = FALSE + data["usbfiles"] = list() + data["filedata"] = null + data["filename"] = null + + if(browsing) + data["browsing"] = browsing + if(!computer || !HDD) data["error"] = "I/O ERROR: Unable to access hard drive." else - HDD = PRG.computer.hard_drive var/list/files[0] for(var/datum/computer_file/F in HDD.stored_files) if(F.filetype == "TXT") @@ -209,7 +212,6 @@ ))) data["files"] = files - RHDD = PRG.computer.portable_drive if(RHDD) data["usbconnected"] = 1 var/list/usbfiles[0] @@ -220,16 +222,11 @@ "size" = F.size, ))) data["usbfiles"] = usbfiles - else if(PRG.open_file) - data["filedata"] = pencode2html(PRG.loaded_data) - data["filename"] = PRG.is_edited ? "[PRG.open_file]*" : PRG.open_file + else if(open_file) + data["filedata"] = pencode2html(loaded_data) + data["filename"] = is_edited ? "[open_file]*" : open_file else - data["filedata"] = pencode2html(PRG.loaded_data) + data["filedata"] = pencode2html(loaded_data) data["filename"] = "UNNAMED" - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "word_processor.tmpl", "Word Processor", 575, 700, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() \ No newline at end of file + return data \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/research/email_administration.dm b/code/modules/modular_computers/file_system/programs/research/email_administration.dm index 93ba0bded3..eb9dfd71a6 100644 --- a/code/modules/modular_computers/file_system/programs/research/email_administration.dm +++ b/code/modules/modular_computers/file_system/programs/research/email_administration.dm @@ -8,29 +8,34 @@ size = 12 requires_ntnet = 1 available_on_ntnet = 1 - nanomodule_path = /datum/nano_module/email_administration + tgui_id = "NtosEmailAdministration" required_access = access_network - - - -/datum/nano_module/email_administration/ - name = "Email Client" var/datum/computer_file/data/email_account/current_account = null var/datum/computer_file/data/email_message/current_message = null var/error = "" -/datum/nano_module/email_administration/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() +/datum/computer_file/program/email_administration/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() - if(error) - data["error"] = error - else if(istype(current_message)) - data["msg_title"] = current_message.title - data["msg_body"] = pencode2html(current_message.stored_data) - data["msg_timestamp"] = current_message.timestamp - data["msg_source"] = current_message.source - else if(istype(current_account)) + data["error"] = error + + data["cur_title"] = null + data["cur_body"] = null + data["cur_timestamp"] = null + data["cur_source"] = null + + if(istype(current_message)) + data["cur_title"] = current_message.title + data["cur_body"] = pencode2html(current_message.stored_data) + data["cur_timestamp"] = current_message.timestamp + data["cur_source"] = current_message.source + + data["current_account"] = null + data["cur_suspended"] = null + data["messages"] = null + + if(istype(current_account)) data["current_account"] = current_account.login data["cur_suspended"] = current_account.suspended var/list/all_messages = list() @@ -42,103 +47,90 @@ "uid" = message.uid ))) data["messages"] = all_messages - data["messagecount"] = all_messages.len - else - var/list/all_accounts = list() - for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) - if(!account.can_login) - continue - all_accounts.Add(list(list( - "login" = account.login, - "uid" = account.uid - ))) - data["accounts"] = all_accounts - data["accountcount"] = all_accounts.len - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "email_administration.tmpl", "Email Administration Utility", 600, 450, state = state) - if(host.update_layout()) - ui.auto_update_layout = 1 - ui.set_auto_update(1) - ui.set_initial_data(data) - ui.open() + var/list/all_accounts = list() + for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + if(!account.can_login) + continue + all_accounts.Add(list(list( + "login" = account.login, + "uid" = account.uid + ))) + data["accounts"] = all_accounts + return data -/datum/nano_module/email_administration/Topic(href, href_list) +/datum/computer_file/program/email_administration/tgui_act(action, list/params, datum/tgui/ui) if(..()) - return 1 - - var/mob/user = usr - if(!istype(user)) - return 1 + return TRUE // High security - can only be operated when the user has an ID with access on them. - var/obj/item/weapon/card/id/I = user.GetIdCard() + var/obj/item/weapon/card/id/I = usr.GetIdCard() if(!istype(I) || !(access_network in I.access)) - return 1 + return TRUE - if(href_list["back"]) - if(error) - error = "" - else if(current_message) - current_message = null - else - current_account = null - return 1 + switch(action) + if("back") + if(error) + error = "" + else if(current_message) + current_message = null + else + current_account = null + return TRUE - if(href_list["ban"]) - if(!current_account) - return 1 + if("ban") + if(!current_account) + return TRUE - current_account.suspended = !current_account.suspended - ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).") - error = "Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended." - return 1 + current_account.suspended = !current_account.suspended + ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended by SA [I.registered_name] ([I.assignment]).") + error = "Account [current_account.login] has been [current_account.suspended ? "" : "un" ]suspended." + return TRUE - if(href_list["changepass"]) - if(!current_account) - return 1 + if("changepass") + if(!current_account) + return TRUE - var/newpass = sanitize(input(user,"Enter new password for account [current_account.login]", "Password"), 100) - if(!newpass) - return 1 - current_account.password = newpass - ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).") - return 1 + var/newpass = sanitize(input(usr,"Enter new password for account [current_account.login]", "Password"), 100) + if(!newpass) + return TRUE + current_account.password = newpass + ntnet_global.add_log_with_ids_check("EMAIL LOG: SA-EDIT Password for account [current_account.login] has been changed by SA [I.registered_name] ([I.assignment]).") + return TRUE - if(href_list["viewmail"]) - if(!current_account) - return 1 + if("viewmail") + if(!current_account) + return TRUE - for(var/datum/computer_file/data/email_message/received_message in (current_account.inbox | current_account.spam | current_account.deleted)) - if(received_message.uid == text2num(href_list["viewmail"])) - current_message = received_message - break - return 1 + for(var/datum/computer_file/data/email_message/received_message in (current_account.inbox | current_account.spam | current_account.deleted)) + if(received_message.uid == text2num(params["viewmail"])) + current_message = received_message + break + return TRUE - if(href_list["viewaccount"]) - for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts) - if(email_account.uid == text2num(href_list["viewaccount"])) - current_account = email_account - break - return 1 + if("viewaccount") + for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts) + if(email_account.uid == text2num(params["viewaccount"])) + current_account = email_account + break + return TRUE - if(href_list["newaccount"]) - var/newdomain = sanitize(input(user,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds) - if(!newdomain) - return 1 - var/newlogin = sanitize(input(user,"Pick account name (@[newdomain]):", "Account name"), 100) - if(!newlogin) - return 1 + if("newaccount") + var/newdomain = sanitize(input(usr,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds) + if(!newdomain) + return TRUE + var/newlogin = sanitize(input(usr,"Pick account name (@[newdomain]):", "Account name"), 100) + if(!newlogin) + return TRUE - var/complete_login = "[newlogin]@[newdomain]" - if(ntnet_global.does_email_exist(complete_login)) - error = "Error creating account: An account with same address already exists." - return 1 + var/complete_login = "[newlogin]@[newdomain]" + if(ntnet_global.does_email_exist(complete_login)) + error = "Error creating account: An account with same address already exists." + return TRUE - var/datum/computer_file/data/email_account/new_account = new/datum/computer_file/data/email_account() - new_account.login = complete_login - new_account.password = GenerateKey() - error = "Email [new_account.login] has been created, with generated password [new_account.password]" - return 1 + var/datum/computer_file/data/email_account/new_account = new/datum/computer_file/data/email_account() + new_account.login = complete_login + new_account.password = GenerateKey() + error = "Email [new_account.login] has been created, with generated password [new_account.password]" + return TRUE diff --git a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm index 590837f2b5..0ce6dd5c49 100644 --- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm @@ -6,19 +6,15 @@ program_menu_icon = "wrench" extended_desc = "This program monitors the local NTNet network, provides access to logging systems, and allows for configuration changes" size = 12 - requires_ntnet = 1 + requires_ntnet = TRUE required_access = access_network - available_on_ntnet = 1 - nanomodule_path = /datum/nano_module/computer_ntnetmonitor/ + available_on_ntnet = TRUE + tgui_id = "NtosNetMonitor" -/datum/nano_module/computer_ntnetmonitor - name = "NTNet Diagnostics and Monitoring" - //available_to_ai = TRUE - -/datum/nano_module/computer_ntnetmonitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) +/datum/computer_file/program/ntnetmonitor/tgui_data(mob/user) if(!ntnet_global) return - var/list/data = host.initial_data() + var/list/data = get_header_data() data["ntnetstatus"] = ntnet_global.check_function() data["ntnetrelays"] = ntnet_global.relays.len @@ -30,73 +26,68 @@ data["config_communication"] = ntnet_global.setting_communication data["config_systemcontrol"] = ntnet_global.setting_systemcontrol - data["ntnetlogs"] = ntnet_global.logs - data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount + data["ntnetlogs"] = list() + data["minlogs"] = MIN_NTNET_LOGS + data["maxlogs"] = MAX_NTNET_LOGS data["banned_nids"] = list(ntnet_global.banned_nids) - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "ntnet_monitor.tmpl", "NTNet Diagnostics and Monitoring Tool", 575, 700, state = state) - if(host.update_layout()) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + for(var/i in ntnet_global.logs) + data["ntnetlogs"] += list(list("entry" = i)) + data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount -/datum/nano_module/computer_ntnetmonitor/Topic(href, href_list, state) - var/mob/user = usr + return data + +/datum/computer_file/program/ntnetmonitor/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) - return 1 - if(href_list["resetIDS"]) - if(ntnet_global) - ntnet_global.resetIDS() - return 1 - if(href_list["toggleIDS"]) - if(ntnet_global) - ntnet_global.toggleIDS() - return 1 - if(href_list["toggleWireless"]) - if(!ntnet_global) - return 1 + return + switch(action) + if("resetIDS") + if(ntnet_global) + ntnet_global.resetIDS() + return TRUE + if("toggleIDS") + if(ntnet_global) + ntnet_global.toggleIDS() + return TRUE + if("toggleWireless") + if(!ntnet_global) + return - // NTNet is disabled. Enabling can be done without user prompt - if(ntnet_global.setting_disabled) - ntnet_global.setting_disabled = 0 - return 1 + // NTNet is disabled. Enabling can be done without user prompt + if(ntnet_global.setting_disabled) + ntnet_global.setting_disabled = FALSE + return TRUE - // NTNet is enabled and user is about to shut it down. Let's ask them if they really want to do it, as wirelessly connected computers won't connect without NTNet being enabled (which may prevent people from turning it back on) - if(!user) - return 1 - var/response = alert(user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No") - if(response == "Yes") - ntnet_global.setting_disabled = 1 - return 1 - if(href_list["purgelogs"]) - if(ntnet_global) - ntnet_global.purge_logs() - return 1 - if(href_list["updatemaxlogs"]) - var/logcount = text2num(input(user,"Enter amount of logs to keep in memory ([MIN_NTNET_LOGS]-[MAX_NTNET_LOGS]):")) - if(ntnet_global) - ntnet_global.update_max_log_count(logcount) - return 1 - if(href_list["toggle_function"]) - if(!ntnet_global) - return 1 - ntnet_global.toggle_function(href_list["toggle_function"]) - return 1 - if(href_list["ban_nid"]) - if(!ntnet_global) - return 1 - var/nid = input(user,"Enter NID of device which you want to block from the network:", "Enter NID") as null|num - if(nid && CanUseTopic(user, state)) - ntnet_global.banned_nids |= nid - return 1 - if(href_list["unban_nid"]) - if(!ntnet_global) - return 1 - var/nid = input(user,"Enter NID of device which you want to unblock from the network:", "Enter NID") as null|num - if(nid && CanUseTopic(user, state)) - ntnet_global.banned_nids -= nid - return 1 + var/response = alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No") + if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) + ntnet_global.setting_disabled = TRUE + return TRUE + if("purgelogs") + if(ntnet_global) + ntnet_global.purge_logs() + return TRUE + if("updatemaxlogs") + var/logcount = params["new_number"] + if(ntnet_global) + ntnet_global.update_max_log_count(logcount) + return TRUE + if("toggle_function") + if(!ntnet_global) + return + ntnet_global.toggle_function(text2num(params["id"])) + return TRUE + if("ban_nid") + if(!ntnet_global) + return + var/nid = input(usr,"Enter NID of device which you want to block from the network:", "Enter NID") as null|num + if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE) + ntnet_global.banned_nids |= nid + return TRUE + if("unban_nid") + if(!ntnet_global) + return + var/nid = input(usr,"Enter NID of device which you want to unblock from the network:", "Enter NID") as null|num + if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE) + ntnet_global.banned_nids -= nid + return TRUE diff --git a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm index 597065d27b..9cac7c920c 100644 --- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm +++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm @@ -1,5 +1,7 @@ var/warrant_uid = 0 -/datum/datacore/var/list/warrants[] = list() +/datum/datacore + var/list/warrants = list() + /datum/data/record/warrant var/warrant_id @@ -7,7 +9,6 @@ var/warrant_uid = 0 ..() warrant_id = warrant_uid++ - /datum/computer_file/program/digitalwarrant filename = "digitalwarrant" filedesc = "Warrant Assistant" @@ -20,126 +21,119 @@ var/warrant_uid = 0 available_on_ntnet = 1 required_access = access_security usage_flags = PROGRAM_ALL - nanomodule_path = /datum/nano_module/program/digitalwarrant/ + tgui_id = "NtosDigitalWarrant" -/datum/nano_module/program/digitalwarrant/ - name = "Warrant Assistant" var/datum/data/record/warrant/activewarrant -/datum/nano_module/program/digitalwarrant/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - var/list/data = host.initial_data() +/datum/computer_file/program/digitalwarrant/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = get_header_data() + + data["warrantname"] = null + data["warrantcharges"] = null + data["warrantauth"] = null + data["type"] = null if(activewarrant) data["warrantname"] = activewarrant.fields["namewarrant"] data["warrantcharges"] = activewarrant.fields["charges"] data["warrantauth"] = activewarrant.fields["auth"] data["type"] = activewarrant.fields["arrestsearch"] - else - var/list/allwarrants = list() - for(var/datum/data/record/warrant/W in data_core.warrants) - allwarrants.Add(list(list( + + var/list/allwarrants = list() + for(var/datum/data/record/warrant/W in data_core.warrants) + allwarrants.Add(list(list( "warrantname" = W.fields["namewarrant"], "charges" = "[copytext(W.fields["charges"],1,min(length(W.fields["charges"]) + 1, 50))]...", "auth" = W.fields["auth"], "id" = W.warrant_id, "arrestsearch" = W.fields["arrestsearch"] ))) - data["allwarrants"] = allwarrants + data["allwarrants"] = allwarrants - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "digitalwarrant.tmpl", name, 500, 350, state = state) - ui.auto_update_layout = 1 - ui.set_initial_data(data) - ui.open() + return data -/datum/nano_module/program/digitalwarrant/Topic(href, href_list) +/datum/computer_file/program/digitalwarrant/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) - return 1 + return TRUE - if(href_list["sw_menu"]) - activewarrant = null + switch(action) + if("back") + . = TRUE + activewarrant = null - if(href_list["editwarrant"]) - . = 1 - for(var/datum/data/record/warrant/W in data_core.warrants) - if(W.warrant_id == text2num(href_list["editwarrant"])) - activewarrant = W - break + if("editwarrant") + . = TRUE + for(var/datum/data/record/warrant/W in data_core.warrants) + if(W.warrant_id == text2num(params["id"])) + activewarrant = W + break // The following actions will only be possible if the user has an ID with security access equipped. This is in line with modular computer framework's authentication methods, // which also use RFID scanning to allow or disallow access to some functions. Anyone can view warrants, editing requires ID. This also prevents situations where you show a tablet // to someone who is to be arrested, which allows them to change the stuff there. - - var/mob/user = usr - if(!istype(user)) - return - var/obj/item/weapon/card/id/I = user.GetIdCard() + var/obj/item/weapon/card/id/I = usr.GetIdCard() if(!istype(I) || !I.registered_name || !(access_security in I.access)) - to_chat(user, "Authentication error: Unable to locate ID with apropriate access to allow this operation.") + to_chat(usr, "Authentication error: Unable to locate ID with appropriate access to allow this operation.") return - if(href_list["addwarrant"]) - . = 1 - var/datum/data/record/warrant/W = new() - var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest")) - if(CanInteract(user, default_state)) - if(temp == "arrest") - W.fields["namewarrant"] = "Unknown" - W.fields["charges"] = "No charges present" - W.fields["auth"] = "Unauthorized" - W.fields["arrestsearch"] = "arrest" - if(temp == "search") - W.fields["namewarrant"] = "No suspect/location given" // VOREStation edit - W.fields["charges"] = "No reason given" - W.fields["auth"] = "Unauthorized" - W.fields["arrestsearch"] = "search" - activewarrant = W + switch(action) + if("addwarrant") + . = TRUE + var/datum/data/record/warrant/W = new() + var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest")) + if(tgui_status(usr, state) == STATUS_INTERACTIVE) + if(temp == "arrest") + W.fields["namewarrant"] = "Unknown" + W.fields["charges"] = "No charges present" + W.fields["auth"] = "Unauthorized" + W.fields["arrestsearch"] = "arrest" + if(temp == "search") + W.fields["namewarrant"] = "No suspect/location given" // VOREStation edit + W.fields["charges"] = "No reason given" + W.fields["auth"] = "Unauthorized" + W.fields["arrestsearch"] = "search" + activewarrant = W - if(href_list["savewarrant"]) - . = 1 - data_core.warrants |= activewarrant - activewarrant = null + if("savewarrant") + . = TRUE + data_core.warrants |= activewarrant + activewarrant = null - if(href_list["deletewarrant"]) - . = 1 - data_core.warrants -= activewarrant - activewarrant = null + if("deletewarrant") + . = TRUE + data_core.warrants -= activewarrant + activewarrant = null - if(href_list["editwarrantname"]) - . = 1 - var/namelist = list() - for(var/datum/data/record/t in data_core.general) - namelist += t.fields["name"] - var/new_name = sanitize(input(usr, "Please input name") as null|anything in namelist) - if(CanInteract(user, default_state)) - if (!new_name) - return - activewarrant.fields["namewarrant"] = new_name + if("editwarrantname") + . = TRUE + var/namelist = list() + for(var/datum/data/record/t in data_core.general) + namelist += t.fields["name"] + var/new_name = sanitize(input(usr, "Please input name") as null|anything in namelist) + if(tgui_status(usr, state) == STATUS_INTERACTIVE) + if (!new_name) + return + activewarrant.fields["namewarrant"] = new_name - if(href_list["editwarrantnamecustom"]) - . = 1 - var/new_name = sanitize(input("Please input name") as null|text) - if(CanInteract(user, default_state)) - if (!new_name) - return - activewarrant.fields["namewarrant"] = new_name + if("editwarrantnamecustom") + . = TRUE + var/new_name = sanitize(input("Please input name") as null|text) + if(tgui_status(usr, state) == STATUS_INTERACTIVE) + if (!new_name) + return + activewarrant.fields["namewarrant"] = new_name - if(href_list["editwarrantcharges"]) - . = 1 - var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.fields["charges"]) as null|text) - if(CanInteract(user, default_state)) - if (!new_charges) - return - activewarrant.fields["charges"] = new_charges + if("editwarrantcharges") + . = TRUE + var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.fields["charges"]) as null|text) + if(tgui_status(usr, state) == STATUS_INTERACTIVE) + if (!new_charges) + return + activewarrant.fields["charges"] = new_charges - if(href_list["editwarrantauth"]) - . = 1 - if(!(access_hos in I.access)) // VOREStation edit begin - to_chat(user, "You don't have the access to do this!") - return // VOREStation edit end - activewarrant.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]" - - if(href_list["back"]) - . = 1 - activewarrant = null + if("editwarrantauth") + . = TRUE + if(!(access_hos in I.access)) // VOREStation edit begin + to_chat(usr, "You don't have the access to do this!") + return // VOREStation edit end + activewarrant.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]" diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index ab60291f55..0f67e3b604 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -6,8 +6,8 @@ icon = 'icons/obj/vending.dmi' icon_state = "robotics" layer = OBJ_LAYER - 0.1 - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE // The actual laptop/tablet var/obj/item/modular_computer/laptop/fabricated_laptop = null @@ -160,70 +160,77 @@ return total_price return 0 - - - - -/obj/machinery/lapvend/Topic(href, href_list) +/obj/machinery/lapvend/tgui_act(action, params) if(..()) - return 1 + return TRUE - if(href_list["pick_device"]) - if(state) // We've already picked a device type - return 0 - devtype = text2num(href_list["pick_device"]) - state = 1 - fabricate_and_recalc_price(0) - return 1 - if(href_list["clean_order"]) - reset_order() - return 1 + switch(action) + if("pick_device") + if(state) // We've already picked a device type + return FALSE + devtype = text2num(params["pick"]) + state = 1 + fabricate_and_recalc_price(FALSE) + return TRUE + if("clean_order") + reset_order() + return TRUE if((state != 1) && devtype) // Following IFs should only be usable when in the Select Loadout mode - return 0 - if(href_list["confirm_order"]) - state = 2 // Wait for ID swipe for payment processing - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_cpu"]) - dev_cpu = text2num(href_list["hw_cpu"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_battery"]) - dev_battery = text2num(href_list["hw_battery"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_disk"]) - dev_disk = text2num(href_list["hw_disk"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_netcard"]) - dev_netcard = text2num(href_list["hw_netcard"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_tesla"]) - dev_tesla = text2num(href_list["hw_tesla"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_nanoprint"]) - dev_nanoprint = text2num(href_list["hw_nanoprint"]) - fabricate_and_recalc_price(0) - return 1 - if(href_list["hw_card"]) - dev_card = text2num(href_list["hw_card"]) - fabricate_and_recalc_price(0) - return 1 - return 0 + return FALSE + switch(action) + if("confirm_order") + state = 2 // Wait for ID swipe for payment processing + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_cpu") + dev_cpu = text2num(params["cpu"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_battery") + dev_battery = text2num(params["battery"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_disk") + dev_disk = text2num(params["disk"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_netcard") + dev_netcard = text2num(params["netcard"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_tesla") + dev_tesla = text2num(params["tesla"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_nanoprint") + dev_nanoprint = text2num(params["print"]) + fabricate_and_recalc_price(FALSE) + return TRUE + if("hw_card") + dev_card = text2num(params["card"]) + fabricate_and_recalc_price(FALSE) + return TRUE + return FALSE + + /obj/machinery/lapvend/attack_hand(var/mob/user) - ui_interact(user) + tgui_interact(user) -/obj/machinery/lapvend/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/lapvend/tgui_interact(mob/user, datum/tgui/ui) if(stat & (BROKEN | NOPOWER | MAINT)) if(ui) ui.close() - return 0 + return FALSE + + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "ComputerFabricator") + ui.open() + +/obj/machinery/lapvend/tgui_data(mob/user) + var/list/data = list() - var/list/data[0] data["state"] = state if(state == 1) data["devtype"] = devtype @@ -237,13 +244,7 @@ if(state == 1 || state == 2) data["totalprice"] = total_price - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "computer_fabricator.tmpl", "Personal Computer Vendor", 500, 400) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - + return data obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) var/obj/item/weapon/card/id/I = W.GetID() @@ -272,7 +273,6 @@ obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) return 0 return ..() - // Simplified payment processing, returns 1 on success. /obj/machinery/lapvend/proc/process_payment(var/obj/item/weapon/card/id/I, var/obj/item/ID_container) if(I==ID_container || ID_container == null) @@ -305,4 +305,4 @@ obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) T.date = current_date_string T.time = stationtime2text() customer_account.transaction_log.Add(T) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/nano/modules/nano_module.dm b/code/modules/nano/modules/nano_module.dm index 75c38c9ed3..87199e79dc 100644 --- a/code/modules/nano/modules/nano_module.dm +++ b/code/modules/nano/modules/nano_module.dm @@ -1,13 +1,11 @@ /datum/nano_module var/name var/datum/host - var/datum/topic_manager/topic_manager var/list/using_access -/datum/nano_module/New(var/datum/host, var/topic_manager) +/datum/nano_module/New(var/datum/host) ..() src.host = host.nano_host() - src.topic_manager = topic_manager /datum/nano_module/nano_host() return host ? host : src @@ -40,11 +38,6 @@ return 0 -/datum/nano_module/Topic(href, href_list) - if(topic_manager && topic_manager.Topic(href, href_list)) - return TRUE - . = ..() - /datum/nano_module/proc/print_text(var/text, var/mob/user) var/obj/item/modular_computer/MC = nano_host() if(istype(MC)) diff --git a/code/modules/tgui/modules/_base.dm b/code/modules/tgui/modules/_base.dm index 1a1027072d..7cece1c097 100644 --- a/code/modules/tgui/modules/_base.dm +++ b/code/modules/tgui/modules/_base.dm @@ -123,4 +123,7 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff . += new /obj/screen/plane_master{plane = PLANE_CH_BACKUP} //Backup implant status . += new /obj/screen/plane_master{plane = PLANE_CH_VANTAG} //Vore Antags . += new /obj/screen/plane_master{plane = PLANE_AUGMENTED} //Augmented reality - //VOREStation Add End \ No newline at end of file + //VOREStation Add End + +/datum/tgui_module/proc/relaymove(mob/user, direction) + return FALSE diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm new file mode 100644 index 0000000000..1af2a003cc --- /dev/null +++ b/code/modules/tgui/modules/communications.dm @@ -0,0 +1,486 @@ +#define COMM_SCREEN_MAIN 1 +#define COMM_SCREEN_STAT 2 +#define COMM_SCREEN_MESSAGES 3 + +#define COMM_AUTHENTICATION_NONE 0 +#define COMM_AUTHENTICATION_MIN 1 +#define COMM_AUTHENTICATION_MAX 2 + +#define COMM_MSGLEN_MINIMUM 6 +#define COMM_CCMSGLEN_MINIMUM 20 + +/datum/tgui_module/communications + name = "Command & Communications" + tgui_id = "CommunicationsConsole" + + var/emagged = FALSE + + var/current_viewing_message_id = 0 + var/current_viewing_message = null + + var/authenticated = COMM_AUTHENTICATION_NONE + var/menu_state = COMM_SCREEN_MAIN + var/ai_menu_state = COMM_SCREEN_MAIN + var/aicurrmsg + + var/message_cooldown + var/centcomm_message_cooldown + var/tmp_alertlevel = 0 + + var/stat_msg1 + var/stat_msg2 + var/display_type = "blank" + + var/datum/announcement/priority/crew_announcement + + var/datum/lore/atc_controller/ATC + + var/list/req_access = list() + +/datum/tgui_module/communications/New(host) + . = ..() + ATC = atc + crew_announcement = new() + crew_announcement.newscast = TRUE + +/datum/tgui_module/communications/tgui_interact(mob/user, datum/tgui/ui) + if(using_map && !(get_z(user) in using_map.contact_levels)) + to_chat(user, "Unable to establish a connection: You're too far away from the station!") + return FALSE + . = ..() + +/datum/tgui_module/communications/proc/is_authenticated(mob/user, message = TRUE) + if(authenticated == COMM_AUTHENTICATION_MAX) + return COMM_AUTHENTICATION_MAX + else if(isobserver(user)) + var/mob/observer/dead/D = user + if(D.can_admin_interact()) + return COMM_AUTHENTICATION_MAX + else if(authenticated) + return COMM_AUTHENTICATION_MIN + else + if(message) + to_chat(user, "Access denied.") + return COMM_AUTHENTICATION_NONE + +/datum/tgui_module/communications/proc/change_security_level(new_level) + tmp_alertlevel = new_level + var/old_level = security_level + if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this + set_security_level(tmp_alertlevel) + if(security_level != old_level) + //Only notify the admins if an actual change happened + log_game("[key_name(usr)] has changed the security level to [get_security_level()].") + message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].") + switch(security_level) + if(SEC_LEVEL_GREEN) + feedback_inc("alert_comms_green",1) + if(SEC_LEVEL_YELLOW) + feedback_inc("alert_comms_yellow",1) + if(SEC_LEVEL_VIOLET) + feedback_inc("alert_comms_violet",1) + if(SEC_LEVEL_ORANGE) + feedback_inc("alert_comms_orange",1) + if(SEC_LEVEL_BLUE) + feedback_inc("alert_comms_blue",1) + tmp_alertlevel = 0 + +/datum/tgui_module/communications/tgui_data(mob/user) + var/list/data = ..() + data["is_ai"] = isAI(user) || isrobot(user) + data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state + data["emagged"] = emagged + data["authenticated"] = is_authenticated(user, 0) + data["authmax"] = data["authenticated"] == COMM_AUTHENTICATION_MAX ? TRUE : FALSE + data["atcsquelch"] = ATC.squelched + data["boss_short"] = using_map.boss_short + + data["stat_display"] = list( + "type" = display_type, + // "icon" = display_icon, + "line_1" = (stat_msg1 ? stat_msg1 : "-----"), + "line_2" = (stat_msg2 ? stat_msg2 : "-----"), + + "presets" = list( + list("name" = "blank", "label" = "Clear", "desc" = "Blank slate"), + list("name" = "shuttle", "label" = "Shuttle ETA", "desc" = "Display how much time is left."), + list("name" = "message", "label" = "Message", "desc" = "A custom message.") + ), + ) + + data["security_level"] = security_level + switch(security_level) + if(SEC_LEVEL_BLUE) + data["security_level_color"] = "blue"; + if(SEC_LEVEL_ORANGE) + data["security_level_color"] = "orange"; + if(SEC_LEVEL_VIOLET) + data["security_level_color"] = "violet"; + if(SEC_LEVEL_YELLOW) + data["security_level_color"] = "yellow"; + if(SEC_LEVEL_GREEN) + data["security_level_color"] = "green"; + if(SEC_LEVEL_RED) + data["security_level_color"] = "red"; + else + data["security_level_color"] = "purple"; + data["str_security_level"] = capitalize(get_security_level()) + data["levels"] = list( + list("id" = SEC_LEVEL_GREEN, "name" = "Green", "icon" = "dove"), + list("id" = SEC_LEVEL_YELLOW, "name" = "Yellow", "icon" = "exclamation-triangle"), + list("id" = SEC_LEVEL_BLUE, "name" = "Blue", "icon" = "eye"), + list("id" = SEC_LEVEL_ORANGE, "name" = "Orange", "icon" = "wrench"), + list("id" = SEC_LEVEL_VIOLET, "name" = "Violet", "icon" = "biohazard"), + ) + + var/datum/comm_message_listener/l = obtain_message_listener() + data["messages"] = l.messages + data["message_deletion_allowed"] = l != global_message_listener + data["message_current_id"] = current_viewing_message_id + data["message_current"] = current_viewing_message + + // data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null + data["msg_cooldown"] = message_cooldown ? (round((message_cooldown - world.time) / 10)) : 0 + data["cc_cooldown"] = centcomm_message_cooldown ? (round((centcomm_message_cooldown - world.time) / 10)) : 0 + + data["esc_callable"] = emergency_shuttle.location() && !emergency_shuttle.online() ? TRUE : FALSE + data["esc_recallable"] = emergency_shuttle.location() && emergency_shuttle.online() ? TRUE : FALSE + data["esc_status"] = FALSE + if(emergency_shuttle.has_eta()) + var/timeleft = emergency_shuttle.estimate_arrival_time() + data["esc_status"] = emergency_shuttle.online() ? "ETA:" : "RECALLING:" + data["esc_status"] += " [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]" + return data + +/datum/tgui_module/communications/proc/setCurrentMessage(mob/user, value) + current_viewing_message_id = value + + var/datum/comm_message_listener/l = obtain_message_listener() + for(var/list/m in l.messages) + if(m["id"] == current_viewing_message_id) + current_viewing_message = m + +/datum/tgui_module/communications/proc/setMenuState(mob/user, value) + if(isAI(user) || isrobot(user)) + ai_menu_state = value + else + menu_state = value + +/datum/tgui_module/communications/proc/obtain_message_listener() + if(istype(host, /datum/computer_file/program/comm)) + var/datum/computer_file/program/comm/P = host + return P.message_core + return global_message_listener + +/proc/post_status(atom/source, command, data1, data2, mob/user = null) + var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) + + if(!frequency) + return + + var/datum/signal/status_signal = new + status_signal.source = source + status_signal.transmission_method = TRANSMISSION_RADIO + status_signal.data["command"] = command + + switch(command) + if("message") + status_signal.data["msg1"] = data1 + status_signal.data["msg2"] = data2 + log_admin("STATUS: [user] set status screen message: [data1] [data2]") + //message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]") + if("alert") + status_signal.data["picture_state"] = data1 + + frequency.post_signal(null, status_signal) + +/datum/tgui_module/communications/tgui_act(action, params) + if(..()) + return TRUE + if(using_map && !(get_z(usr) in using_map.contact_levels)) + to_chat(usr, "Unable to establish a connection: You're too far away from the station!") + return FALSE + + . = TRUE + if(action == "auth") + if(!ishuman(usr)) + to_chat(usr, "Access denied.") + return FALSE + // Logout function. + if(authenticated != COMM_AUTHENTICATION_NONE) + authenticated = COMM_AUTHENTICATION_NONE + crew_announcement.announcer = null + setMenuState(usr, COMM_SCREEN_MAIN) + return + // Login function. + if(check_access(usr, access_heads)) + authenticated = COMM_AUTHENTICATION_MIN + if(check_access(usr, access_captain)) + authenticated = COMM_AUTHENTICATION_MAX + var/mob/M = usr + var/obj/item/weapon/card/id = M.GetIdCard() + if(istype(id)) + crew_announcement.announcer = GetNameAndAssignmentFromId(id) + if(authenticated == COMM_AUTHENTICATION_NONE) + to_chat(usr, "You need to wear your ID.") + + // All functions below this point require authentication. + if(!is_authenticated(usr)) + return FALSE + + switch(action) + // main interface + if("main") + setMenuState(usr, COMM_SCREEN_MAIN) + + if("newalertlevel") + if(isAI(usr) || isrobot(usr)) + to_chat(usr, "Firewalls prevent you from changing the alert level.") + return + else if(isobserver(usr)) + var/mob/observer/dead/D = usr + if(D.can_admin_interact()) + change_security_level(text2num(params["level"])) + return TRUE + else if(!ishuman(usr)) + to_chat(usr, "Security measures prevent you from changing the alert level.") + return + + if(check_access(usr, access_captain)) + change_security_level(text2num(params["level"])) + else + to_chat(usr, "You are not authorized to do this.") + setMenuState(usr, COMM_SCREEN_MAIN) + + if("announce") + if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) + if(message_cooldown > world.time) + to_chat(usr, "Please allow at least one minute to pass between announcements.") + return + var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|message + if(!input || message_cooldown > world.time || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + return + if(length(input) < COMM_MSGLEN_MINIMUM) + to_chat(usr, "Message '[input]' is too short. [COMM_MSGLEN_MINIMUM] character minimum.") + return + crew_announcement.Announce(input) + message_cooldown = world.time + 600 //One minute + + if("callshuttle") + if(!is_authenticated(usr)) + return + + call_shuttle_proc(usr) + if(emergency_shuttle.online()) + post_status(src, "shuttle", user = usr) + setMenuState(usr, COMM_SCREEN_MAIN) + + if("cancelshuttle") + if(isAI(usr) || isrobot(usr)) + to_chat(usr, "Firewalls prevent you from recalling the shuttle.") + return + var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") + if(response == "Yes") + cancel_call_proc(usr) + setMenuState(usr, COMM_SCREEN_MAIN) + + if("messagelist") + current_viewing_message = null + current_viewing_message_id = null + if(params["msgid"]) + setCurrentMessage(usr, text2num(params["msgid"])) + setMenuState(usr, COMM_SCREEN_MESSAGES) + + if("toggleatc") + ATC.squelched = !ATC.squelched + + if("delmessage") + var/datum/comm_message_listener/l = obtain_message_listener() + if(params["msgid"]) + setCurrentMessage(usr, text2num(params["msgid"])) + var/response = alert("Are you sure you wish to delete this message?", "Confirm", "Yes", "No") + if(response == "Yes") + if(current_viewing_message) + if(l != global_message_listener) + l.Remove(current_viewing_message) + current_viewing_message = null + setMenuState(usr, COMM_SCREEN_MESSAGES) + + if("status") + setMenuState(usr, COMM_SCREEN_STAT) + + // Status display stuff + if("setstat") + display_type = params["statdisp"] + switch(display_type) + if("message") + post_status(src, "message", stat_msg1, stat_msg2, user = usr) + if("alert") + post_status(src, "alert", params["alert"], user = usr) + else + post_status(src, params["statdisp"], user = usr) + + if("setmsg1") + stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40) + setMenuState(usr, COMM_SCREEN_STAT) + + if("setmsg2") + stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40) + setMenuState(usr, COMM_SCREEN_STAT) + + // OMG CENTCOMM LETTERHEAD + if("MessageCentCom") + if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) + if(centcomm_message_cooldown > world.time) + to_chat(usr, "Arrays recycling. Please stand by.") + return + var/input = sanitize(input("Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \ + Please be aware that this process is very expensive, and abuse will lead to... termination. \ + Transmission does not guarantee a response. \ + There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging") as null|message) + if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + return + if(length(input) < COMM_CCMSGLEN_MINIMUM) + to_chat(usr, "Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.") + return + CentCom_announce(input, usr) + to_chat(usr, "Message transmitted.") + log_game("[key_name(usr)] has made an IA [using_map.boss_short] announcement: [input]") + centcomm_message_cooldown = world.time + 300 // 30 seconds + setMenuState(usr, COMM_SCREEN_MAIN) + + // OMG SYNDICATE ...LETTERHEAD + if("MessageSyndicate") + if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (emagged)) + if(centcomm_message_cooldown > world.time) + to_chat(usr, "Arrays recycling. Please stand by.") + return + var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) + if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) + return + if(length(input) < COMM_CCMSGLEN_MINIMUM) + to_chat(usr, "Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.") + return + Syndicate_announce(input, usr) + to_chat(usr, "Message transmitted.") + log_game("[key_name(usr)] has made an illegal announcement: [input]") + centcomm_message_cooldown = world.time + 300 // 30 seconds + + if("RestoreBackup") + to_chat(usr, "Backup routing data restored!") + emagged = FALSE + setMenuState(usr, COMM_SCREEN_MAIN) + +/datum/tgui_module/communications/ntos + ntos = TRUE + +/* Etc global procs */ +/proc/enable_prison_shuttle(var/mob/user) + for(var/obj/machinery/computer/prison_shuttle/PS in machines) + PS.allowedtocall = !(PS.allowedtocall) + +/proc/call_shuttle_proc(var/mob/user) + if ((!( ticker ) || !emergency_shuttle.location())) + return + + if(!universe.OnShuttleCall(usr)) + to_chat(user, "Cannot establish a bluespace connection.") + return + + if(deathsquad.deployed) + to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.") + return + + if(emergency_shuttle.deny_shuttle) + to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.") + return + + if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE + to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.") + return + + if(emergency_shuttle.going_to_centcom()) + to_chat(user, "The emergency shuttle may not be called while returning to [using_map.boss_short].") + return + + if(emergency_shuttle.online()) + to_chat(user, "The emergency shuttle is already on its way.") + return + + if(ticker.mode.name == "blob") + to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") + return + + emergency_shuttle.call_evac() + log_game("[key_name(user)] has called the shuttle.") + message_admins("[key_name_admin(user)] has called the shuttle.", 1) + admin_chat_message(message = "Emergency evac beginning! Called by [key_name(user)]!", color = "#CC2222") //VOREStation Add + + return + +/proc/init_shift_change(var/mob/user, var/force = 0) + if ((!( ticker ) || !emergency_shuttle.location())) + return + + if(emergency_shuttle.going_to_centcom()) + to_chat(user, "The shuttle may not be called while returning to [using_map.boss_short].") + return + + if(emergency_shuttle.online()) + to_chat(user, "The shuttle is already on its way.") + return + + // if force is 0, some things may stop the shuttle call + if(!force) + if(emergency_shuttle.deny_shuttle) + to_chat(user, "[using_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.") + return + + if(deathsquad.deployed == 1) + to_chat(user, "[using_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.") + return + + if(world.time < 54000) // 30 minute grace period to let the game get going + to_chat(user, "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again.") + return + + if(ticker.mode.auto_recall_shuttle) + //New version pretends to call the shuttle but cause the shuttle to return after a random duration. + emergency_shuttle.auto_recall = 1 + + if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic") + to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") + return + + emergency_shuttle.call_transfer() + + //delay events in case of an autotransfer + if (isnull(user)) + SSevents.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes + SSevents.delay_events(EVENT_LEVEL_MAJOR, 9000) + + log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.") + message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1) + admin_chat_message(message = "Autotransfer shuttle dispatched, shift ending soon.", color = "#2277BB") //VOREStation Add + + return + +/proc/cancel_call_proc(var/mob/user) + if (!( ticker ) || !emergency_shuttle.can_recall()) + return + if((ticker.mode.name == "blob")||(ticker.mode.name == "Meteor")) + return + + if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to CentCom + emergency_shuttle.recall() + log_game("[key_name(user)] has recalled the shuttle.") + message_admins("[key_name_admin(user)] has recalled the shuttle.", 1) + return + +/proc/is_relay_online() + for(var/obj/machinery/telecomms/relay/M in world) + if(M.stat == 0) + return 1 + return 0 diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm new file mode 100644 index 0000000000..c5aecd8808 --- /dev/null +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -0,0 +1,235 @@ +// This really should be used for both regular ID computers and NTOS, but +// the data structures are just different enough right now that I can't be assed +/datum/tgui_module/cardmod + name = "ID card modification program" + ntos = TRUE + tgui_id = "IdentificationComputer" + var/mod_mode = 1 + var/is_centcom = 0 + +/datum/tgui_module/cardmod/tgui_static_data(mob/user) + var/list/data = ..() + if(data_core) + data_core.get_manifest_list() + data["manifest"] = PDA_Manifest + return data + +/datum/tgui_module/cardmod/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/datum/computer_file/program/card_mod/program = host + if(!istype(program)) + return 0 + var/list/data = ..() + data["station_name"] = station_name() + data["mode"] = mod_mode + data["printing"] = FALSE + if(program && program.computer) + data["have_id_slot"] = !!program.computer.card_slot + data["have_printer"] = !!program.computer.nano_printer + data["authenticated"] = program.can_run(user) + if(!program.computer.card_slot) + mod_mode = 0 //We can't modify IDs when there is no card reader + else + data["have_id_slot"] = 0 + data["have_printer"] = 0 + data["authenticated"] = 0 + data["centcom_access"] = is_centcom + + + data["has_modify"] = null + data["account_number"] = null + data["id_rank"] = null + data["target_owner"] = null + data["target_name"] = null + if(program && program.computer && program.computer.card_slot) + var/obj/item/weapon/card/id/id_card = program.computer.card_slot.stored_card + data["has_modify"] = !!id_card + data["account_number"] = id_card ? id_card.associated_account_number : null + data["id_rank"] = id_card && id_card.assignment ? id_card.assignment : "Unassigned" + data["target_owner"] = id_card && id_card.registered_name ? id_card.registered_name : "-----" + data["target_name"] = id_card ? id_card.name : "-----" + + var/list/departments = list() + for(var/D in SSjob.get_all_department_datums()) + var/datum/department/dept = D + if(!dept.assignable) // No AI ID cards for you. + continue + if(dept.centcom_only && !is_centcom) + continue + departments.Add(list(list( + "department_name" = dept.name, + "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)), + ))) + + data["departments"] = departments + + var/list/all_centcom_access = list() + var/list/regions = list() + if(program.computer.card_slot && program.computer.card_slot.stored_card) + var/obj/item/weapon/card/id/id_card = program.computer.card_slot.stored_card + if(is_centcom) + for(var/access in get_all_centcom_access()) + all_centcom_access.Add(list(list( + "desc" = replacetext(get_centcom_access_desc(access), " ", " "), + "ref" = access, + "allowed" = (access in id_card.access) ? 1 : 0))) + data["all_centcom_access"] = all_centcom_access + else + for(var/i in ACCESS_REGION_SECURITY to ACCESS_REGION_SUPPLY) + var/list/accesses = list() + for(var/access in get_region_accesses(i)) + if(get_access_desc(access)) + accesses.Add(list(list( + "desc" = replacetext(get_access_desc(access), " ", " "), + "ref" = access, + "allowed" = (access in id_card.access) ? 1 : 0))) + + regions.Add(list(list( + "name" = get_region_accesses_name(i), + "accesses" = accesses))) + data["regions"] = regions + + data["regions"] = regions + data["all_centcom_access"] = all_centcom_access + + return data + +/datum/tgui_module/cardmod/proc/format_jobs(list/jobs) + var/datum/computer_file/program/card_mod/program = host + if(!istype(program)) + return null + + var/obj/item/weapon/card/id/id_card = program.computer.card_slot ? program.computer.card_slot.stored_card : null + var/list/formatted = list() + for(var/job in jobs) + formatted.Add(list(list( + "display_name" = replacetext(job, " ", " "), + "target_rank" = id_card && id_card.assignment ? id_card.assignment : "Unassigned", + "job" = job))) + + return formatted + +/datum/tgui_module/cardmod/tgui_act(action, list/params, datum/tgui/ui) + if(..()) + return TRUE + + + var/datum/computer_file/program/card_mod/program = host + if(!istype(program)) + return TRUE + var/obj/item/modular_computer/computer = tgui_host() + if(!istype(computer)) + return TRUE + + var/obj/item/weapon/card/id/user_id_card = usr.GetIdCard() + var/obj/item/weapon/card/id/id_card + if(computer.card_slot) + id_card = computer.card_slot.stored_card + + switch(action) + if("mode") + mod_mode = clamp(text2num(params["mode_target"]), 0, 1) + . = TRUE + if("print") + if(computer && computer.nano_printer) //This option should never be called if there is no printer + if(!mod_mode) + if(program.can_run(usr, 1)) + var/contents = {"

Access Report

+ Prepared By: [user_id_card.registered_name ? user_id_card.registered_name : "Unknown"]
+ For: [id_card.registered_name ? id_card.registered_name : "Unregistered"]
+
+ Assignment: [id_card.assignment]
+ Account Number: #[id_card.associated_account_number]
+ Blood Type: [id_card.blood_type]

+ Access:
+ "} + + var/known_access_rights = get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM) + for(var/A in id_card.access) + if(A in known_access_rights) + contents += " [get_access_desc(A)]" + + if(!computer.nano_printer.print_text(contents,"access report")) + to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") + return + else + computer.visible_message("\The [computer] prints out paper.") + else + var/contents = {"

Crew Manifest

+
+ [data_core ? data_core.get_manifest(0) : ""] + "} + if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", stationtime2text()))) + to_chat(usr, "Hardware error: Printer was unable to print the file. It may be out of paper.") + return + else + computer.visible_message("\The [computer] prints out paper.") + . = TRUE + if("modify") + if(computer && computer.card_slot) + if(id_card) + data_core.manifest_modify(id_card.registered_name, id_card.assignment) + computer.proc_eject_id(usr) + . = TRUE + if("terminate") + if(computer && program.can_run(usr, 1)) + id_card.assignment = "Dismissed" //VOREStation Edit: setting adjustment + id_card.access = list() + callHook("terminate_employee", list(id_card)) + . = TRUE + if("reg") + if(computer && program.can_run(usr, 1)) + var/temp_name = sanitizeName(params["reg"], allow_numbers = TRUE) + if(temp_name) + id_card.registered_name = temp_name + else + computer.visible_message("[computer] buzzes rudely.") + . = TRUE + if("account") + if(computer && program.can_run(usr, 1)) + var/account_num = text2num(params["account"]) + id_card.associated_account_number = account_num + . = TRUE + if("assign") + if(computer && program.can_run(usr, 1) && id_card) + var/t1 = params["assign_target"] + if(t1 == "Custom") + var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment", id_card.assignment), 45) + //let custom jobs function as an impromptu alt title, mainly for sechuds + if(temp_t) + id_card.assignment = temp_t + else + var/list/access = list() + if(is_centcom) + access = get_centcom_access(t1) + else + var/datum/job/jobdatum + for(var/jobtype in typesof(/datum/job)) + var/datum/job/J = new jobtype + if(ckey(J.title) == ckey(t1)) + jobdatum = J + break + if(!jobdatum) + to_chat(usr, "No log exists for this job: [t1]") + return + + access = jobdatum.get_access() + + id_card.access = access + id_card.assignment = t1 + id_card.rank = t1 + + callHook("reassign_employee", list(id_card)) + . = TRUE + if("access") + if(computer && program.can_run(usr, 1)) + var/access_type = text2num(params["access_target"]) + var/access_allowed = text2num(params["allowed"]) + if(access_type in get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)) + id_card.access -= access_type + if(!access_allowed) + id_card.access += access_type + . = TRUE + + if(id_card) + id_card.name = text("[id_card.registered_name]'s ID Card ([id_card.assignment])") + diff --git a/code/modules/tgui/modules/ntos-only/configurator.dm b/code/modules/tgui/modules/ntos-only/configurator.dm new file mode 100644 index 0000000000..263409f5e3 --- /dev/null +++ b/code/modules/tgui/modules/ntos-only/configurator.dm @@ -0,0 +1,48 @@ +/datum/tgui_module/computer_configurator + name = "NTOS Computer Configuration Tool" + ntos = TRUE + tgui_id = "Configuration" + var/obj/item/modular_computer/movable = null + +/datum/tgui_module/computer_configurator/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + movable = tgui_host() + // No computer connection, we can't get data from that. + if(!istype(movable)) + return 0 + + var/list/data = ..() + + data["disk_size"] = movable.hard_drive.max_capacity + data["disk_used"] = movable.hard_drive.used_capacity + data["power_usage"] = movable.last_power_usage + data["battery_exists"] = movable.battery_module ? 1 : 0 + if(movable.battery_module) + data["battery_rating"] = movable.battery_module.battery.maxcharge + data["battery_percent"] = round(movable.battery_module.battery.percent()) + + if(movable.battery_module && movable.battery_module.battery) + data["battery"] = list("max" = movable.battery_module.battery.maxcharge, "charge" = round(movable.battery_module.battery.charge)) + + var/list/hardware = movable.get_all_components() + var/list/all_entries[0] + for(var/obj/item/weapon/computer_hardware/H in hardware) + all_entries.Add(list(list( + "name" = H.name, + "desc" = H.desc, + "enabled" = H.enabled, + "critical" = H.critical, + "powerusage" = H.power_usage + ))) + + data["hardware"] = all_entries + return data + +/datum/tgui_module/computer_configurator/tgui_act(action, params) + if(..()) + return + switch(action) + if("PC_toggle_component") + var/obj/item/weapon/computer_hardware/H = movable.find_hardware_by_name(params["name"]) + if(H && istype(H)) + H.enabled = !H.enabled + . = TRUE \ No newline at end of file diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm new file mode 100644 index 0000000000..8d8d1fbbc7 --- /dev/null +++ b/code/modules/tgui/modules/ntos-only/email.dm @@ -0,0 +1,476 @@ +/datum/tgui_module/email_client + name = "Email Client" + tgui_id = "NtosEmailClient" + + var/stored_login = "" + var/stored_password = "" + var/error = "" + + var/msg_title = "" + var/msg_body = "" + var/msg_recipient = "" + var/datum/computer_file/msg_attachment = null + var/folder = "Inbox" + var/addressbook = FALSE + var/new_message = FALSE + + var/last_message_count = 0 // How many messages were there during last check. + var/read_message_count = 0 // How many messages were there when user has last accessed the UI. + + var/datum/computer_file/downloading = null + var/download_progress = 0 + var/download_speed = 0 + + var/datum/computer_file/data/email_account/current_account = null + var/datum/computer_file/data/email_message/current_message = null + +/datum/tgui_module/email_client/proc/log_in() + for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + if(!account.can_login) + continue + if(account.login == stored_login) + if(account.password == stored_password) + if(account.suspended) + error = "This account has been suspended. Please contact the system administrator for assistance." + return 0 + current_account = account + return 1 + else + error = "Invalid Password" + return 0 + error = "Invalid Login" + return 0 + +// Returns 0 if no new messages were received, 1 if there is an unread message but notification has already been sent. +// and 2 if there is a new message that appeared in this tick (and therefore notification should be sent by the program). +/datum/tgui_module/email_client/proc/check_for_new_messages(var/messages_read = FALSE) + if(!current_account) + return 0 + + var/list/allmails = current_account.all_emails() + + if(allmails.len > last_message_count) + . = 2 + else if(allmails.len > read_message_count) + . = 1 + else + . = 0 + + last_message_count = allmails.len + if(messages_read) + read_message_count = allmails.len + +/datum/tgui_module/email_client/proc/log_out() + current_account = null + downloading = null + download_progress = 0 + last_message_count = 0 + read_message_count = 0 + +/datum/tgui_module/email_client/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = ..() + + // Password has been changed by other client connected to this email account + if(current_account) + if(current_account.password != stored_password) + log_out() + error = "Invalid Password" + // Banned. + if(current_account.suspended) + log_out() + error = "This account has been suspended. Please contact the system administrator for assistance." + + // So, TGUI has a bug/feature where it just conveniently doesn't bother to clear out old data if it only gets + // a partial data update; as such, we have to make sure to null all of these out ourselves so the UI works properly. + data["accounts"] = null + data["addressbook"] = null + data["cur_attachment_filename"] = null + data["cur_attachment_size"] = null + data["cur_body"] = null + data["cur_hasattachment"] = null + data["cur_source"] = null + data["cur_timestamp"] = null + data["cur_title"] = null + data["cur_uid"] = null + data["current_account"] = null + data["down_filename"] = null + data["down_progress"] = null + data["down_size"] = null + data["down_speed"] = null + data["downloading"] = null + data["error"] = null + data["folder"] = null + data["label_deleted"] = null + data["label_inbox"] = null + data["label_spam"] = null + data["messagecount"] = null + data["messages"] = null + data["msg_attachment_filename"] = null + data["msg_attachment_size"] = null + data["msg_body"] = null + data["msg_hasattachment"] = null + data["msg_recipient"] = null + data["msg_title"] = null + data["new_message"] = null + data["stored_login"] = null + data["stored_password"] = null + + if(error) + data["error"] = error + else if(downloading) + data["downloading"] = 1 + data["down_filename"] = "[downloading.filename].[downloading.filetype]" + data["down_progress"] = download_progress + data["down_size"] = downloading.size + data["down_speed"] = download_speed + + else if(istype(current_account)) + data["current_account"] = current_account.login + if(addressbook) + var/list/all_accounts = list() + for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts) + if(!account.can_login) + continue + all_accounts.Add(list(list( + "login" = account.login + ))) + data["addressbook"] = 1 + data["accounts"] = all_accounts + else if(new_message) + data["new_message"] = 1 + data["msg_title"] = msg_title + data["msg_body"] = pencode2html(msg_body) + data["msg_recipient"] = msg_recipient + if(msg_attachment) + data["msg_hasattachment"] = 1 + data["msg_attachment_filename"] = "[msg_attachment.filename].[msg_attachment.filetype]" + data["msg_attachment_size"] = msg_attachment.size + else if (current_message) + data["cur_title"] = current_message.title + data["cur_body"] = pencode2html(current_message.stored_data) + data["cur_timestamp"] = current_message.timestamp + data["cur_source"] = current_message.source + data["cur_uid"] = current_message.uid + if(istype(current_message.attachment)) + data["cur_hasattachment"] = 1 + data["cur_attachment_filename"] = "[current_message.attachment.filename].[current_message.attachment.filetype]" + data["cur_attachment_size"] = current_message.attachment.size + else + data["label_inbox"] = "Inbox ([current_account.inbox.len])" + data["label_spam"] = "Spam ([current_account.spam.len])" + data["label_deleted"] = "Deleted ([current_account.deleted.len])" + var/list/message_source + if(folder == "Inbox") + message_source = current_account.inbox + else if(folder == "Spam") + message_source = current_account.spam + else if(folder == "Deleted") + message_source = current_account.deleted + + if(message_source) + data["folder"] = folder + var/list/all_messages = list() + for(var/datum/computer_file/data/email_message/message in message_source) + all_messages.Add(list(list( + "title" = message.title, + "body" = pencode2html(message.stored_data), + "source" = message.source, + "timestamp" = message.timestamp, + "uid" = message.uid + ))) + data["messages"] = all_messages + data["messagecount"] = all_messages.len + else + data["stored_login"] = stored_login + data["stored_password"] = stars(stored_password, 0) + + return data + +/datum/tgui_module/email_client/proc/find_message_by_fuid(var/fuid) + if(!istype(current_account)) + return + + // params works with strings, so this makes it a bit easier for us + if(istext(fuid)) + fuid = text2num(fuid) + + for(var/datum/computer_file/data/email_message/message in current_account.all_emails()) + if(message.uid == fuid) + return message + +/datum/tgui_module/email_client/proc/clear_message() + new_message = FALSE + msg_title = "" + msg_body = "" + msg_recipient = "" + msg_attachment = null + current_message = null + +/datum/tgui_module/email_client/proc/relayed_process(var/netspeed) + download_speed = netspeed + if(!downloading) + return + download_progress = min(download_progress + netspeed, downloading.size) + if(download_progress >= downloading.size) + var/obj/item/modular_computer/MC = tgui_host() + if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) + error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" + downloading = null + download_progress = 0 + return 1 + + if(MC.hard_drive.store_file(downloading)) + error = "File successfully downloaded to local device." + else + error = "Error saving file: I/O Error: The hard drive may be full or nonfunctional." + downloading = null + download_progress = 0 + return 1 + + +/datum/tgui_module/email_client/tgui_act(action, params) + if(..()) + return TRUE + + var/mob/living/user = usr + check_for_new_messages(1) // Any actual interaction (button pressing) is considered as acknowledging received message, for the purpose of notification icons. + + switch(action) + if("login") + log_in() + return 1 + + if("logout") + log_out() + return 1 + + if("reset") + error = "" + return 1 + + if("new_message") + new_message = TRUE + return 1 + + if("cancel") + if(addressbook) + addressbook = FALSE + else + clear_message() + return 1 + + if("addressbook") + addressbook = TRUE + return 1 + + if("set_recipient") + msg_recipient = sanitize(params["set_recipient"]) + addressbook = FALSE + return 1 + + if("edit_title") + var/newtitle = sanitize(params["val"], 100) + if(newtitle) + msg_title = newtitle + return 1 + + // This uses similar editing mechanism as the FileManager program, therefore it supports various paper tags and remembers formatting. + if("edit_body") + var/oldtext = html_decode(msg_body) + oldtext = replacetext(oldtext, "\[editorbr\]", "\n") + + var/newtext = sanitize(replacetext(input(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext) as message|null, "\n", "\[editorbr\]"), 20000) + if(newtext) + msg_body = newtext + return 1 + + if("edit_recipient") + var/newrecipient = sanitize(params["val"], 100) + if(newrecipient) + msg_recipient = newrecipient + return 1 + + if("edit_login") + var/newlogin = sanitize(params["val"], 100) + if(newlogin) + stored_login = newlogin + return 1 + + if("edit_password") + var/newpass = sanitize(params["val"], 100) + if(newpass) + stored_password = newpass + return 1 + + if("delete") + if(!istype(current_account)) + return 1 + var/datum/computer_file/data/email_message/M = find_message_by_fuid(params["delete"]) + if(!istype(M)) + return 1 + if(folder == "Deleted") + current_account.deleted.Remove(M) + qdel(M) + else + current_account.deleted.Add(M) + current_account.inbox.Remove(M) + current_account.spam.Remove(M) + if(current_message == M) + current_message = null + return 1 + + if("send") + if(!current_account) + return 1 + if((msg_title == "") || (msg_body == "") || (msg_recipient == "")) + error = "Error sending mail: Title or message body is empty!" + return 1 + + var/datum/computer_file/data/email_message/message = new() + message.title = msg_title + message.stored_data = msg_body + message.source = current_account.login + message.attachment = msg_attachment + if(!current_account.send_mail(msg_recipient, message)) + error = "Error sending email: this address doesn't exist." + return 1 + else + error = "Email successfully sent." + clear_message() + return 1 + + if("set_folder") + folder = params["set_folder"] + return 1 + + if("reply") + var/datum/computer_file/data/email_message/M = find_message_by_fuid(params["reply"]) + if(!istype(M)) + return 1 + + new_message = TRUE + msg_recipient = M.source + msg_title = "Re: [M.title]" + msg_body = "\[editorbr\]\[editorbr\]\[editorbr\]\[br\]==============================\[br\]\[editorbr\]" + msg_body += "Received by [current_account.login] at [M.timestamp]\[br\]\[editorbr\][M.stored_data]" + return 1 + + if("view") + var/datum/computer_file/data/email_message/M = find_message_by_fuid(params["view"]) + if(istype(M)) + current_message = M + return 1 + + if("changepassword") + var/oldpassword = sanitize(input(user,"Please enter your old password:", "Password Change"), 100) + if(!oldpassword) + return 1 + var/newpassword1 = sanitize(input(user,"Please enter your new password:", "Password Change"), 100) + if(!newpassword1) + return 1 + var/newpassword2 = sanitize(input(user,"Please re-enter your new password:", "Password Change"), 100) + if(!newpassword2) + return 1 + + if(!istype(current_account)) + error = "Please log in before proceeding." + return 1 + + if(current_account.password != oldpassword) + error = "Incorrect original password" + return 1 + + if(newpassword1 != newpassword2) + error = "The entered passwords do not match." + return 1 + + current_account.password = newpassword1 + stored_password = newpassword1 + error = "Your password has been successfully changed!" + return 1 + + // The following entries are Modular Computer framework only, and therefore won't do anything in other cases (like AI View) + + if("save") + // Fully dependant on modular computers here. + var/obj/item/modular_computer/MC = tgui_host() + + if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) + error = "Error exporting file. Are you using a functional and NTOS-compliant device?" + return 1 + + var/filename = sanitize(input(user,"Please specify file name:", "Message export"), 100) + if(!filename) + return 1 + + var/datum/computer_file/data/email_message/M = find_message_by_fuid(params["save"]) + var/datum/computer_file/data/mail = istype(M) ? M.export() : null + if(!istype(mail)) + return 1 + mail.filename = filename + if(!MC.hard_drive || !MC.hard_drive.store_file(mail)) + error = "Internal I/O error when writing file, the hard drive may be full." + else + error = "Email exported successfully" + return 1 + + if("addattachment") + var/obj/item/modular_computer/MC = tgui_host() + msg_attachment = null + + if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) + error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" + return 1 + + var/list/filenames = list() + for(var/datum/computer_file/CF in MC.hard_drive.stored_files) + if(CF.unsendable) + continue + filenames.Add(CF.filename) + var/picked_file = input(user, "Please pick a file to send as attachment (max 32GQ)") as null|anything in filenames + + if(!picked_file) + return 1 + + if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) + error = "Error uploading file. Are you using a functional and NTOSv2-compliant device?" + return 1 + + for(var/datum/computer_file/CF in MC.hard_drive.stored_files) + if(CF.unsendable) + continue + if(CF.filename == picked_file) + msg_attachment = CF.clone() + break + if(!istype(msg_attachment)) + msg_attachment = null + error = "Unknown error when uploading attachment." + return 1 + + if(msg_attachment.size > 32) + error = "Error uploading attachment: File exceeds maximal permitted file size of 32GQ." + msg_attachment = null + else + error = "File [msg_attachment.filename].[msg_attachment.filetype] has been successfully uploaded." + return 1 + + if("downloadattachment") + if(!current_account || !current_message || !current_message.attachment) + return 1 + var/obj/item/modular_computer/MC = tgui_host() + if(!istype(MC) || !MC.hard_drive || !MC.hard_drive.check_functionality()) + error = "Error downloading file. Are you using a functional and NTOSv2-compliant device?" + return 1 + + downloading = current_message.attachment.clone() + download_progress = 0 + return 1 + + if("canceldownload") + downloading = null + download_progress = 0 + return 1 + + if("remove_attachment") + msg_attachment = null + return 1 \ No newline at end of file diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm new file mode 100644 index 0000000000..f27a08eda9 --- /dev/null +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -0,0 +1,241 @@ +/datum/tgui_module/uav + name = "UAV Control" + tgui_id = "UAV" + ntos = TRUE + var/obj/item/device/uav/current_uav = null //The UAV we're watching + var/signal_strength = 0 //Our last signal strength report (cached for a few seconds) + var/signal_test_counter = 0 //How long until next signal strength check + var/list/viewers //Who's viewing a UAV through us + var/adhoc_range = 30 //How far we can operate on a UAV without NTnet + +/datum/tgui_module/uav/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) + var/list/data = ..() + + if(current_uav) + if(QDELETED(current_uav)) + set_current(null) + else if(signal_test_counter-- <= 0) + signal_strength = get_signal_to(current_uav) + if(!signal_strength) + set_current(null) + else // Don't reset counter until we find a UAV that's actually in range we can stay connected to + signal_test_counter = 20 + + data["current_uav"] = null + if(current_uav) + data["current_uav"] = list("status" = current_uav.get_status_string(), "power" = current_uav.state == 1 ? 1 : null) + data["signal_strength"] = signal_strength ? signal_strength >= 2 ? "High" : "Low" : "None" + data["in_use"] = LAZYLEN(viewers) + + var/list/paired_map = list() + var/obj/item/modular_computer/mc_host = tgui_host() + if(istype(mc_host)) + for(var/puav in mc_host.paired_uavs) + var/weakref/wr = puav + var/obj/item/device/uav/U = wr.resolve() + paired_map.Add(list(list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]"))) + + data["paired_uavs"] = paired_map + return data + +/datum/tgui_module/uav/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) + if(..()) + return TRUE + + switch(action) + if("switch_uav") + var/obj/item/device/uav/U = locate(params["switch_uav"]) //This is a \ref to the UAV itself + if(!istype(U)) + to_chat(usr,"Something is blocking the connection to that UAV. In-person investigation is required.") + return FALSE + + if(!get_signal_to(U)) + to_chat(usr,"The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.") + return FALSE + + set_current(U) + return TRUE + + if("del_uav") + var/refstring = params["del_uav"] //This is a \ref to the UAV itself + var/obj/item/modular_computer/mc_host = tgui_host() + //This is so we can really scrape up any weakrefs that can't resolve + for(var/weakref/wr in mc_host.paired_uavs) + if(wr.ref == refstring) + if(current_uav?.weakref == wr) + set_current(null) + LAZYREMOVE(mc_host.paired_uavs, wr) + return TRUE + + if("view_uav") + if(!current_uav) + return FALSE + + if(current_uav.check_eye(usr) < 0) + to_chat(usr,"The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.") + else + viewing_uav(usr) ? unlook(usr) : look(usr) + return TRUE + + if("power_uav") + if(!current_uav) + return FALSE + else if(current_uav.toggle_power()) + //Clean up viewers faster + if(LAZYLEN(viewers)) + for(var/weakref/W in viewers) + var/M = W.resolve() + if(M) + unlook(M) + return TRUE + +/datum/tgui_module/uav/proc/set_current(var/obj/item/device/uav/U) + if(current_uav == U) + return + + signal_strength = 0 + current_uav = U + + if(LAZYLEN(viewers)) + for(var/weakref/W in viewers) + var/M = W.resolve() + if(M) + if(current_uav) + to_chat(M, "You're disconnected from the UAV's camera!") + unlook(M) + else + look(M) + +//// +//// Finding signal strength between us and the UAV +//// +/datum/tgui_module/uav/proc/get_signal_to(atom/movable/AM) + // Following roughly the ntnet signal levels + // 0 is none + // 1 is weak + // 2 is strong + var/obj/item/modular_computer/host = tgui_host() //Better not add this to anything other than modular computers. + if(!istype(host)) + return + var/our_signal = host.get_ntnet_status() //1 low, 2 good, 3 wired, 0 none + var/their_z = get_z(AM) + + //If we have no NTnet connection don't bother getting theirs + if(!our_signal) + if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) + return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs + else + return 0 + + var/list/zlevels_in_range = using_map.get_map_levels(their_z, FALSE) + var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range + var/their_signal = 0 + for(var/relay in ntnet_global.relays) + var/obj/machinery/ntnet_relay/R = relay + if(!R.operable()) + continue + if(R.z == their_z) + their_signal = 2 + break + if(R.z in zlevels_in_range) + their_signal = 2 + break + if(R.z in zlevels_in_long_range) + their_signal = 1 + break + + if(!their_signal) //They have no NTnet at all + if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) + return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs + else + return 0 + else + return max(our_signal, their_signal) + +/* All handling viewers */ +/datum/tgui_module/uav/Destroy() + if(LAZYLEN(viewers)) + for(var/weakref/W in viewers) + var/M = W.resolve() + if(M) + unlook(M) + . = ..() + +/datum/tgui_module/uav/tgui_status(mob/user) + . = ..() + if(. > STATUS_DISABLED) + if(viewing_uav(user)) + look(user) + return + unlook(user) + +/datum/tgui_module/uav/tgui_close(mob/user) + . = ..() + unlook(user) + +/datum/tgui_module/uav/proc/viewing_uav(mob/user) + return (weakref(user) in viewers) + +/datum/tgui_module/uav/proc/look(mob/user) + if(issilicon(user)) //Too complicated for me to want to mess with at the moment + to_chat(user, "Regulations prevent you from controlling several corporeal forms at the same time!") + return + + if(!current_uav) + return + + if(user.machine != tgui_host()) + user.set_machine(tgui_host()) + user.reset_view(current_uav) + current_uav.add_master(user) + LAZYDISTINCTADD(viewers, weakref(user)) + +/datum/tgui_module/uav/proc/unlook(mob/user) + user.unset_machine() + user.reset_view() + if(current_uav) + current_uav.remove_master(user) + LAZYREMOVE(viewers, weakref(user)) + +/datum/tgui_module/uav/check_eye(mob/user) + if(get_dist(user, tgui_host()) > 1 || user.blinded || !current_uav) + unlook(user) + return -1 + + var/viewflag = current_uav.check_eye(user) + if(viewflag < 0) //camera doesn't work + unlook(user) + return -1 + + return viewflag + +//// +//// Relaying movements to the UAV +//// +/datum/tgui_module/uav/relaymove(var/mob/user, direction) + if(current_uav) + return current_uav.relaymove(user, direction, signal_strength) + +//// +//// The effects when looking through a UAV +//// +/datum/tgui_module/uav/apply_visual(mob/M) + if(!M.client) + return + if(weakref(M) in viewers) + M.overlay_fullscreen("fishbed",/obj/screen/fullscreen/fishbed) + M.overlay_fullscreen("scanlines",/obj/screen/fullscreen/scanline) + + if(signal_strength <= 1) + M.overlay_fullscreen("whitenoise",/obj/screen/fullscreen/noise) + else + M.clear_fullscreen("whitenoise", 0) + else + remove_visual(M) + +/datum/tgui_module/uav/remove_visual(mob/M) + if(!M.client) + return + M.clear_fullscreen("fishbed",0) + M.clear_fullscreen("scanlines",0) + M.clear_fullscreen("whitenoise",0) diff --git a/icons/UI_Icons/Achievements/Boss/bbgum.png b/icons/UI_Icons/Achievements/Boss/bbgum.png new file mode 100644 index 0000000000..a0962fb1ce Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/bbgum.png differ diff --git a/icons/UI_Icons/Achievements/Boss/colossus.png b/icons/UI_Icons/Achievements/Boss/colossus.png new file mode 100644 index 0000000000..f544084786 Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/colossus.png differ diff --git a/icons/UI_Icons/Achievements/Boss/drake.png b/icons/UI_Icons/Achievements/Boss/drake.png new file mode 100644 index 0000000000..19ecc5ae94 Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/drake.png differ diff --git a/icons/UI_Icons/Achievements/Boss/hierophant.png b/icons/UI_Icons/Achievements/Boss/hierophant.png new file mode 100644 index 0000000000..a8f2e6a45e Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/hierophant.png differ diff --git a/icons/UI_Icons/Achievements/Boss/legion.png b/icons/UI_Icons/Achievements/Boss/legion.png new file mode 100644 index 0000000000..dc9470a8a9 Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/legion.png differ diff --git a/icons/UI_Icons/Achievements/Boss/miner.png b/icons/UI_Icons/Achievements/Boss/miner.png new file mode 100644 index 0000000000..5164dcfb10 Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/miner.png differ diff --git a/icons/UI_Icons/Achievements/Boss/swarmer.png b/icons/UI_Icons/Achievements/Boss/swarmer.png new file mode 100644 index 0000000000..bcc017af32 Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/swarmer.png differ diff --git a/icons/UI_Icons/Achievements/Boss/tendril.png b/icons/UI_Icons/Achievements/Boss/tendril.png new file mode 100644 index 0000000000..3b6b908d3e Binary files /dev/null and b/icons/UI_Icons/Achievements/Boss/tendril.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/assistant.png b/icons/UI_Icons/Achievements/Mafia/assistant.png new file mode 100644 index 0000000000..0cfc93b166 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/assistant.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/changeling.png b/icons/UI_Icons/Achievements/Mafia/changeling.png new file mode 100644 index 0000000000..9e44c90263 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/changeling.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/chaplain.png b/icons/UI_Icons/Achievements/Mafia/chaplain.png new file mode 100644 index 0000000000..ac48291282 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/chaplain.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/clown.png b/icons/UI_Icons/Achievements/Mafia/clown.png new file mode 100644 index 0000000000..4f2d919471 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/clown.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/detective.png b/icons/UI_Icons/Achievements/Mafia/detective.png new file mode 100644 index 0000000000..edeba8c402 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/detective.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/fugitive.png b/icons/UI_Icons/Achievements/Mafia/fugitive.png new file mode 100644 index 0000000000..86beb21b1b Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/fugitive.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/hated.png b/icons/UI_Icons/Achievements/Mafia/hated.png new file mode 100644 index 0000000000..00ea735200 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/hated.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/hop.png b/icons/UI_Icons/Achievements/Mafia/hop.png new file mode 100644 index 0000000000..f60719974d Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/hop.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/lawyer.png b/icons/UI_Icons/Achievements/Mafia/lawyer.png new file mode 100644 index 0000000000..1c9bba2036 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/lawyer.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/md.png b/icons/UI_Icons/Achievements/Mafia/md.png new file mode 100644 index 0000000000..32bc972a4a Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/md.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/nightmare.png b/icons/UI_Icons/Achievements/Mafia/nightmare.png new file mode 100644 index 0000000000..14c50b403a Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/nightmare.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/obsessed.png b/icons/UI_Icons/Achievements/Mafia/obsessed.png new file mode 100644 index 0000000000..b92ba5b582 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/obsessed.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/psychologist.png b/icons/UI_Icons/Achievements/Mafia/psychologist.png new file mode 100644 index 0000000000..60171ca723 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/psychologist.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/thoughtfeeder.png b/icons/UI_Icons/Achievements/Mafia/thoughtfeeder.png new file mode 100644 index 0000000000..009bac0d99 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/thoughtfeeder.png differ diff --git a/icons/UI_Icons/Achievements/Mafia/traitor.png b/icons/UI_Icons/Achievements/Mafia/traitor.png new file mode 100644 index 0000000000..28c8c52191 Binary files /dev/null and b/icons/UI_Icons/Achievements/Mafia/traitor.png differ diff --git a/icons/UI_Icons/Achievements/Misc/ascension.png b/icons/UI_Icons/Achievements/Misc/ascension.png new file mode 100644 index 0000000000..ca7e875bd3 Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/ascension.png differ diff --git a/icons/UI_Icons/Achievements/Misc/clownking.png b/icons/UI_Icons/Achievements/Misc/clownking.png new file mode 100644 index 0000000000..7260c34dcd Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/clownking.png differ diff --git a/icons/UI_Icons/Achievements/Misc/clownthanks.png b/icons/UI_Icons/Achievements/Misc/clownthanks.png new file mode 100644 index 0000000000..214a4e0a74 Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/clownthanks.png differ diff --git a/icons/UI_Icons/Achievements/Misc/featofstrength.png b/icons/UI_Icons/Achievements/Misc/featofstrength.png new file mode 100644 index 0000000000..5cfc5240bd Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/featofstrength.png differ diff --git a/icons/UI_Icons/Achievements/Misc/helbital.png b/icons/UI_Icons/Achievements/Misc/helbital.png new file mode 100644 index 0000000000..10b5efdd5e Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/helbital.png differ diff --git a/icons/UI_Icons/Achievements/Misc/jackpot.png b/icons/UI_Icons/Achievements/Misc/jackpot.png new file mode 100644 index 0000000000..e171c5cb7c Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/jackpot.png differ diff --git a/icons/UI_Icons/Achievements/Misc/longshift.png b/icons/UI_Icons/Achievements/Misc/longshift.png new file mode 100644 index 0000000000..5f511e21fd Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/longshift.png differ diff --git a/icons/UI_Icons/Achievements/Misc/meteors.png b/icons/UI_Icons/Achievements/Misc/meteors.png new file mode 100644 index 0000000000..5e6d4bc9bd Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/meteors.png differ diff --git a/icons/UI_Icons/Achievements/Misc/rule8.png b/icons/UI_Icons/Achievements/Misc/rule8.png new file mode 100644 index 0000000000..2bc518d5ab Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/rule8.png differ diff --git a/icons/UI_Icons/Achievements/Misc/snail.png b/icons/UI_Icons/Achievements/Misc/snail.png new file mode 100644 index 0000000000..f38c5165cb Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/snail.png differ diff --git a/icons/UI_Icons/Achievements/Misc/timewaste.png b/icons/UI_Icons/Achievements/Misc/timewaste.png new file mode 100644 index 0000000000..24d23025fb Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/timewaste.png differ diff --git a/icons/UI_Icons/Achievements/Misc/upgrade.png b/icons/UI_Icons/Achievements/Misc/upgrade.png new file mode 100644 index 0000000000..e73bb512eb Binary files /dev/null and b/icons/UI_Icons/Achievements/Misc/upgrade.png differ diff --git a/icons/UI_Icons/Achievements/Skills/mining.png b/icons/UI_Icons/Achievements/Skills/mining.png new file mode 100644 index 0000000000..7d87d135b4 Binary files /dev/null and b/icons/UI_Icons/Achievements/Skills/mining.png differ diff --git a/icons/UI_Icons/Achievements/baseboss.png b/icons/UI_Icons/Achievements/baseboss.png new file mode 100644 index 0000000000..df2227b391 Binary files /dev/null and b/icons/UI_Icons/Achievements/baseboss.png differ diff --git a/icons/UI_Icons/Achievements/basemafia.png b/icons/UI_Icons/Achievements/basemafia.png new file mode 100644 index 0000000000..b22676d891 Binary files /dev/null and b/icons/UI_Icons/Achievements/basemafia.png differ diff --git a/icons/UI_Icons/Achievements/basemisc.png b/icons/UI_Icons/Achievements/basemisc.png new file mode 100644 index 0000000000..1346d1c001 Binary files /dev/null and b/icons/UI_Icons/Achievements/basemisc.png differ diff --git a/icons/UI_Icons/Achievements/baseskill.png b/icons/UI_Icons/Achievements/baseskill.png new file mode 100644 index 0000000000..de6ff8a2e5 Binary files /dev/null and b/icons/UI_Icons/Achievements/baseskill.png differ diff --git a/icons/UI_Icons/Achievements/default.png b/icons/UI_Icons/Achievements/default.png new file mode 100644 index 0000000000..852298aa0c Binary files /dev/null and b/icons/UI_Icons/Achievements/default.png differ diff --git a/icons/UI_Icons/Arcade/boss1.gif b/icons/UI_Icons/Arcade/boss1.gif new file mode 100644 index 0000000000..4730ac0021 Binary files /dev/null and b/icons/UI_Icons/Arcade/boss1.gif differ diff --git a/icons/UI_Icons/Arcade/boss2.gif b/icons/UI_Icons/Arcade/boss2.gif new file mode 100644 index 0000000000..d95fd84f0e Binary files /dev/null and b/icons/UI_Icons/Arcade/boss2.gif differ diff --git a/icons/UI_Icons/Arcade/boss3.gif b/icons/UI_Icons/Arcade/boss3.gif new file mode 100644 index 0000000000..e97056998a Binary files /dev/null and b/icons/UI_Icons/Arcade/boss3.gif differ diff --git a/icons/UI_Icons/Arcade/boss4.gif b/icons/UI_Icons/Arcade/boss4.gif new file mode 100644 index 0000000000..6695b6cfbf Binary files /dev/null and b/icons/UI_Icons/Arcade/boss4.gif differ diff --git a/icons/UI_Icons/Arcade/boss5.gif b/icons/UI_Icons/Arcade/boss5.gif new file mode 100644 index 0000000000..a827fb8c4e Binary files /dev/null and b/icons/UI_Icons/Arcade/boss5.gif differ diff --git a/icons/UI_Icons/Arcade/boss6.gif b/icons/UI_Icons/Arcade/boss6.gif new file mode 100644 index 0000000000..7a926cf89d Binary files /dev/null and b/icons/UI_Icons/Arcade/boss6.gif differ diff --git a/icons/UI_Icons/chat/chat_icons.dmi b/icons/UI_Icons/chat/chat_icons.dmi new file mode 100644 index 0000000000..8cc4b2c559 Binary files /dev/null and b/icons/UI_Icons/chat/chat_icons.dmi differ diff --git a/icons/UI_Icons/tgui/ntosradar_background.png b/icons/UI_Icons/tgui/ntosradar_background.png new file mode 100644 index 0000000000..bac7647e3a Binary files /dev/null and b/icons/UI_Icons/tgui/ntosradar_background.png differ diff --git a/icons/UI_Icons/tgui/ntosradar_pointer.png b/icons/UI_Icons/tgui/ntosradar_pointer.png new file mode 100644 index 0000000000..e71823f391 Binary files /dev/null and b/icons/UI_Icons/tgui/ntosradar_pointer.png differ diff --git a/icons/UI_Icons/tgui/ntosradar_pointer_S.png b/icons/UI_Icons/tgui/ntosradar_pointer_S.png new file mode 100644 index 0000000000..51a0dd49d9 Binary files /dev/null and b/icons/UI_Icons/tgui/ntosradar_pointer_S.png differ diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 5403cac867..b707e2c742 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 1c92dc0afd..9e756bf9f0 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/obj/stacks.dmi b/icons/obj/stacks.dmi index 0f5453bde0..7fc0482b1b 100644 Binary files a/icons/obj/stacks.dmi and b/icons/obj/stacks.dmi differ diff --git a/nano/images/modular_computers/alarm_green.gif b/icons/program_icons/alarm_green.gif similarity index 100% rename from nano/images/modular_computers/alarm_green.gif rename to icons/program_icons/alarm_green.gif diff --git a/nano/images/modular_computers/alarm_red.gif b/icons/program_icons/alarm_red.gif similarity index 100% rename from nano/images/modular_computers/alarm_red.gif rename to icons/program_icons/alarm_red.gif diff --git a/nano/images/modular_computers/batt_100.gif b/icons/program_icons/batt_100.gif similarity index 100% rename from nano/images/modular_computers/batt_100.gif rename to icons/program_icons/batt_100.gif diff --git a/nano/images/modular_computers/batt_20.gif b/icons/program_icons/batt_20.gif similarity index 100% rename from nano/images/modular_computers/batt_20.gif rename to icons/program_icons/batt_20.gif diff --git a/nano/images/modular_computers/batt_40.gif b/icons/program_icons/batt_40.gif similarity index 100% rename from nano/images/modular_computers/batt_40.gif rename to icons/program_icons/batt_40.gif diff --git a/nano/images/modular_computers/batt_5.gif b/icons/program_icons/batt_5.gif similarity index 100% rename from nano/images/modular_computers/batt_5.gif rename to icons/program_icons/batt_5.gif diff --git a/nano/images/modular_computers/batt_60.gif b/icons/program_icons/batt_60.gif similarity index 100% rename from nano/images/modular_computers/batt_60.gif rename to icons/program_icons/batt_60.gif diff --git a/nano/images/modular_computers/batt_80.gif b/icons/program_icons/batt_80.gif similarity index 100% rename from nano/images/modular_computers/batt_80.gif rename to icons/program_icons/batt_80.gif diff --git a/nano/images/modular_computers/charging.gif b/icons/program_icons/charging.gif similarity index 100% rename from nano/images/modular_computers/charging.gif rename to icons/program_icons/charging.gif diff --git a/nano/images/modular_computers/downloader_finished.gif b/icons/program_icons/downloader_finished.gif similarity index 100% rename from nano/images/modular_computers/downloader_finished.gif rename to icons/program_icons/downloader_finished.gif diff --git a/nano/images/modular_computers/downloader_running.gif b/icons/program_icons/downloader_running.gif similarity index 100% rename from nano/images/modular_computers/downloader_running.gif rename to icons/program_icons/downloader_running.gif diff --git a/nano/images/modular_computers/ntnrc_idle.gif b/icons/program_icons/ntnrc_idle.gif similarity index 100% rename from nano/images/modular_computers/ntnrc_idle.gif rename to icons/program_icons/ntnrc_idle.gif diff --git a/nano/images/modular_computers/ntnrc_new.gif b/icons/program_icons/ntnrc_new.gif similarity index 100% rename from nano/images/modular_computers/ntnrc_new.gif rename to icons/program_icons/ntnrc_new.gif diff --git a/nano/images/modular_computers/power_norm.gif b/icons/program_icons/power_norm.gif similarity index 100% rename from nano/images/modular_computers/power_norm.gif rename to icons/program_icons/power_norm.gif diff --git a/nano/images/modular_computers/power_warn.gif b/icons/program_icons/power_warn.gif similarity index 100% rename from nano/images/modular_computers/power_warn.gif rename to icons/program_icons/power_warn.gif diff --git a/nano/images/modular_computers/sig_high.gif b/icons/program_icons/sig_high.gif similarity index 100% rename from nano/images/modular_computers/sig_high.gif rename to icons/program_icons/sig_high.gif diff --git a/nano/images/modular_computers/sig_lan.gif b/icons/program_icons/sig_lan.gif similarity index 100% rename from nano/images/modular_computers/sig_lan.gif rename to icons/program_icons/sig_lan.gif diff --git a/nano/images/modular_computers/sig_low.gif b/icons/program_icons/sig_low.gif similarity index 100% rename from nano/images/modular_computers/sig_low.gif rename to icons/program_icons/sig_low.gif diff --git a/nano/images/modular_computers/sig_none.gif b/icons/program_icons/sig_none.gif similarity index 100% rename from nano/images/modular_computers/sig_none.gif rename to icons/program_icons/sig_none.gif diff --git a/nano/images/modular_computers/sig_warning.gif b/icons/program_icons/sig_warning.gif similarity index 100% rename from nano/images/modular_computers/sig_warning.gif rename to icons/program_icons/sig_warning.gif diff --git a/nano/images/modular_computers/smmon_0.gif b/icons/program_icons/smmon_0.gif similarity index 100% rename from nano/images/modular_computers/smmon_0.gif rename to icons/program_icons/smmon_0.gif diff --git a/nano/images/modular_computers/smmon_1.gif b/icons/program_icons/smmon_1.gif similarity index 100% rename from nano/images/modular_computers/smmon_1.gif rename to icons/program_icons/smmon_1.gif diff --git a/nano/images/modular_computers/smmon_2.gif b/icons/program_icons/smmon_2.gif similarity index 100% rename from nano/images/modular_computers/smmon_2.gif rename to icons/program_icons/smmon_2.gif diff --git a/nano/images/modular_computers/smmon_3.gif b/icons/program_icons/smmon_3.gif similarity index 100% rename from nano/images/modular_computers/smmon_3.gif rename to icons/program_icons/smmon_3.gif diff --git a/nano/images/modular_computers/smmon_4.gif b/icons/program_icons/smmon_4.gif similarity index 100% rename from nano/images/modular_computers/smmon_4.gif rename to icons/program_icons/smmon_4.gif diff --git a/nano/images/modular_computers/smmon_5.gif b/icons/program_icons/smmon_5.gif similarity index 100% rename from nano/images/modular_computers/smmon_5.gif rename to icons/program_icons/smmon_5.gif diff --git a/nano/images/modular_computers/smmon_6.gif b/icons/program_icons/smmon_6.gif similarity index 100% rename from nano/images/modular_computers/smmon_6.gif rename to icons/program_icons/smmon_6.gif diff --git a/nano/templates/access_decrypter.tmpl b/nano/templates/access_decrypter.tmpl deleted file mode 100644 index f905815576..0000000000 --- a/nano/templates/access_decrypter.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -{{:helper.syndicateMode()}} -{{if data.message}} - ##INFO: {{:data.message}}

{{:helper.link('RESET', null, { 'PRG_reset' : 1 })}} -{{else data.running}} - ##Attempting to decrypt network access codes. Please wait. Rate: {{:data.rate}} PHash/s
- {{for data.dos_strings}} - {{:value}}
- {{/for}} - {{:helper.link('ABORT', null, { 'PRG_reset' : 1 })}} -{{else}} - ##System ready. Select an access code to decrypt. -
- {{for data.regions}} -
-
{{:value.name}}
- {{for value.accesses :accessValue:accessKey}} -
- {{:helper.link(accessValue.desc, '', {'PRG_execute' : accessValue.ref, 'allowed' : accessValue.allowed}, accessValue.blocked ? 'disabled' : null, accessValue.allowed ? 'selected' : null)}} -
- {{/for}} -
- {{/for}} -
-{{/if}} \ No newline at end of file diff --git a/nano/templates/digitalwarrant.tmpl b/nano/templates/digitalwarrant.tmpl deleted file mode 100644 index 8693bca239..0000000000 --- a/nano/templates/digitalwarrant.tmpl +++ /dev/null @@ -1,89 +0,0 @@ -{{if data.warrantauth}} - -
- {{if data.type == "arrest"}} -
- Name: -
- {{/if}} - {{if data.type == "search"}} -
- Location: -
- {{/if}} -
- {{:data.warrantname}} -
-
-
- {{if data.type == "arrest"}} -
- Charges: -
- {{/if}} - {{if data.type == "search"}} -
- Reason: -
- {{/if}} -
- {{:data.warrantcharges}} -
-
-
-
- Authorized by: -
-
- {{:data.warrantauth}} -
-
-
-
- Actions: -
-
- - {{if data.type == "arrest"}} -
{{:helper.link('Edit Name', null, {'editwarrantname' : 1})}}{{:helper.link('Custom Name', null, {'editwarrantnamecustom' : 1})}} -
{{:helper.link('Edit Charges', null, {'editwarrantcharges' : 1})}} - {{/if}} - {{if data.type == "search"}} -
{{:helper.link('Edit Location', null, {'editwarrantnamecustom' : 1})}} -
{{:helper.link('Edit Reason', null, {'editwarrantcharges' : 1})}} - {{/if}} -
{{:helper.link('Authorize', null, {'editwarrantauth' : 1})}} -
{{:helper.link('Save', null, {'savewarrant' : 1})}} - {{:helper.link('Delete', null, {'deletewarrant' : 1})}} -
{{:helper.link('Back to Menu', null, {'back' : 1})}} -
-
-
- -{{else}} - - {{:helper.link('Add a Warrant', null, {'addwarrant' : 1})}}

-

Arrest warrants

- - - - - {{/if}} - {{/for}} -
NameChargesAuthorized By - {{for data.allwarrants}} - {{if value.arrestsearch == "arrest"}} -
{{:helper.link(value.warrantname, null, {'editwarrant' : value.id})}}{{:value.charges}}{{:value.auth}}
-

Search warrants

- - - - - {{/if}} - {{/for}} -
LocationReasonAuthorized By - {{for data.allwarrants}} - {{if value.arrestsearch == "search"}} -
{{:helper.link(value.warrantname, null, {'editwarrant' : value.id})}}{{:value.charges}}{{:value.auth}}
- -{{/if}} \ No newline at end of file diff --git a/nano/templates/email_administration.tmpl b/nano/templates/email_administration.tmpl deleted file mode 100644 index 6f1e7ac364..0000000000 --- a/nano/templates/email_administration.tmpl +++ /dev/null @@ -1,91 +0,0 @@ -{{if data.error}} - {{:data.error}}
- {{:helper.link('Return', null, {'back' : 1})}} -{{else data.msg_title}} -
-
- Title: -
-
- {{:data.msg_title}}  -
-
- Source: -
-
- {{:data.msg_source}}  -
-
- Received at: -
-
- {{:data.msg_timestamp}}  -
-
- Message: -
-
- {{:data.msg_body}}  -
-
- Options: -
-
- {{:helper.link('Return', null, {'back' : 1})}} -
-
-{{else data.current_account}} - Viewing account {{:data.current_account}} in administrative mode. -
-
- Account status: -
-
- {{if data.cur_suspended}} - Suspended - {{else}} - Normal - {{/if}} -
-
- Options: -
-
- {{:helper.link(data.cur_suspended ? 'Unsuspend' : 'Suspend', null, {'ban' : data.cur_uid})}} - {{:helper.link('Set Password', null, {'changepass' : data.cur_uid})}} - {{:helper.link('Return', null, {'back' : 1})}} -
-
- {{if data.messagecount}} - - - - - - - - {{for data.messages}} - - - - - - - {{/for}} -
SourceTitleReceived atActions
{{:value.source}} {{:value.title}} {{:value.timestamp}}  - {{:helper.link('View', null, {'viewmail' : value.uid})}} -
- {{else}} - No messages found in selected account. - {{/if}} -{{else}} -

Welcome to NTNet Email Administration System

- SECURE SYSTEM - Have your identification ready

- {{:helper.link('Create New Account', null, {'newaccount' : 1})}}

- Select account which you wish to administrate: - - {{for data.accounts}} -
{{:helper.link(value.login, null, {'viewaccount' : value.uid})}} - {{/for}} -
-{{/if}} \ No newline at end of file diff --git a/nano/templates/email_client.tmpl b/nano/templates/email_client.tmpl deleted file mode 100644 index 2abaa3ee8f..0000000000 --- a/nano/templates/email_client.tmpl +++ /dev/null @@ -1,183 +0,0 @@ -{{if data.error}} - {{:data.error}}
- {{:helper.link('Return', null, {'reset' : 1})}} -{{else data.downloading}} -

Downloading attachment...

-
-
- File name: -
-
- {{:data.down_filename}}  -
-
- Progress: -
-
- {{:helper.displayBar(data.down_progress, 0, data.down_size)}} {{:data.down_progress}} / {{:data.down_size}} GQ -
-
- Download rate: -
-
- {{:data.down_speed}} GQ/s  -
-
- {{:helper.link('Cancel Download', null, {'canceldownload' : 1})}} -{{else data.current_account}} - Welcome to your account, {{:data.current_account}}
- {{:helper.link('New Message', null, {'new_message' : 1})}} - {{:helper.link('Change Password', null, {'changepassword' : 1})}} - {{:helper.link('Log Out', null, {'logout' : 1})}}

- {{if data.addressbook}} - - {{for data.accounts}} -
{{:helper.link(value.login, null, {'set_recipient' : value.login})}} - {{/for}} -
- {{else data.new_message}} -
-
- Title: -
-
- {{:data.msg_title}}  -
-
- Recipient: -
-
- {{:data.msg_recipient}}  -
-
- Message: -
-
- {{:data.msg_body}}  -
- {{if data.msg_hasattachment}} -
- Attachment: -
-
- {{:data.msg_attachment_filename}} ({{:data.msg_attachment_size}}GQ) -
- {{/if}} -
- Options: -
-
- {{:helper.link('Edit Title', null, {'edit_title' : 1})}} - {{:helper.link('Find Recipient', null, {'addressbook' : 1})}} - {{:helper.link('Enter Recipient', null, {'edit_recipient' : 1})}} - {{:helper.link('Edit Message', null, {'edit_body' : 1})}} - {{:helper.link('Add attachment', null, {'addattachment' : 1})}} - {{if data.msg_hasattachment}} - {{:helper.link('Remove attachment', null, {'remove_attachment' : 1})}} - {{/if}} - {{:helper.link('Send', null, {'send' : 1})}} - {{:helper.link('Cancel', null, {'cancel' : 1})}} -
-
- {{else data.cur_title}} -
-
- Title: -
-
- {{:data.cur_title}}  -
-
- Origin: -
-
- {{:data.cur_source}}  -
-
- Received at: -
-
- {{:data.cur_timestamp}}  -
-
- Message: -
-
- {{:data.cur_body}}  -
- {{if data.cur_hasattachment}} -
- Attachment: -
-
- {{:data.cur_attachment_filename}} ({{:data.cur_attachment_size}}GQ) -
- {{/if}} -
- Options: -
-
- {{:helper.link('Reply', null, {'reply' : data.cur_uid})}} - {{:helper.link('Delete', null, {'delete' : data.cur_uid})}} - {{:helper.link('Close', null, {'cancel' : data.cur_uid})}} - {{:helper.link('Save to Disk', null, {'cancel' : data.cur_uid})}} - {{if data.cur_hasattachment}} - {{:helper.link('Save Attachment', null, {'downloadattachment' : 1})}} - {{/if}} -
-
- {{else}} - {{:helper.link('Inbox', null, {'set_folder' : 'Inbox'}, data.folder == 'Inbox' ? 'selected' : null)}} - {{:helper.link('Spam', null, {'set_folder' : 'Spam'}, data.folder == 'Spam' ? 'selected' : null)}} - {{:helper.link('Deleted', null, {'set_folder' : 'Deleted'}, data.folder == 'Deleted' ? 'selected' : null)}} -

- {{if data.messagecount}} - - - - - - - - {{for data.messages}} - - - - - - - {{/for}} -
SourceTitleReceived atActions
{{:value.source}} {{:value.title}} {{:value.timestamp}}  - {{:helper.link('Delete', null, {'delete' : value.uid})}} - {{:helper.link('Reply', null, {'reply' : value.uid})}} - {{:helper.link('View', null, {'view' : value.uid})}} -
- {{else}} - No messages found in selected folder - {{/if}} - {{/if}} -{{else}} - Welcome to NTNet Email System. Please log in. -
-
- Email address: -
-
- {{:data.stored_login}}  -
-
- Password: -
-
- {{:data.stored_password}}  -
-
- Options: -
-
- {{:helper.link('Enter Login', null, {'edit_login' : 1})}} - {{:helper.link('Enter Password', null, {'edit_password' : 1})}} - {{:helper.link('Log In', null, {'login' : 1})}} -
-
-{{/if}} \ No newline at end of file diff --git a/nano/templates/file_manager.tmpl b/nano/templates/file_manager.tmpl deleted file mode 100644 index 71310397d2..0000000000 --- a/nano/templates/file_manager.tmpl +++ /dev/null @@ -1,58 +0,0 @@ -{{if data.error}} -

An error has occured and this program can not continue.

- Additional information: {{:data.error}}
- Please try again. If the problem persists contact your system administrator for assistance. - {{:helper.link('Restart program', null, { "PRG_closefile" : 1 })}} -{{else}} - {{if data.filename}} -

Viewing file {{:data.filename}}

-
- {{:helper.link('CLOSE', null, { "PRG_closefile" : 1 })}} - {{:helper.link('EDIT', null, { "PRG_edit" : 1 })}} - {{:helper.link('PRINT', null, { "PRG_printfile" : 1 })}} -

- {{:data.filedata}} - {{else}} -

Available files (local):

- -
File name - File type - File size (GQ) - Operations - {{for data.files}} -
{{:value.name}} - .{{:value.type}} - {{:value.size}}GQ - - {{:helper.link('VIEW', null, { "PRG_openfile" : value.name })}} - {{:helper.link('DELETE', null, { "PRG_deletefile" : value.name }, value.undeletable ? 'disabled' : null)}} - {{:helper.link('RENAME', null, { "PRG_rename" : value.name }, value.undeletable ? 'disabled' : null)}} - {{:helper.link('CLONE', null, { "PRG_clone" : value.name }, value.undeletable ? 'disabled' : null)}} - {{if data.usbconnected}} - {{:helper.link('EXPORT', null, { "PRG_copytousb" : value.name }, value.undeletable ? 'disabled' : null)}} - {{/if}} - {{/for}} -
- {{if data.usbconnected}} -

Available files (portable device):

- -
File name - File type - File size (GQ) - Operations - {{for data.usbfiles}} -
{{:value.name}} - .{{:value.type}} - {{:value.size}}GQ - - {{:helper.link('DELETE', null, { "PRG_usbdeletefile" : value.name }, value.undeletable ? 'disabled' : null)}} - {{if data.usbconnected}} - {{:helper.link('IMPORT', null, { "PRG_copyfromusb" : value.name }, value.undeletable ? 'disabled' : null)}} - {{/if}} - {{/for}} -
- {{/if}} - {{:helper.link('NEW DATA FILE', null, { "PRG_newtextfile" : 1 })}} - {{/if}} - -{{/if}} \ No newline at end of file diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl deleted file mode 100644 index c44ec6cdab..0000000000 --- a/nano/templates/identification_computer.tmpl +++ /dev/null @@ -1,165 +0,0 @@ -{{if data.printing}} -
The computer is currently busy.
-
-
Printing...
-
-

- Thank you for your patience! -

-{{else}} - {{:helper.link('Access Modification', 'home', {'choice' : 'mode', 'mode_target' : 0}, !data.mode ? 'disabled' : null)}} - {{:helper.link('Crew Manifest', 'folder-open', {'choice' : 'mode', 'mode_target' : 1}, data.mode ? 'disabled' : null)}} - {{:helper.link('Print', 'print', {'choice' : 'print'}, (data.mode || data.has_modify) ? null : 'disabled')}} - - {{if data.mode}} -
-

Crew Manifest

-
-
-
- {{for data.manifest}} - {{if value.elems.length}} - - {{for value.elems :itemValue:itemIndex}} - - - - - - {{/for}} - {{/if}} - {{/for}} -
{{:value.cat}}
{{:itemValue.name}}{{:itemValue.rank}}{{:itemValue.active}}
-
- {{else}} -
-

Access Modification

-
- - {{if !data.authenticated}} - Please insert the IDs into the terminal to proceed.
- {{/if}} - -
-
- Target Identity: -
-
- {{:helper.link(data.target_name, 'eject', {'choice' : 'modify'})}} -
-
-
-
- Authorized Identity: -
-
- {{:helper.link(data.scan_name, 'eject', {'choice' : 'scan'})}} -
-
-
- - {{if data.authenticated}} - {{if data.has_modify}} -
-

Details

-
- -
-
-
- - - Registered Name: -
-
- - -
-
-
- -
-
-
- - - Account Number: -
-
- - -
-
-
- -
- -
- Dismissals: -
-
- {{:helper.link('Dismiss ' + data.target_owner, 'gear', {'choice' : 'terminate'}, data.target_rank == "Dismissed" ? 'disabled' : null, data.target_rank == "Dismissed" ? 'disabled' : 'linkDanger')}} -
- -
- -
-

Assignment

-
- -
-
- - {{for data.departments}} - - - - - {{/for}} - - - - -
{{:value.department_name}} - {{for value.jobs :jobValue:jobIndex}} - {{:helper.link(jobValue.display_name, '', {'choice' : 'assign', 'assign_target' : jobValue.job}, data.id_rank == jobValue.job ? 'disabled' : null)}} - {{/for}} -
Special - {{:helper.link("Custom", '', {'choice' : 'assign', 'assign_target' : 'Custom'})}} -
-
-
- - {{if data.centcom_access}} -
-

Central Command

-
-
- {{for data.all_centcom_access}} -
- {{:helper.link(value.desc, '', {'choice' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}} -
- {{/for}} -
- {{else}} -
-

{{:data.station_name}}

-
-
- {{for data.regions}} -
-
{{:value.name}}
- {{for value.accesses :accessValue:accessKey}} -
- {{:helper.link(accessValue.desc, '', {'choice' : 'access', 'access_target' : accessValue.ref, 'allowed' : accessValue.allowed}, null, accessValue.allowed ? 'selected' : null)}} -
- {{/for}} -
-
- {{/for}} - - {{/if}} - {{/if}} - {{/if}} - {{/if}} -{{/if}} diff --git a/nano/templates/laptop_configuration.tmpl b/nano/templates/laptop_configuration.tmpl deleted file mode 100644 index 69af3bd6c0..0000000000 --- a/nano/templates/laptop_configuration.tmpl +++ /dev/null @@ -1,70 +0,0 @@ -Welcome to computer configuration utility. Please consult your system administrator if you have any questions about your device.
-

Power Supply

-
- Battery Status: -
-{{if data.battery_exists}} -
- Active -
-
- Battery Rating: -
-
- {{:data.battery_rating}} -
-
- Battery Charge: -
-
- {{:helper.displayBar(data.battery_percent, 0, 100, (data.battery_percent <= 25) ? 'bad' : (data.battery_percent <= 50) ? 'average' : 'good')}} - {{:data.battery_percent}} % -
-{{else}} -
- Not Available -
-{{/if}} -
- Power Usage: -
-
- {{:data.power_usage}}W -
-

File System

-
- Used Capacity: -
-
- {{:helper.displayBar(data.disk_used, 0, data.disk_size, 'good')}} - {{:data.disk_used}}GQ / {{:data.disk_size}}GQ -
-

Computer Components

-{{for data.hardware}} -

{{:value.name}}

- {{:value.desc}}
-
- State: -
-
- {{:value.enabled ? "Enabled" : "Disabled"}} -
-
- Power Usage: -
-
- {{:value.powerusage}}W -
- {{if !value.critical}} -
- Toggle Component: -
-
- {{:helper.link("ON", null, {'PC_enable_component' : value.name}, value.enabled ? 'disabled' : null)}} - {{:helper.link("OFF", null, {'PC_disable_component' : value.name}, value.enabled ? null : 'disabled')}} -
- {{/if}} -

-{{/for}} -

-NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559 \ No newline at end of file diff --git a/nano/templates/laptop_mainscreen.tmpl b/nano/templates/laptop_mainscreen.tmpl deleted file mode 100644 index 9d7804ae72..0000000000 --- a/nano/templates/laptop_mainscreen.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -No program loaded. Please select program from list below. - -{{for data.programs}} -
{{:helper.link(value.desc, value.icon, {'PC_runprogram' : value.name})}} - {{:helper.link('X', null, {'PC_killprogram' : value.name}, (value.running ? null : 'disabled'))}} - {{:helper.link('AR', null, {'PC_setautorun' : value.name}, null, (value.autorun ? 'yellowButton' : null))}} -{{/for}} -
\ No newline at end of file diff --git a/nano/templates/mod_identification_computer.tmpl b/nano/templates/mod_identification_computer.tmpl deleted file mode 100644 index ebe521597b..0000000000 --- a/nano/templates/mod_identification_computer.tmpl +++ /dev/null @@ -1,144 +0,0 @@ -{{if data.have_id_slot}} - {{:helper.link('Access Modification', 'home', {'action' : 'switchm', 'target' : 'mod'}, data.mmode ? 'disabled' : null)}} -{{/if}} - -{{:helper.link('Crew Manifest', 'folder-open', {'action' : 'switchm', 'target' : 'manifest'}, !data.mmode ? 'disabled' : null)}} - -{{if data.have_printer}} - {{:helper.link('Print', 'print', {'action' : 'print'}, (!data.mmode || data.has_id) ? null : 'disabled')}} -{{/if}} - -{{if !data.mmode}} -
-

Crew Manifest

-
- -
- {{:data.manifest}} -
- -{{else}} -
-

Access Modification

-
- - {{if !data.has_id}} - Please insert the ID into the terminal to proceed.
- {{/if}} - -
-
- Target Identity: -
-
- {{:helper.link(data.id_name, 'eject', {'action' : 'eject'})}} -
-
-
- - {{if data.authenticated}} - {{if data.has_id}} -
-

Details

-
- -
-
- Registered Name: -
- -
- {{:helper.link(data.id_owner, 'pencil', {'action' : 'edit', 'name' : 1})}} -
-
- -
-
- Account Number: -
- -
- {{:helper.link(data.id_account_number, 'pencil', {'action' : 'edit', 'account' : 1})}} -
-
- -
- -
- Dismissals: -
- -
- {{:helper.link('Dismiss ' + data.id_owner, 'gear', {'action' : 'terminate'}, data.id_rank == "Terminated" ? 'disabled' : null, data.id_rank == "Dismissed" ? 'disabled' : 'linkDanger')}} -
- -
- -
-

Assignment

-
- - {{:helper.link(data.assignments ? "Hide assignments" : "Show assignments", 'gear', {'action' : 'togglea'})}} - -
- - - -
- -
- {{if data.assignments}} -
- - {{for data.departments}} - - - - - {{/for}} - - - - -
{{:value.department_name}} - {{for value.jobs :jobValue:jobIndex}} - {{:helper.link(jobValue.display_name, '', {'action' : 'assign', 'assign_target' : jobValue.job}, data.id_rank == jobValue.job ? 'disabled' : null)}} - {{/for}} -
Special - {{:helper.link("Custom", '', {'action' : 'assign', 'assign_target' : 'Custom'})}} -
-
- {{/if}} -
- - {{if data.centcom_access}} -
-

Central Command

-
-
- {{for data.all_centcom_access}} -
- {{:helper.link(value.desc, '', {'action' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}} -
- {{/for}} -
- {{else}} -
-

{{:data.station_name}}

-
-
- {{for data.regions}} -
-
{{:value.name}}
- {{for value.accesses :accessValue:accessKey}} -
- {{:helper.link(accessValue.desc, '', {'action' : 'access', 'access_target' : accessValue.ref, 'allowed' : accessValue.allowed}, null, accessValue.allowed ? 'selected' : null)}} -
- {{/for}} -
- {{/for}} -
- {{/if}} - {{/if}} - {{/if}} -{{/if}} diff --git a/nano/templates/mod_uav.tmpl b/nano/templates/mod_uav.tmpl deleted file mode 100644 index 94498ec109..0000000000 --- a/nano/templates/mod_uav.tmpl +++ /dev/null @@ -1,53 +0,0 @@ -
-
-
UAV:
-
- {{if data.current_uav}} - {{:data.current_uav.status}} - {{else}} - [Not Connected] - {{/if}} -
-
- -
-
Signal:
-
- {{if data.current_uav}} - {{:data.signal_strength}} - {{else}} - [Not Connected] - {{/if}} -
-
- -
-
Power:
-
- {{if data.current_uav}} - {{:helper.link(data.current_uav.power ? 'Online' : 'Offline', data.current_uav.power ? 'check' : 'close', {'power_uav' : 1}, null, data.current_uav.power ? 'linkOn' : 'redButton')}} - {{else}} - [Not Connected] - {{/if}} -
-
- -
-
Camera:
-
- {{if data.current_uav}} - {{:helper.link(data.current_uav.power ? 'Available' : 'Unavailable', data.current_uav.power ? 'check' : 'close', {'view_uav' : 1}, null, data.in_use ? 'linkOn' : null)}} - {{else}} - [Not Connected] - {{/if}} -
-
-
-
-
Paired UAVs:
-
-{{for data.paired_uavs}} -
- {{:helper.link(value.name, '', {'switch_uav' : value.uavref})}}{{:helper.link('', 'close', {'del_uav' : value.uavref}, null, 'redButton')}} -
-{{/for}} diff --git a/nano/templates/news_browser.tmpl b/nano/templates/news_browser.tmpl deleted file mode 100644 index ed32814bec..0000000000 --- a/nano/templates/news_browser.tmpl +++ /dev/null @@ -1,77 +0,0 @@ - -{{if data.message}} -
- {{:data.message}} - {{:helper.link('CLEAR', null, { "PRG_clearmessage" : 1 })}} -
-{{/if}} -{{if data.article}} - Viewing: {{:data.title}}
- {{:helper.link('CLOSE', null, { "PRG_reset" : 1 })}} - {{:helper.link('SAVE', null, { "PRG_savearticle" : 1 })}} -

- {{if data.cover}} - - {{/if}} - {{:data.article}} -{{else data.download_running}} - Downloading file...

-
-
- Progress: -
-
- {{:helper.displayBar(data.download_progress, 0, data.download_maxprogress, 'good')}} - {{:data.download_progress}} / {{:data.download_maxprogress}} GQ -
-
- Download speed: -
-
- {{:data.download_rate}} GQ/s -
-
- Controls: -
-
- {{:helper.link('ABORT', null, { "PRG_reset" : 1 })}} -
-
-{{else}} -

Listing available files

-
-
- Show archived files: -
-
- {{if data.showing_archived}} - {{:helper.link('YES', null, { "PRG_toggle_archived" : 1 })}} - {{else}} - {{:helper.link('NO', null, { "PRG_toggle_archived" : 1 })}} - {{/if}} -
-
-

- {{for data.all_articles}} -
-
- Name: -
-
- {{:value.name}} -
-
- Size: -
-
- {{:value.size}} GQ -
-
- Actions: -
-
- {{:helper.link('OPEN', null, { "PRG_openarticle" : value.uid })}} -
-
- {{/for}} -{{/if}} diff --git a/nano/templates/ntnet_chat.tmpl b/nano/templates/ntnet_chat.tmpl deleted file mode 100644 index 592b648177..0000000000 --- a/nano/templates/ntnet_chat.tmpl +++ /dev/null @@ -1,66 +0,0 @@ -{{if data.adminmode}} -

ADMINISTRATIVE MODE

-{{/if}} - -{{if data.title}} -
- Current channel: -
-
- {{:data.title}} -
-
- Operator access: -
-
- {{if data.is_operator}} - Enabled - {{else}} - Disabled - {{/if}} -
-
- Controls: -
-
- -
{{:helper.link("Send message", null, {'PRG_speak' : 1})}} -
{{:helper.link("Change nickname", null, {'PRG_changename' : 1})}} -
{{:helper.link("Toggle administration mode", null, {'PRG_toggleadmin' : 1})}} -
{{:helper.link("Leave channel", null, {'PRG_leavechannel' : 1})}} -
{{:helper.link("Save log to local drive", null, {'PRG_savelog' : 1})}} - {{if data.is_operator}} -
{{:helper.link("Rename channel", null, {'PRG_renamechannel' : 1})}} -
{{:helper.link("Set password", null, {'PRG_setpassword' : 1})}} -
{{:helper.link("Delete channel", null, {'PRG_deletechannel' : 1})}} - {{/if}} -
-
- Chat Window -
-
-
- {{for data.messages}} - {{:value.msg}}
- {{/for}} -
-
-
- Connected Users
- {{for data.clients}} - {{:value.name}}
- {{/for}} -{{else}} - Controls: - -
{{:helper.link("Change nickname", null, {'PRG_changename' : 1})}} -
{{:helper.link("New Channel", null, {'PRG_newchannel' : 1})}} -
{{:helper.link("Toggle Administration Mode", null, {'PRG_toggleadmin' : 1})}} -
- Available channels: - - {{for data.all_channels}} -
{{:helper.link(value.chan, null, {'PRG_joinchannel' : value.id})}}
- {{/for}} -
-{{/if}} \ No newline at end of file diff --git a/nano/templates/ntnet_dos.tmpl b/nano/templates/ntnet_dos.tmpl deleted file mode 100644 index 1ddf8eb06e..0000000000 --- a/nano/templates/ntnet_dos.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -{{:helper.syndicateMode()}} -{{if data.error}} - ##SYSTEM ERROR: {{:data.error}}{{:helper.link('RESET', null, { 'PRG_reset' : 1 })}} -{{else data.target}} - ##DoS traffic generator active. Tx: {{:data.speed}}GQ/s
- {{for data.dos_strings}} - {{:value}}
- {{/for}} - {{:helper.link('ABORT', null, { 'PRG_reset' : 1 })}} -{{else}} - ##DoS traffic generator ready. Select target device.
- {{if data.focus}} - Targeted device ID: {{:data.focus}} - {{else}} - Targeted device ID: None - {{/if}} - {{:helper.link('EXECUTE', null, { 'PRG_execute' : 1 })}}
- Detected devices on network:
- {{for data.relays}} - {{:helper.link(value , null, { 'PRG_target_relay' : value })}} - {{/for}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/ntnet_downloader.tmpl b/nano/templates/ntnet_downloader.tmpl deleted file mode 100644 index e1682335c0..0000000000 --- a/nano/templates/ntnet_downloader.tmpl +++ /dev/null @@ -1,103 +0,0 @@ -Welcome to the software download utility. Please select which software you wish to download.
-{{if data.error}} -

Download Error

-
- Information: -
-
- {{:data.error}} -
-
- Reset Program: -
-
- {{:helper.link("RESET", null, {'PRG_reseterror' : 1})}} -
-
-{{/if}} - -

{{:data.downloadname ? 'Download Running' : 'No Downloads In Progress'}}

- {{:data.downloadname ? 'Please wait...' : 'Standing by...'}} -
-
- File name: -
-
- {{:data.downloadname ? data.downloadname : 'N/A'}} -
-
- File description: -
-
- {{:data.downloadname ? data.downloaddesc : 'N/A'}} -
-
- File size: -
-
- {{:data.downloadname ? (data.downloadcompletion + 'GQ / ' + data.downloadsize + 'GQ') : 'N/A'}} -
-
- Transfer Rate: -
-
- {{:data.downloadname ? data.downloadspeed : '0'}} GQ/s -
-
- Download progress: -
-
- {{:helper.displayBar(data.downloadcompletion, 0, data.downloadname ? data.downloadsize : 0, 'good')}} -
-
- -

- -

Downloads Queue

-
- {{for data.downloads_queue}} -
- {{:index + 1}}: -
-
- {{:value}} - {{:helper.link('', 'close', {'PRG_removequeued' : value})}} -
- {{empty}} - The queue is currently empty. - {{/for}} -
-

- -

Primary software repository

-
- Hard drive: -
-
- {{:helper.displayBar(data.disk_used, 0, data.disk_size, 'good')}} - {{:data.disk_used}}GQ / {{:data.disk_size}}GQ -
- - {{for data.downloadable_programs}} -
{{:helper.link('', value.icon, {'PRG_downloadfile' : value.filename})}} - {{:value.filedesc}} - {{:value.fileinfo}} - {{:value.size}} GQ - - {{/for}} -
- {{if data.hackedavailable}} -

*UNKNOWN* software repository

- Please note that NanoTrasen does not recommend download of software from non-official servers. - - {{for data.hacked_programs}} -
{{:helper.link('', value.icon, {'PRG_downloadfile' : value.filename})}} - {{:value.filedesc}} - {{:value.fileinfo}} - {{:value.size}} GQ - - {{/for}} -
- {{/if}} - -


NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559 \ No newline at end of file diff --git a/nano/templates/ntnet_monitor.tmpl b/nano/templates/ntnet_monitor.tmpl deleted file mode 100644 index 3ab1f307c3..0000000000 --- a/nano/templates/ntnet_monitor.tmpl +++ /dev/null @@ -1,112 +0,0 @@ -

WIRELESS CONNECTIVITY

-
-
- Active NTNet Relays: -
-
- {{:data.ntnetrelays}} -
- {{if data.ntnetrelays}} -
- System status: -
-
- {{:data.ntnetstatus ? "ENABLED" : "DISABLED"}} -
-
- Control: -
-
- {{:helper.link('TOGGLE', null, {'toggleWireless' : 1})}} -
-
- Caution - Disabling wireless transmitters when using wireless device may prevent you from re-enabling them again! - {{else}} - -

Wireless coverage unavailable, no relays are connected.

- {{/if}} - -

FIREWALL CONFIGURATION

- - - - - - -
PROTOCOL - STATUS - CONTROL -
Software Downloads - {{:data.config_softwaredownload ? 'ENABLED' : 'DISABLED'}} - {{:helper.link('TOGGLE', null, {'toggle_function' : 1})}} -
Peer to Peer Traffic - {{:data.config_peertopeer ? 'ENABLED' : 'DISABLED'}} - {{:helper.link('TOGGLE', null, {'toggle_function' : 2})}} -
Communication Systems - {{:data.config_communication ? 'ENABLED' : 'DISABLED'}} - {{:helper.link('TOGGLE', null, {'toggle_function' : 3})}} -
Remote System Control - {{:data.config_systemcontrol ? 'ENABLED' : 'DISABLED'}} - {{:helper.link('TOGGLE', null, {'toggle_function' : 4})}} -
- -

SECURITY SYSTEMS

- {{if data.idsalarm}} -
-
-
-

NETWORK INCURSION DETECTED

- An abnormal activity has been detected in the network. Please verify system logs for more information -
-
-
- {{/if}} -
-
- Intrusion Detection System: -
-
- {{:data.idsstatus ? 'ENABLED' : 'DISABLED'}} -
-
-
-
- Maximal Log Count: -
-
- {{:data.ntnetmaxlogs}} -
-
-
-
- Blacklisted NIDs: -
-
- {{:data.banned_nids}} -
-
-
-
- Controls: -
-
- -
{{:helper.link('RESET IDS', null, {'resetIDS' : 1})}} -
{{:helper.link('TOGGLE IDS', null, {'toggleIDS' : 1})}} -
{{:helper.link('SET LOG LIMIT', null, {'updatemaxlogs' : 1})}} -
{{:helper.link('PURGE LOGS', null, {'purgelogs' : 1})}} -
{{:helper.link('ADD BLACKLIST ENTRY', null, {'ban_nid' : 1})}} -
{{:helper.link('REMOVE BLACKLIST ENTRY', null, {'unban_nid' : 1})}} -
-
-
- System Logs -
-
-
- {{for data.ntnetlogs}} - {{:value}}
- {{/for}} -
-
-
\ No newline at end of file diff --git a/nano/templates/ntnet_transfer.tmpl b/nano/templates/ntnet_transfer.tmpl deleted file mode 100644 index e7a9da892a..0000000000 --- a/nano/templates/ntnet_transfer.tmpl +++ /dev/null @@ -1,94 +0,0 @@ -{{if data.error}} -
-

An error has occured during operation...

- Additional information: {{:data.error}}
- {{:helper.link('Clear', null, {'PRG_reset' : 1})}} -
-{{else data.downloading}} -

Download in progress...

-
- Downloaded file: -
-
- {{:data.download_name}} -
-
- Download progress: -
-
- {{:data.download_progress}} / {{:data.download_size}} GQ -
-
- Transfer speed: -
-
- {{:data.download_netspeed}}GQ/s -
-
- Controls: -
-
- {{:helper.link('Abort download', null, {'PRG_reset' : 1})}} -
-{{else data.uploading}} -

Server enabled

-
- Connected clients: -
-
- {{:data.upload_clients}} -
-
- Provided file: -
-
- {{:data.upload_filename}} -
-
- Server password: -
-
- {{if data.haspassword}} - ENABLED - {{else}} - DISABLED - {{/if}} -
-
- Commands: -
-
- {{:helper.link('Set password', null, {'PRG_setpassword' : 1})}} - {{:helper.link('Exit server', null, {'PRG_reset' : 1})}} -
-{{else data.upload_filelist}} -

File transfer server ready. Select file to upload:

- -
File nameFile sizeControls - {{for data.upload_filelist}} -
{{:value.filename}} - {{:value.size}}GQ - {{:helper.link('Select', null, {'PRG_uploadfile' : value.uid})}} - {{/for}} -
-
- {{:helper.link('Set password', null, { "PRG_setpassword" : 1 })}} - {{:helper.link('Return', null, { "PRG_reset" : 1 })}} -{{else}} -

Available files:

-
Server UIDFile NameFile SizePassword ProtectionOperations - {{for data.servers}} -
{{:value.uid}} - {{:value.filename}} - {{:value.size}}GQ - {{if value.haspassword}} - Enabled - {{else}} - Disabled - {{/if}} - {{:helper.link('Download', null, { "PRG_downloadfile" : value.uid })}} - {{/for}} -
-
- {{:helper.link('Send file', null, { "PRG_uploadmenu" : 1 })}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/revelation.tmpl b/nano/templates/revelation.tmpl deleted file mode 100644 index 2ecfad08c2..0000000000 --- a/nano/templates/revelation.tmpl +++ /dev/null @@ -1,23 +0,0 @@ -{{:helper.syndicateMode()}} -
-
- Payload status: -
-
- {{if data.armed}} - ARMED - {{else}} - DISARMED - {{/if}} -
-
- Controls: -
-
- -
{{:helper.link('OBFUSCATE PROGRAM NAME', null, { 'PRG_obfuscate' : 1 })}} -
{{:helper.link(data.armed ? 'DISARM' : 'ARM', null, { 'PRG_arm' : 1 })}} - {{:helper.link('ACTIVATE', 'radiation', { 'PRG_activate' : 1 }, data.armed ? null : 'disabled', data.armed ? 'redButton' : null)}} -
-
-
\ No newline at end of file diff --git a/nano/templates/word_processor.tmpl b/nano/templates/word_processor.tmpl deleted file mode 100644 index 0a786f4973..0000000000 --- a/nano/templates/word_processor.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -{{if data.error}} -

An error has occurred:

-Additional information: {{:data.error}}
-Please try again. If the problem persists, contact your system administrator for assistance. -{{:helper.link('Back to menu', null, { "PRG_backtomenu" : 1 })}} -{{else}} -{{if data.browsing}} - {{:helper.link('BACK TO EDITOR', null, { "PRG_closebrowser" : 1 })}} -

Available documents (local):

- -
Name - Size (GQ) - {{for data.files}} -
{{:value.name}} - {{:value.size}}GQ - {{:helper.link('OPEN', null, { "PRG_openfile" : value.name })}} - {{/for}} -
- {{if data.usbconnected}} -

Available documents (portable device):

- -
Name - Size (GQ) - {{for data.usbfiles}} -
{{:value.name}} - {{:value.size}}GQ - {{:helper.link('OPEN', null, { "PRG_openfile" : value.name })}} - {{/for}} -
- {{/if}} -{{else}} -

Document: {{:data.filename}}

-
- {{:helper.link('NEW', null, { "PRG_newfile" : 1 })}} - {{:helper.link('LOAD', null, { "PRG_loadmenu" : 1 })}} - {{:helper.link('SAVE', null, { "PRG_savefile" : 1 })}} - {{:helper.link('SAVE AS', null, { "PRG_saveasfile" : 1 })}} -
-
- {{:helper.link('EDIT', null, { "PRG_editfile" : 1 })}} - {{:helper.link('PREVIEW', null, { "PRG_txtrpeview" : 1 }, data.filedata ? null : 'disabled')}} - {{:helper.link('FORMATTING HELP', null, { "PRG_taghelp" : 1 })}} - {{:helper.link('PRINT', null, { "PRG_printfile" : 1 })}} -

-
- {{:data.filedata}} -
-{{/if}} -{{/if}} diff --git a/tgui/packages/tgui/constants.js b/tgui/packages/tgui/constants.js index c8155e1229..85a6d53b6b 100644 --- a/tgui/packages/tgui/constants.js +++ b/tgui/packages/tgui/constants.js @@ -21,6 +21,18 @@ export const COLORS = { centcom: '#00c100', other: '#c38312', }, + manifest: { + command: "#3333FF", + security: "#8e0000", + medical: "#006600", + engineering: "#b27300", + science: "#a65ba6", + cargo: "#bb9040", + planetside: "#555555", + civilian: "#a32800", + miscellaneous: "#666666", + silicon: "#222222", + }, // Damage type colors damageType: { oxy: '#3498db', diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole.js b/tgui/packages/tgui/interfaces/CommunicationsConsole.js new file mode 100644 index 0000000000..d76abba47d --- /dev/null +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole.js @@ -0,0 +1,347 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Button, LabeledList, Box, Section } from '../components'; +import { Window } from '../layouts'; + +export const CommunicationsConsole = (props, context) => { + return ( + + + + + + ); +}; + +export const CommunicationsConsoleContent = (props, context) => { + const { act, data } = useBackend(context); + + const { + menu_state, + } = data; + + let mainTemplate = ( + + ERRROR. Unknown menu_state: {menu_state} + Please report this to NT Technical Support. + + ); + + // 1 = main screen + if (menu_state === 1) { + mainTemplate = ; + } else if (menu_state === 2) { + // 2 = status screen + mainTemplate = ; + } else if (menu_state === 3) { + // 3 = messages screen + mainTemplate = ; + } + + return ( + + + {mainTemplate} + + ); +}; + +const CommunicationsConsoleMain = (props, context) => { + const { act, data } = useBackend(context); + + const { + messages, + msg_cooldown, + emagged, + cc_cooldown, + str_security_level, + levels, + authmax, + security_level, + security_level_color, + authenticated, + atcsquelch, + boss_short, + } = data; + + let reportText = "View (" + messages.length + ")"; + let announceText = "Make Priority Announcement"; + if (msg_cooldown > 0) { + announceText += " (" + msg_cooldown + "s)"; + } + let ccMessageText = emagged ? "Message [UNKNOWN]" : "Message " + boss_short; + if (cc_cooldown > 0) { + ccMessageText += " (" + cc_cooldown + "s)"; + } + + let alertLevelText = str_security_level; + let alertLevelButtons = levels.map(slevel => { + return ( + + + ))} + + ) || ( +
+ +
+ )} + + )} + + ); +}; + +export const IdentificationComputerRegions = (props, context) => { + const { act, data } = useBackend(context); + + const { + actName, + } = props; + + const { + regions, + } = data; + + return ( + + {sortBy(r => r.name)(regions).map(region => ( + +
+ {sortBy(a => a.desc)(region.accesses).map(access => ( + + + + ))} +
+
+ ))} +
+ ); +}; + + +export const IdentificationComputerCrewManifest = (props, context) => { + const { act, data } = useBackend(context); + + const { + manifest, + } = data; + + return ( +
+ {manifest.map(cat => !!cat.elems.length && ( +
+ + {cat.cat} + + + )} + key={cat.cat} + level={2}> + + + Name + Rank + Active + + {cat.elems.map(person => ( + + {person.name} + {person.rank} + {person.active} + + ))} +
+
+ ))} +
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosAccessDecrypter.js b/tgui/packages/tgui/interfaces/NtosAccessDecrypter.js new file mode 100644 index 0000000000..8091267666 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosAccessDecrypter.js @@ -0,0 +1,79 @@ +import { useBackend } from "../backend"; +import { NtosWindow } from "../layouts"; +import { IdentificationComputerRegions } from "./IdentificationComputer"; +import { NoticeBox, Box, Section, Button } from "../components"; + +export const NtosAccessDecrypter = (props, context) => { + const { act, data } = useBackend(context); + + const { + message, + running, + rate, + factor, + regions, + } = data; + + const generate10String = length => { + let outString = ""; + while (outString.length < length) { + if (Math.random() > factor) { + outString += "0"; + } else { + outString += "1"; + } + } + return outString; + }; + + const lineLength = 45; + + return ( + + + {message && ( + {message} + ) || running && ( +
+ Attempting to decrypt network access codes. Please wait. Rate: {rate} PHash/s + + {/* I don't care anymore */} + {generate10String(lineLength)} + + + {generate10String(lineLength)} + + + {generate10String(lineLength)} + + + {generate10String(lineLength)} + + + {generate10String(lineLength)} + + +
+ ) || ( +
+ {regions.length && ( + + ) || ( + + Please insert ID card. + + )} +
+ )} +
+
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosArcade.js b/tgui/packages/tgui/interfaces/NtosArcade.js new file mode 100644 index 0000000000..f0f7241ab8 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosArcade.js @@ -0,0 +1,127 @@ +import { resolveAsset } from '../assets'; +import { useBackend } from '../backend'; +import { AnimatedNumber, Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components'; +import { NtosWindow } from '../layouts'; + +export const NtosArcade = (props, context) => { + const { act, data } = useBackend(context); + return ( + + +
+ + + + + + + + {data.PlayerHitpoints}HP + + + + + {data.PlayerMP}MP + + + + +
+ {data.Status} +
+
+ + + + HP + + +
+ +
+
+
+ +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosCommunicationsConsole.js b/tgui/packages/tgui/interfaces/NtosCommunicationsConsole.js new file mode 100644 index 0000000000..1458184a06 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosCommunicationsConsole.js @@ -0,0 +1,15 @@ +import { useBackend } from "../backend"; +import { NtosWindow } from "../layouts"; +import { CommunicationsConsoleContent } from "./CommunicationsConsole"; + +export const NtosCommunicationsConsole = (props, context) => { + const { act, data } = useBackend(context); + + return ( + + + + + + ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosConfiguration.js b/tgui/packages/tgui/interfaces/NtosConfiguration.js new file mode 100644 index 0000000000..0babb803c1 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosConfiguration.js @@ -0,0 +1,95 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Box, Button, LabeledList, ProgressBar, Section } from '../components'; +import { NtosWindow } from '../layouts'; + +export const NtosConfiguration = (props, context) => { + const { act, data } = useBackend(context); + const { + PC_device_theme, + power_usage, + battery_exists, + battery = {}, + disk_size, + disk_used, + hardware = [], + } = data; + return ( + + +
+ Power Draw: {power_usage}W + + )}> + + + {battery_exists ? ( + + {battery.charge} / {battery.max} + + ) : 'Not Available'} + + +
+
+ + {disk_used} GQ / {disk_size} GQ + +
+
+ {hardware.map(component => ( +
+ {!component.critical && ( + act('PC_toggle_component', { + name: component.name, + })} /> + )} + + Power Usage: {component.powerusage}W + + + )}> + {component.desc} +
+ ))} +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosDigitalWarrant.js b/tgui/packages/tgui/interfaces/NtosDigitalWarrant.js new file mode 100644 index 0000000000..83819f5d56 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosDigitalWarrant.js @@ -0,0 +1,172 @@ +import { useBackend } from '../backend'; +import { Button, Box, LabeledList, ProgressBar, Section, Icon, Table } from '../components'; +import { NtosWindow } from '../layouts'; +import { filter } from 'common/collections'; +import { Fragment } from 'inferno'; + +export const NtosDigitalWarrant = (props, context) => { + const { act, data } = useBackend(context); + + const { + warrantname, + warrantcharges, + warrantauth, + type, + allwarrants, + } = data; + + let body = ; + + if (warrantauth) { + body = ; + } + + return ( + + + {body} + + + ); +}; + +const AllWarrants = (props, context) => { + const { act, data } = useBackend(context); + + const { + allwarrants, + } = data; + + + return ( +
+ +
+ +
+
+ +
+
+ ); +}; + +const WarrantList = (props, context) => { + const { act, data } = useBackend(context); + + const { + type, + } = props; + + const { + allwarrants, + } = data; + + const ourWarrants = filter(w => w.arrestsearch === type)(allwarrants); + + return ( + + + {type === "arrest" ? "Name" : "Location"} + {type === "arrest" ? "Charges" : "Reason"} + Authorized By + Edit + + {ourWarrants.length && ourWarrants.map(warrant => ( + + {warrant.warrantname} + {warrant.charges} + {warrant.auth} + +
+ ); +}; + +const ActiveWarrant = (props, context) => { + const { act, data } = useBackend(context); + + const { + warrantname, + warrantcharges, + warrantauth, + type, + } = data; + + const isArrest = type === "arrest"; + + const warrantnameLabel = type === "arrest" ? "Name" : "Location"; + const warrantchargesLabel = type === "arrest" ? "Charges" : "Reason"; + + return ( +
+ + + + + }> + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosEmailAdministration.js b/tgui/packages/tgui/interfaces/NtosEmailAdministration.js new file mode 100644 index 0000000000..f7c3909a79 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosEmailAdministration.js @@ -0,0 +1,154 @@ +import { round } from 'common/math'; +import { Fragment } from 'inferno'; +import { useBackend } from "../backend"; +import { Box, Button, Flex, Icon, LabeledList, ProgressBar, Section, Table } from "../components"; +import { Window, NtosWindow } from "../layouts"; +import { NtosEmailClientViewMessage } from './NtosEmailClient'; + +export const NtosEmailAdministration = (props, context) => { + const { act, data } = useBackend(context); + + const { + error, + cur_title, + current_account, + } = data; + + let body = ; + + if (error) { + body = ; + } else if (cur_title) { + body = ; + } else if (current_account) { + body = ; + } + + return ( + + + {body} + + + ); +}; + +const MainMenu = (props, context) => { + const { act, data } = useBackend(context); + const { + accounts, + } = data; + return ( +
+ SECURE SYSTEM - Have your identification ready + + Select account to administrate + {accounts.map(account => ( + + ))} +
+ ); +}; + +const EmailError = (props, context) => { + const { act, data } = useBackend(context); + const { + error, + } = data; + return ( +
act("back")}>Back}> + {error} +
+ ); +}; + +const ViewEmail = (props, context) => { + const { act, data } = useBackend(context); + return ( +
+ +
+ ); +}; + +const ViewAccount = (props, context) => { + const { act, data } = useBackend(context); + const { + error, + msg_title, + msg_body, + msg_timestamp, + msg_source, + current_account, + cur_suspended, + messages, + accounts, + } = data; + return ( +
act("back")}> + Back + + }> + + + + + + + + +
+ {messages.length && ( + + + Source + Title + Received at + Actions + + {messages.map(message => ( + + {message.source} + {message.title} + {message.timestamp} + + + + + ))} +
+ ) || ( + No messages found in selected account. + )} +
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosEmailClient.js b/tgui/packages/tgui/interfaces/NtosEmailClient.js new file mode 100644 index 0000000000..15f6825187 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosEmailClient.js @@ -0,0 +1,432 @@ +/* eslint react/no-danger: "off" */ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Button, Box, Section, Table, LabeledList, Input, Tabs, TextArea, Flex, AnimatedNumber, ProgressBar } from '../components'; +import { NtosWindow } from '../layouts'; +import { round } from 'common/math'; + +export const NtosEmailClient = (props, context) => { + const { act, data } = useBackend(context); + + const { + PC_device_theme, + error, + downloading, + current_account, + } = data; + + let content = ; + + if (error) { + content = ; + } else if (downloading) { + content = ; + } else if (current_account) { + content = ; + } + + return ( + + + {content} + + + ); +}; + +const NtosEmailClientDownloading = (props, context) => { + const { act, data } = useBackend(context); + + const { + down_filename, + down_progress, + down_size, + down_speed, + } = data; + + return ( +
+ + + {down_filename} ({down_size} GQ) + + + GQ/s + + + + {down_progress}/{down_size} ({round(down_progress / down_size * 100, 1)}%) + + + +
+ ); +}; + +const NtosEmailClientContent = (props, context) => { + const { act, data } = useBackend(context); + + const { + current_account, + addressbook, + new_message, + cur_title, + } = data; + + let content = ; + + if (addressbook) { + content = ; + } else if (new_message) { + content = ; + } else if (cur_title) { + content = ; + } + + return ( +
+
+ ); +}; + +const NtosEmailClientInbox = (props, context) => { + const { act, data } = useBackend(context); + + const { + current_account, + folder, + messagecount, + messages, + } = data; + + return ( +
+ + act("set_folder", { "set_folder": "Inbox" })}> + Inbox + + act("set_folder", { "set_folder": "Spam" })}> + Spam + + act("set_folder", { "set_folder": "Deleted" })}> + Deleted + + + {messagecount && ( +
+ + + Source + Title + Received At + Actions + + {messages.map(msg => ( + + {msg.source} + {msg.title} + {msg.timestamp} + +
+
+ ) || ( + No emails found in {folder}. + )} +
+ ); +}; + +export const NtosEmailClientViewMessage = (props, context) => { + const { act, data } = useBackend(context); + + // This is used to let NtosEmailAdministration use the same code for spying on emails + // Administrators don't have access to attachments or the message UID, so we need to avoid + // using those data attributes, as well as a slightly different act() model. + const { + administrator, + } = props; + + const { + cur_title, + cur_source, + cur_timestamp, + cur_body, + cur_hasattachment, + cur_attachment_filename, + cur_attachment_size, + cur_uid, + } = data; + + return ( +
act("back")} /> + ) : ( + +
+ ); +}; + +const NtosEmailClientAddressBook = (props, context) => { + const { act, data } = useBackend(context); + + const { + accounts, + } = data; + + return ( +
act("set_recipient", { set_recipient: null })} /> + }> + {accounts.map(acc => ( +
+ ); +}; + +const NtosEmailClientNewMessage = (props, context) => { + const { act, data } = useBackend(context); + + const { + current_account, + msg_title, + msg_recipient, + msg_body, + msg_hasattachment, + msg_attachment_filename, + msg_attachment_size, + } = data; + + return ( +
+ + + ) || ( + + )}> + {msg_hasattachment && ( + + {msg_attachment_filename} ({msg_attachment_size}GQ) + + ) || null} + + + + +
+
+
+
+ +
+ ); +}; + +const NtosEmailClientError = (props, context) => { + const { act } = useBackend(context); + const { + error, + } = props; + return ( +
act("reset")} /> + }> + {error} +
+ ); +}; + +const NtosEmailClientLogin = (props, context) => { + const { act, data } = useBackend(context); + + const { + stored_login, + stored_password, + } = data; + + return ( +
+ + + act("edit_login", { val: val })} /> + + + act("edit_password", { val: val })} /> + + + +
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosFileManager.js b/tgui/packages/tgui/interfaces/NtosFileManager.js new file mode 100644 index 0000000000..9ce8b2fe62 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosFileManager.js @@ -0,0 +1,166 @@ +/* eslint react/no-danger: "off" */ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Button, Box, Section, Table } from '../components'; +import { NtosWindow } from '../layouts'; +import { decodeHtmlEntities } from 'common/string'; + +export const NtosFileManager = (props, context) => { + const { act, data } = useBackend(context); + const { + PC_device_theme, + usbconnected, + filename, + filedata, + error, + files = [], + usbfiles = [], + } = data; + return ( + + + {(filename || error) && ( +
+
+ ) || ( + +
+ act('PRG_copytousb', { name: file })} + onDelete={file => act('PRG_deletefile', { name: file })} + onOpen={file => act('PRG_openfile', { name: file })} + onRename={(file, newName) => act('PRG_rename', { + name: file, + new_name: newName, + })} + onDuplicate={file => act('PRG_clone', { file: file })} /> +
+ {usbconnected && ( +
+ act('PRG_copyfromusb', { name: file })} + onDelete={file => act('PRG_deletefile', { name: file })} + onRename={(file, newName) => act('PRG_rename', { + name: file, + new_name: newName, + })} + onDuplicate={file => act('PRG_clone', { file: file })} /> +
+ ) || null} +
+ +
+
+ )} +
+
+ ); +}; + +const FileTable = props => { + const { + files = [], + usbconnected, + usbmode, + onUpload, + onDelete, + onRename, + onOpen, + } = props; + return ( + + + + File + + + Type + + + Size + + + {files.map(file => ( + + + {!file.undeletable ? ( + + onRename(file.name, value)} /> +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosIdentificationComputer.js b/tgui/packages/tgui/interfaces/NtosIdentificationComputer.js new file mode 100644 index 0000000000..9118a9c1ab --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosIdentificationComputer.js @@ -0,0 +1,20 @@ +import { sortBy } from 'common/collections'; +import { Fragment } from 'inferno'; +import { useBackend } from "../backend"; +import { Box, Button, Flex, Input, LabeledList, Section, Table, Tabs } from "../components"; +import { Window, NtosWindow } from "../layouts"; +import { decodeHtmlEntities } from 'common/string'; +import { COLORS } from "../constants"; +import { IdentificationComputerContent } from "./IdentificationComputer"; + +export const NtosIdentificationComputer = (props, context) => { + const { act, data } = useBackend(context); + + return ( + + + + + + ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosMain.js b/tgui/packages/tgui/interfaces/NtosMain.js new file mode 100644 index 0000000000..7661a0394b --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosMain.js @@ -0,0 +1,145 @@ +import { useBackend } from '../backend'; +import { Button, ColorBox, Section, Table } from '../components'; +import { NtosWindow } from '../layouts'; + +const PROGRAM_ICONS = { + compconfig: 'cog', + ntndownloader: 'download', + filemanager: 'folder', + smmonitor: 'radiation', + alarmmonitor: 'bell', + cardmod: 'id-card', + arcade: 'gamepad', + ntnrc_client: 'comment-alt', + nttransfer: 'exchange-alt', + powermonitor: 'plug', + job_manage: 'address-book', + crewmani: 'clipboard-list', + robocontrol: 'robot', + atmosscan: 'thermometer-half', + shipping: 'tags', +}; + +export const NtosMain = (props, context) => { + const { act, data } = useBackend(context); + const { + device_theme, + programs = [], + has_light, + light_on, + comp_light_color, + removable_media = [], + login = [], + } = data; + return ( + + + {!!has_light && ( +
+ + +
+ )} +
act('PC_Eject_Disk', { name: "ID" })} + /> + )}> + + + ID Name: {login.IDName} + + + Assignment: {login.IDJob} + +
+
+ {!!removable_media.length && ( +
+ + {removable_media.map(device => ( + + +
+
+ )} +
+ + {programs.map(program => ( + + + + + + ))} +
+
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosNetChat.js b/tgui/packages/tgui/interfaces/NtosNetChat.js new file mode 100644 index 0000000000..0677d30ebf --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosNetChat.js @@ -0,0 +1,168 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Box, Button, Icon, Input, Section, Table } from '../components'; +import { NtosWindow } from '../layouts'; + +export const NtosNetChat = (props, context) => { + const { act, data } = useBackend(context); + const { + can_admin, + adminmode, + authed, + username, + active_channel, + is_operator, + all_channels = [], + clients = [], + messages = [], + } = data; + const in_channel = (active_channel !== null); + const authorized = (authed || adminmode); + return ( + + +
+ + + + + act('PRG_newchannel', { + new_channel_name: value, + })} /> + {all_channels.map(channel => ( +
+
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosNetDos.js b/tgui/packages/tgui/interfaces/NtosNetDos.js new file mode 100644 index 0000000000..f2768e792a --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosNetDos.js @@ -0,0 +1,117 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Box, Button, LabeledList, NoticeBox, Section } from '../components'; +import { NtosWindow } from '../layouts'; + +export const NtosNetDos = (props, context) => { + return ( + + + + + + ); +}; + +export const NtosNetDosContent = (props, context) => { + const { act, data } = useBackend(context); + + const { + relays = [], + focus, + target, + speed, + overload, + capacity, + error, + } = data; + + if (error) { + return ( + + + {error} + + + ) || ( + + + + )}> + {banned_nids.join(", ") || "None"} + + + + }> + Additional Information: {error} + + ); +}; + +const P2PDownload = (props, context) => { + const { act, data } = useBackend(context); + const { + download_name, + download_progress, + download_size, + download_netspeed, + } = data; + return ( +
+ + + {download_name} + + + + {download_progress} / {download_size} GQ + + + + {download_netspeed} GQ/s + + + + + +
+ ); +}; + +const P2PUpload = (props, context) => { + const { act, data } = useBackend(context); + const { + upload_clients, + upload_filename, + upload_haspassword, + } = data; + return ( +
+ + + {upload_clients} + + + {upload_filename} + + + {upload_haspassword ? "Enabled" : "Disabled"} + + + + + + +
+ ); +}; + +const P2PUploadServer = (props, context) => { + const { act, data } = useBackend(context); + const { + upload_filelist, + } = data; + return ( +
act("PRG_reset")}> + Cancel + + }> + +
+ {upload_filelist.map(file => ( + + ))} +
+
+ ); +}; + +const P2PAvailable = (props, context) => { + const { act, data } = useBackend(context); + const { + servers, + } = data; + return ( +
act("PRG_uploadmenu")}> + Send File + + }> + {servers.length && ( + + {servers.map(server => ( + + {!!server.haspassword && } + {server.filename}  + ({server.size}GQ)  + + + ))} + + ) || ( + + No upload servers found. + + )} +
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosNewsBrowser.js b/tgui/packages/tgui/interfaces/NtosNewsBrowser.js new file mode 100644 index 0000000000..fee7ba77ea --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosNewsBrowser.js @@ -0,0 +1,150 @@ +/* eslint react/no-danger: "off" */ +import { useBackend } from '../backend'; +import { Button, LabeledList, ProgressBar, Section, NoticeBox } from '../components'; +import { NtosWindow } from '../layouts'; +import { resolveAsset } from '../assets'; +import { Fragment } from 'inferno'; + +export const NtosNewsBrowser = (props, context) => { + const { act, data } = useBackend(context); + + const { + article, + download, + message, + } = data; + + let body = ; + + if (article) { + body = ; + } else if (download) { + body = ; + } + + return ( + + + {!!message && {message} + + + }> + {!!cover && } + {/* News articles are written in premade .html files and cannot be edited by players, so it should be + * safe enough to use dangerouslySetInnerHTML here. + */} +
+ + ); +}; + +const ViewArticles = (props, context) => { + const { act, data } = useBackend(context); + + const { + showing_archived, + all_articles, + } = data; + + return ( +
act("PRG_toggle_archived")} + checked={showing_archived}> + Show Archived + + }> + + {all_articles.length && all_articles.map(article => ( + act("PRG_openarticle", { uid: article.uid })} /> + }> + {article.size} GQ + + )) || ( + + There appear to be no outstanding news articles on NTNet today. + + )} + +
+ ); +}; + +const ArticleDownloading = (props, context) => { + const { act, data } = useBackend(context); + + const { + download_progress, + download_maxprogress, + download_rate, + } = data.download; + + return ( +
+ + + + {download_progress} / {download_maxprogress} GQ + + + + {download_rate} GQ/s + + + + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosRevelation.js b/tgui/packages/tgui/interfaces/NtosRevelation.js new file mode 100644 index 0000000000..6431375011 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosRevelation.js @@ -0,0 +1,42 @@ +import { Section, Button, LabeledList } from '../components'; +import { useBackend } from '../backend'; +import { NtosWindow } from '../layouts'; + +export const NtosRevelation = (props, context) => { + const { act, data } = useBackend(context); + return ( + + +
+ act('PRG_obfuscate', { + new_name: value, + })} + mb={1} /> + + act('PRG_arm')} /> + )} /> + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosUAV.js b/tgui/packages/tgui/interfaces/NtosUAV.js new file mode 100644 index 0000000000..48b22b14c7 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosUAV.js @@ -0,0 +1,76 @@ +import { useBackend } from "../backend"; +import { Box, Button, Flex, LabeledList, Section } from "../components"; +import { NtosWindow } from "../layouts"; + +export const NtosUAV = (props, context) => { + const { act, data } = useBackend(context); + + const { + current_uav, + signal_strength, + in_use, + paired_uavs, + } = data; + + return ( + + +
+ + + {current_uav && current_uav.status || "[Not Connected]"} + + + {current_uav && signal_strength || "[Not Connected]"} + + + {current_uav && ( + + ) || "[Not Connected]"} + + + {current_uav && ( + + ) || "[Not Connected]"} + + +
+
+ {paired_uavs.length && paired_uavs.map(uav => ( + + + + + +
+
+
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/interfaces/NtosWordProcessor.js b/tgui/packages/tgui/interfaces/NtosWordProcessor.js new file mode 100644 index 0000000000..a1ef22dca0 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosWordProcessor.js @@ -0,0 +1,114 @@ +/* eslint react/no-danger: "off" */ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Button, Box, Section, Table } from '../components'; +import { NtosWindow } from '../layouts'; + +export const NtosWordProcessor = (props, context) => { + const { act, data } = useBackend(context); + + const { + PC_device_theme, + error, + browsing, + files, + usbconnected, + usbfiles, + filename, + filedata, + } = data; + + return ( + + + {error && ( + +

An Error has occured:

+ Additional Information: {error} + Please try again. If the problem persists, contact your system administrator for assistance. + + + + +
+ + + + + + + {/* This dangerouslySetInnerHTML is only ever passed data that has passed through pencode2html + * It should be safe enough to support pencode in this way. + */} +
+
+
+ + )} +
+
+ ); +}; \ No newline at end of file diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index e3c32457d2..73af0a882a 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -1,19 +1,19 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=196)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(411);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=o[e])}))},function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.selectBackend=t.sendAct=t.sendMessage=t.backendMiddleware=t.backendReducer=t.backendSuspendSuccess=t.backendSuspendStart=t.backendSetSharedState=t.backendUpdate=void 0;var o=n(170),r=n(39),a=n(92);var i=(0,n(24).createLogger)("backend");t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var c=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=c;t.backendSuspendStart=function(){return{type:"backend/suspendStart"}};t.backendSuspendSuccess=function(){return{type:"backend/suspendSuccess",payload:{timestamp:Date.now()}}};var l={config:{},data:{}};t.backendReducer=function(e,t){void 0===e&&(e=l);var n=t.type,o=t.payload;if("backend/update"===n){var a=Object.assign({},e.config,{},o.config),i=Object.assign({},e.data,{},o.static_data,{},o.data),c=Object.assign({},e.shared);if(o.shared)for(var d=0,u=Object.keys(o.shared);d=0||(r[n]=e[n]);return r}(t,["payload"]),r=Object.assign({tgui:1,window_id:window.__windowId__},o);null!==n&&n!==undefined&&(r.payload=JSON.stringify(n)),Byond.topic(r)};t.sendMessage=d;var u=function(e,t){void 0===t&&(t={}),"object"!=typeof t||null===t||Array.isArray(t)?i.error("Payload for act() must be an object, got this:",t):d({type:"act/"+e,payload:t})};t.sendAct=u;var s=function(e){return e.backend||{}};t.selectBackend=s;t.useBackend=function(e){var t=e.store,n=s(t.getState());return Object.assign({},n,{act:u})};t.useLocalState=function(e,t,n){var o,r=e.store,a=null!=(o=s(r.getState()).shared)?o:{},i=t in a?a[t]:n;return[i,function(e){r.dispatch(c(t,"function"==typeof e?e(i):e))}]};t.useSharedState=function(e,t,n){var o,r=e.store,a=null!=(o=s(r.getState()).shared)?o:{},i=t in a?a[t]:n;return[i,function(e){d({type:"setSharedState",key:t,value:JSON.stringify("function"==typeof e?e(i):e)||""})}]}}).call(this,n(427).setImmediate)},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=t.Tabs=t.Table=t.Slider=t.Section=t.ProgressBar=t.NumberInput=t.NoticeBox=t.Modal=t.NanoMap=t.LabeledList=t.LabeledControls=t.Knob=t.Input=t.Icon=t.Grid=t.Flex=t.Dropdown=t.DraggableControl=t.Divider=t.Dimmer=t.ColorBox=t.Collapsible=t.Chart=t.ByondUi=t.Button=t.Box=t.BlockQuote=t.AnimatedNumber=void 0;var o=n(124);t.AnimatedNumber=o.AnimatedNumber;var r=n(436);t.BlockQuote=r.BlockQuote;var a=n(18);t.Box=a.Box;var i=n(125);t.Button=i.Button;var c=n(437);t.ByondUi=c.ByondUi;var l=n(439);t.Chart=l.Chart;var d=n(440);t.Collapsible=d.Collapsible;var u=n(441);t.ColorBox=u.ColorBox;var s=n(176);t.Dimmer=s.Dimmer;var m=n(177);t.Divider=m.Divider;var p=n(127);t.DraggableControl=p.DraggableControl;var f=n(442);t.Dropdown=f.Dropdown;var h=n(178);t.Flex=h.Flex;var C=n(443);t.Grid=C.Grid;var b=n(126);t.Icon=b.Icon;var N=n(444);t.Input=N.Input;var g=n(445);t.Knob=g.Knob;var V=n(446);t.LabeledControls=V.LabeledControls;var v=n(447);t.LabeledList=v.LabeledList;var y=n(448);t.NanoMap=y.NanoMap;var k=n(449);t.Modal=k.Modal;var _=n(450);t.NoticeBox=_.NoticeBox;var x=n(129);t.NumberInput=x.NumberInput;var L=n(451);t.ProgressBar=L.ProgressBar;var B=n(452);t.Section=B.Section;var w=n(453);t.Slider=w.Slider;var S=n(128);t.Table=S.Table;var I=n(454);t.Tabs=I.Tabs;var T=n(175);t.Tooltip=T.Tooltip},function(e,t,n){"use strict";t.__esModule=!0,t.Window=t.NtosWindow=t.refocusLayout=t.Layout=void 0;var o=n(123);t.Layout=o.Layout,t.refocusLayout=o.refocusLayout;var r=n(435);t.NtosWindow=r.NtosWindow;var a=n(179);t.Window=a.Window},function(e,t,n){"use strict";var o=n(7),r=n(23).f,a=n(32),i=n(26),c=n(94),l=n(137),d=n(67);e.exports=function(e,t){var n,u,s,m,p,f=e.target,h=e.global,C=e.stat;if(n=h?o:C?o[f]||c(f,{}):(o[f]||{}).prototype)for(u in t){if(m=t[u],s=e.noTargetGet?(p=r(n,u))&&p.value:n[u],!d(h?u:f+(C?".":"#")+u,e.forced)&&s!==undefined){if(typeof m==typeof s)continue;l(m,s)}(e.sham||s&&s.sham)&&a(m,"sham",!0),i(n,u,m,e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.keyOfMatchingRange=t.inRange=t.toFixed=t.round=t.scale=t.clamp01=t.clamp=void 0;t.clamp=function(e,t,n){return en?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,a=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(a>0)),(r?e:Math.round(e))/n);var n,o,r,a};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n",apos:"'",trade:"\u2122"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos|trade);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";t.__esModule=!0,t.isFalsy=t.pureComponentHooks=t.shallowDiffers=t.normalizeChildren=t.classes=void 0;t.classes=function(e){for(var t="",n=0;n0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(7),r=n(96),a=n(20),i=n(64),c=n(100),l=n(140),d=r("wks"),u=o.Symbol,s=l?u:u&&u.withoutSetter||i;e.exports=function(e){return a(d,e)||(c&&a(u,e)?d[e]=u[e]:d[e]=s("Symbol."+e)),d[e]}},function(e,t,n){"use strict";var o=n(11),r=n(134),a=n(12),i=n(36),c=Object.defineProperty;t.f=o?c:function(e,t,n){if(a(e),t=i(t,!0),a(n),r)try{return c(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var o=n(25);e.exports=function(e){return Object(o(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.Box=t.computeBoxClassName=t.computeBoxProps=t.halfUnit=t.unit=void 0;var o=n(9),r=n(0),a=n(434),i=n(39);var c=function(e){return"string"==typeof e?e.endsWith("px")&&!Byond.IS_LTE_IE8?parseFloat(e)/12+"rem":e:"number"==typeof e?Byond.IS_LTE_IE8?12*e+"px":e+"rem":void 0};t.unit=c;var l=function(e){return"string"==typeof e?c(e):"number"==typeof e?c(.5*e):void 0};t.halfUnit=l;var d=function(e){return"string"==typeof e&&i.CSS_COLORS.includes(e)},u=function(e){return function(t,n){(0,o.isFalsy)(n)||(t[e]=n)}},s=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t(r))}},m=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t)}},p=function(e,t,n){return function(r,a){if(!(0,o.isFalsy)(a))for(var i=0;i0&&(t.style=l),t};t.computeBoxProps=C;var b=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,o.classes)([d(t)&&"color-"+t,d(n)&&"color-bg-"+n])};t.computeBoxClassName=b;var N=function(e){var t=e.as,n=void 0===t?"div":t,o=e.className,i=e.children,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["as","className","children"]);if("function"==typeof i)return i(C(e));var l="string"==typeof o?o+" "+b(c):b(c),d=C(c);return(0,r.createVNode)(a.VNodeFlags.HtmlElement,n,l,i,a.ChildFlags.UnknownChildren,d)};t.Box=N,N.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;nt?2+3*d-c:0;return((0,o.toFixed)(m,p)+" "+s+n).trim()}; +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=199)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(414);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=o[e])}))},function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.selectBackend=t.sendAct=t.sendMessage=t.backendMiddleware=t.backendReducer=t.backendSuspendSuccess=t.backendSuspendStart=t.backendSetSharedState=t.backendUpdate=void 0;var o=n(171),r=n(32),a=n(93);var i=(0,n(24).createLogger)("backend");t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var c=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=c;t.backendSuspendStart=function(){return{type:"backend/suspendStart"}};t.backendSuspendSuccess=function(){return{type:"backend/suspendSuccess",payload:{timestamp:Date.now()}}};var l={config:{},data:{}};t.backendReducer=function(e,t){void 0===e&&(e=l);var n=t.type,o=t.payload;if("backend/update"===n){var a=Object.assign({},e.config,{},o.config),i=Object.assign({},e.data,{},o.static_data,{},o.data),c=Object.assign({},e.shared);if(o.shared)for(var d=0,u=Object.keys(o.shared);d=0||(r[n]=e[n]);return r}(t,["payload"]),r=Object.assign({tgui:1,window_id:window.__windowId__},o);null!==n&&n!==undefined&&(r.payload=JSON.stringify(n)),Byond.topic(r)};t.sendMessage=d;var u=function(e,t){void 0===t&&(t={}),"object"!=typeof t||null===t||Array.isArray(t)?i.error("Payload for act() must be an object, got this:",t):d({type:"act/"+e,payload:t})};t.sendAct=u;var s=function(e){return e.backend||{}};t.selectBackend=s;t.useBackend=function(e){var t=e.store,n=s(t.getState());return Object.assign({},n,{act:u})};t.useLocalState=function(e,t,n){var o,r=e.store,a=null!=(o=s(r.getState()).shared)?o:{},i=t in a?a[t]:n;return[i,function(e){r.dispatch(c(t,"function"==typeof e?e(i):e))}]};t.useSharedState=function(e,t,n){var o,r=e.store,a=null!=(o=s(r.getState()).shared)?o:{},i=t in a?a[t]:n;return[i,function(e){d({type:"setSharedState",key:t,value:JSON.stringify("function"==typeof e?e(i):e)||""})}]}}).call(this,n(430).setImmediate)},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=t.Tabs=t.Table=t.Slider=t.Section=t.ProgressBar=t.NumberInput=t.NoticeBox=t.Modal=t.NanoMap=t.LabeledList=t.LabeledControls=t.Knob=t.Input=t.Icon=t.Grid=t.Flex=t.Dropdown=t.DraggableControl=t.Divider=t.Dimmer=t.ColorBox=t.Collapsible=t.Chart=t.ByondUi=t.Button=t.Box=t.BlockQuote=t.AnimatedNumber=void 0;var o=n(124);t.AnimatedNumber=o.AnimatedNumber;var r=n(439);t.BlockQuote=r.BlockQuote;var a=n(19);t.Box=a.Box;var i=n(125);t.Button=i.Button;var c=n(440);t.ByondUi=c.ByondUi;var l=n(442);t.Chart=l.Chart;var d=n(443);t.Collapsible=d.Collapsible;var u=n(444);t.ColorBox=u.ColorBox;var s=n(177);t.Dimmer=s.Dimmer;var m=n(178);t.Divider=m.Divider;var p=n(127);t.DraggableControl=p.DraggableControl;var h=n(445);t.Dropdown=h.Dropdown;var f=n(179);t.Flex=f.Flex;var C=n(446);t.Grid=C.Grid;var N=n(126);t.Icon=N.Icon;var b=n(447);t.Input=b.Input;var g=n(448);t.Knob=g.Knob;var V=n(449);t.LabeledControls=V.LabeledControls;var v=n(450);t.LabeledList=v.LabeledList;var k=n(451);t.NanoMap=k.NanoMap;var y=n(452);t.Modal=y.Modal;var _=n(453);t.NoticeBox=_.NoticeBox;var B=n(129);t.NumberInput=B.NumberInput;var L=n(454);t.ProgressBar=L.ProgressBar;var w=n(455);t.Section=w.Section;var x=n(456);t.Slider=x.Slider;var S=n(128);t.Table=S.Table;var I=n(457);t.Tabs=I.Tabs;var T=n(176);t.Tooltip=T.Tooltip},function(e,t,n){"use strict";t.__esModule=!0,t.Window=t.NtosWindow=t.refocusLayout=t.Layout=void 0;var o=n(123);t.Layout=o.Layout,t.refocusLayout=o.refocusLayout;var r=n(438);t.NtosWindow=r.NtosWindow;var a=n(180);t.Window=a.Window},function(e,t,n){"use strict";var o=n(8),r=n(23).f,a=n(33),i=n(26),c=n(95),l=n(138),d=n(67);e.exports=function(e,t){var n,u,s,m,p,h=e.target,f=e.global,C=e.stat;if(n=f?o:C?o[h]||c(h,{}):(o[h]||{}).prototype)for(u in t){if(m=t[u],s=e.noTargetGet?(p=r(n,u))&&p.value:n[u],!d(f?u:h+(C?".":"#")+u,e.forced)&&s!==undefined){if(typeof m==typeof s)continue;l(m,s)}(e.sham||s&&s.sham)&&a(m,"sham",!0),i(n,u,m,e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.keyOfMatchingRange=t.inRange=t.toFixed=t.round=t.scale=t.clamp01=t.clamp=void 0;t.clamp=function(e,t,n){return en?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,a=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(a>0)),(r?e:Math.round(e))/n);var n,o,r,a};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n",apos:"'",trade:"\u2122"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos|trade);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(76))},function(e,t,n){"use strict";t.__esModule=!0,t.isFalsy=t.pureComponentHooks=t.shallowDiffers=t.normalizeChildren=t.classes=void 0;t.classes=function(e){for(var t="",n=0;n0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(8),r=n(97),a=n(20),i=n(64),c=n(101),l=n(141),d=r("wks"),u=o.Symbol,s=l?u:u&&u.withoutSetter||i;e.exports=function(e){return a(d,e)||(c&&a(u,e)?d[e]=u[e]:d[e]=s("Symbol."+e)),d[e]}},function(e,t,n){"use strict";var o=n(11),r=n(135),a=n(12),i=n(37),c=Object.defineProperty;t.f=o?c:function(e,t,n){if(a(e),t=i(t,!0),a(n),r)try{return c(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(t.style=l),t};t.computeBoxProps=C;var N=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,o.classes)([d(t)&&"color-"+t,d(n)&&"color-bg-"+n])};t.computeBoxClassName=N;var b=function(e){var t=e.as,n=void 0===t?"div":t,o=e.className,i=e.children,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["as","className","children"]);if("function"==typeof i)return i(C(e));var l="string"==typeof o?o+" "+N(c):N(c),d=C(c);return(0,r.createVNode)(a.VNodeFlags.HtmlElement,n,l,i,a.ChildFlags.UnknownChildren,d)};t.Box=b,b.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";var o={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.formatTime=t.formatCommaNumber=t.formatMoney=t.formatPower=t.formatSiUnit=void 0;var o=n(5),r=["f","p","n","\u03bc","m"," ","k","M","G","T","P","E","Z","Y"],a=r.indexOf(" "),i=function(e,t,n){if(void 0===t&&(t=-a),void 0===n&&(n=""),"number"!=typeof e||!Number.isFinite(e))return e;var i=Math.floor(Math.log10(e)),c=Math.floor(Math.max(3*t,i)),l=Math.floor(i/3),d=Math.floor(c/3),u=(0,o.clamp)(a+d,0,r.length),s=r[u],m=e/Math.pow(1e3,d),p=l>t?2+3*d-c:0;return((0,o.toFixed)(m,p)+" "+s+n).trim()}; /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */t.formatSiUnit=i;t.formatPower=function(e,t){return void 0===t&&(t=0),i(e,t,"W")};t.formatMoney=function(e,t){if(void 0===t&&(t=0),!Number.isFinite(e))return e;var n=(0,o.round)(e,t);t>0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,a=n.indexOf(".");-1===a&&(a=r);for(var i="",c=0;c0&&c0})).join(":")}},function(e,t,n){"use strict";var o=n(53),r=n(63),a=n(17),i=n(14),c=n(69),l=[].push,d=function(e){var t=1==e,n=2==e,d=3==e,u=4==e,s=6==e,m=5==e||s;return function(p,f,h,C){for(var b,N,g=a(p),V=r(g),v=o(f,h,3),y=i(V.length),k=0,_=C||c,x=t?_(p,y):n?_(p,0):undefined;y>k;k++)if((m||k in V)&&(N=v(b=V[k],k,g),e))if(t)x[k]=N;else if(N)switch(e){case 3:return!0;case 5:return b;case 6:return k;case 2:l.call(x,b)}else if(u)return!1;return s?-1:d||u?u:x}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6)}},function(e,t,n){"use strict";var o=n(11),r=n(76),a=n(51),i=n(28),c=n(36),l=n(20),d=n(134),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=i(e),t=c(t,!0),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(171); + */t.formatSiUnit=i;t.formatPower=function(e,t){return void 0===t&&(t=0),i(e,t,"W")};t.formatMoney=function(e,t){if(void 0===t&&(t=0),!Number.isFinite(e))return e;var n=(0,o.round)(e,t);t>0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,a=n.indexOf(".");-1===a&&(a=r);for(var i="",c=0;c0&&c0})).join(":")}},function(e,t,n){"use strict";var o=n(53),r=n(63),a=n(18),i=n(14),c=n(69),l=[].push,d=function(e){var t=1==e,n=2==e,d=3==e,u=4==e,s=6==e,m=5==e||s;return function(p,h,f,C){for(var N,b,g=a(p),V=r(g),v=o(h,f,3),k=i(V.length),y=0,_=C||c,B=t?_(p,k):n?_(p,0):undefined;k>y;y++)if((m||y in V)&&(b=v(N=V[y],y,g),e))if(t)B[y]=b;else if(b)switch(e){case 3:return!0;case 5:return N;case 6:return y;case 2:l.call(B,N)}else if(u)return!1;return s?-1:d||u?u:B}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6)}},function(e,t,n){"use strict";var o=n(11),r=n(77),a=n(51),i=n(28),c=n(37),l=n(20),d=n(135),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=i(e),t=c(t,!0),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(172); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var o=0,r=1,a=2,i=3,c=4,l=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r=a){var i=[t].concat(o).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.topic({tgui:1,window_id:window.__windowId__,type:"log",message:i})}},d=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r"+i+""}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(51);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,a,i=n(136),c=n(7),l=n(10),d=n(32),u=n(20),s=n(77),m=n(65),p=c.WeakMap;if(i){var f=new p,h=f.get,C=f.has,b=f.set;o=function(e,t){return b.call(f,e,t),t},r=function(e){return h.call(f,e)||{}},a=function(e){return C.call(f,e)}}else{var N=s("state");m[N]=!0,o=function(e,t){return d(e,N,t),t},r=function(e){return u(e,N)?e[N]:{}},a=function(e){return u(e,N)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(20),r=n(17),a=n(77),i=n(107),c=a("IE_PROTO"),l=Object.prototype;e.exports=i?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.T0C=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.T0C=273.15;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Mercenary",freq:1213,color:"#6D3F40"},{name:"Raider",freq:1277,color:"#6D3F40"},{name:"Special Ops",freq:1341,color:"#5C5C8A"},{name:"AI Private",freq:1343,color:"#FF00FF"},{name:"Response Team",freq:1345,color:"#5C5C8A"},{name:"Supply",freq:1347,color:"#5F4519"},{name:"Service",freq:1349,color:"#6eaa2c"},{name:"Science",freq:1351,color:"#993399"},{name:"Command",freq:1353,color:"#193A7A"},{name:"Medical",freq:1355,color:"#008160"},{name:"Engineering",freq:1357,color:"#A66300"},{name:"Security",freq:1359,color:"#A30000"},{name:"Explorer",freq:1361,color:"#555555"},{name:"Talon",freq:1363,color:"#555555"},{name:"Common",freq:1459,color:"#008000"},{name:"Entertainment",freq:1461,color:"#339966"},{name:"Security(I)",freq:1475,color:"#008000"},{name:"Medical(I)",freq:1485,color:"#008000"}];var o=[{id:"oxygen",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"carbon dioxide",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"phoron",name:"Phoron",label:"Phoron",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"other",name:"Other",label:"Other",color:"white"},{id:"pressure",name:"Pressure",label:"Pressure",color:"average"},{id:"temperature",name:"Temperature",label:"Temperature",color:"yellow"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";var o=n(138),r=n(7),a=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e])||a(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(11),i=n(120),c=n(13),l=n(82),d=n(59),u=n(51),s=n(32),m=n(14),p=n(152),f=n(167),h=n(36),C=n(20),b=n(79),N=n(10),g=n(47),V=n(55),v=n(52).f,y=n(168),k=n(22).forEach,_=n(58),x=n(16),L=n(23),B=n(37),w=n(84),S=B.get,I=B.set,T=x.f,E=L.f,A=Math.round,O=r.RangeError,M=l.ArrayBuffer,P=l.DataView,F=c.NATIVE_ARRAY_BUFFER_VIEWS,D=c.TYPED_ARRAY_TAG,R=c.TypedArray,j=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,z=c.isTypedArray,U=function(e,t){for(var n=0,o=t.length,r=new(W(e))(o);o>n;)r[n]=t[n++];return r},H=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},K=function(e){var t;return e instanceof M||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},G=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Y=function(e,t){return G(e,t=h(t,!0))?u(2,e[t]):E(e,t)},q=function(e,t,n){return!(G(e,t=h(t,!0))&&N(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?T(e,t,n):(e[t]=n.value,e)};a?(F||(L.f=Y,x.f=q,H(j,"buffer"),H(j,"byteOffset"),H(j,"byteLength"),H(j,"length")),o({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:Y,defineProperty:q}),e.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,u="set"+e,h=r[c],C=h,b=C&&C.prototype,x={},L=function(e,t){T(e,t,{get:function(){return function(e,t){var n=S(e);return n.view[l](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=S(e);n&&(o=(o=A(o))<0?0:o>255?255:255&o),r.view[u](t*a+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};F?i&&(C=t((function(e,t,n,o){return d(e,C,c),w(N(t)?K(t)?o!==undefined?new h(t,f(n,a),o):n!==undefined?new h(t,f(n,a)):new h(t):z(t)?U(C,t):y.call(C,t):new h(p(t)),e,C)})),V&&V(C,R),k(v(h),(function(e){e in C||s(C,e,h[e])})),C.prototype=b):(C=t((function(e,t,n,o){d(e,C,c);var r,i,l,u=0,s=0;if(N(t)){if(!K(t))return z(t)?U(C,t):y.call(C,t);r=t,s=f(n,a);var h=t.byteLength;if(o===undefined){if(h%a)throw O("Wrong length");if((i=h-s)<0)throw O("Wrong length")}else if((i=m(o)*a)+s>h)throw O("Wrong length");l=i/a}else l=p(t),r=new M(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new P(r)});u=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1?r-1:0),c=1;c1?o-1:0),a=1;a"+e+"<\/script>"},f=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;f=o?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):((t=d("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=i.length;n--;)delete f.prototype[i[n]];return f()};c[s]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m.prototype=r(e),n=new m,m.prototype=null,n[s]=e):n=f(),t===undefined?n:a(n,t)}},function(e,t,n){"use strict";var o=n(16).f,r=n(20),a=n(15)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&o(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(15),r=n(47),a=n(16),i=o("unscopables"),c=Array.prototype;c[i]==undefined&&a.f(c,i,{configurable:!0,value:r(null)}),e.exports=function(e){c[i][e]=!0}},function(e,t,n){"use strict";var o=n(12),r=n(34),a=n(15)("species");e.exports=function(e,t){var n,i=o(e).constructor;return i===undefined||(n=o(i)[a])==undefined?t:r(n)}},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(139),r=n(98).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(34);e.exports=function(e,t,n){if(o(e),t===undefined)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(36),r=n(16),a=n(51);e.exports=function(e,t,n){var i=o(t);i in e?r.f(e,i,a(0,n)):e[i]=n}},function(e,t,n){"use strict";var o=n(12),r=n(150);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(a){}return function(n,a){return o(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():undefined)},function(e,t,n){"use strict";var o=n(65),r=n(10),a=n(20),i=n(16).f,c=n(64),l=n(73),d=c("meta"),u=0,s=Object.isExtensible||function(){return!0},m=function(e){i(e,d,{value:{objectID:"O"+ ++u,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,d)){if(!s(e))return"F";if(!t)return"E";m(e)}return e[d].objectID},getWeakData:function(e,t){if(!a(e,d)){if(!s(e))return!0;if(!t)return!1;m(e)}return e[d].weakData},onFreeze:function(e){return l&&p.REQUIRED&&s(e)&&!a(e,d)&&m(e),e}};o[d]=!0},function(e,t,n){"use strict";var o=n(35);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(40),r=n(16),a=n(15),i=n(11),c=a("species");e.exports=function(e){var t=o(e),n=r.f;i&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var o=n(25),r="["+n(86)+"]",a=RegExp("^"+r+r+"*"),i=RegExp(r+r+"*$"),c=function(e){return function(t){var n=String(o(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(i,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){"use strict";t.__esModule=!0,t.FullscreenNotice=void 0;var o=n(0),r=n(2);t.FullscreenNotice=function(e,t){var n=e.children,a=e.title,i=void 0===a?"Welcome":a;return(0,o.createComponentVNode)(2,r.Section,{title:i,height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,r.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,r.Flex.Item,{textAlign:"center",mt:"-2rem",children:n})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(8),a=n(1),i=n(2);t.TemporaryNotice=function(e,t){var n,c=e.decode,l=(0,a.useBackend)(t),d=l.act,u=l.data.temp;if(u){var s=((n={})[u.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:c?(0,r.decodeHtmlEntities)(u.text):u.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return d("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";var o=n(6),r=n(35),a="".split;e.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){"use strict";var o=0,r=Math.random();e.exports=function(e){return"Symbol("+String(e===undefined?"":e)+")_"+(++o+r).toString(36)}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(28),r=n(14),a=n(46),i=function(e){return function(t,n,i){var c,l=o(t),d=r(l.length),u=a(i,d);if(e&&n!=n){for(;d>u;)if((c=l[u++])!=c)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){"use strict";var o=n(6),r=/#|\.prototype\./,a=function(e,t){var n=c[i(e)];return n==d||n!=l&&("function"==typeof t?o(t):!!t)},i=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var o=n(139),r=n(98);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(10),r=n(57),a=n(15)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[a])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var o=n(6),r=n(15),a=n(101),i=r("species");e.exports=function(e){return a>=51||!o((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(26);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(12),r=n(103),a=n(14),i=n(53),c=n(104),l=n(147),d=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,s){var m,p,f,h,C,b,N,g=i(t,n,u?2:1);if(s)m=e;else{if("function"!=typeof(p=c(e)))throw TypeError("Target is not iterable");if(r(p)){for(f=0,h=a(e.length);h>f;f++)if((C=u?g(o(N=e[f])[0],N[1]):g(e[f]))&&C instanceof d)return C;return new d(!1)}m=p.call(e)}for(b=m.next;!(N=b.call(m)).done;)if("object"==typeof(C=l(m,g,N.value,u))&&C&&C instanceof d)return C;return new d(!1)}).stop=function(e){return new d(!0,e)}},function(e,t,n){"use strict";var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(r){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,n){"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!o.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},function(e,t,n){"use strict";var o=n(96),r=n(64),a=o("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t,n){"use strict";var o=n(40);e.exports=o("navigator","userAgent")||""},function(e,t,n){"use strict";var o=n(105),r=n(35),a=n(15)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=o?r:function(e){var t,n,o;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),a))?n:i?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){"use strict";var o=n(15)("iterator"),r=!1;try{var a=0,i={next:function(){return{done:!!a++}},"return":function(){r=!0}};i[o]=function(){return this},Array.from(i,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a={};a[o]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(c){}return n}},function(e,t,n){"use strict";var o=n(34),r=n(17),a=n(63),i=n(14),c=function(e){return function(t,n,c,l){o(n);var d=r(t),u=a(d),s=i(d.length),m=e?s-1:0,p=e?-1:1;if(c<2)for(;;){if(m in u){l=u[m],m+=p;break}if(m+=p,e?m<0:s<=m)throw TypeError("Reduce of empty array with no initial value")}for(;e?m>=0:s>m;m+=p)m in u&&(l=n(l,u[m],m,d));return l}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var o=n(7),r=n(11),a=n(108),i=n(32),c=n(72),l=n(6),d=n(59),u=n(33),s=n(14),m=n(152),p=n(243),f=n(38),h=n(55),C=n(52).f,b=n(16).f,N=n(102),g=n(48),V=n(37),v=V.get,y=V.set,k=o.ArrayBuffer,_=k,x=o.DataView,L=x&&x.prototype,B=Object.prototype,w=o.RangeError,S=p.pack,I=p.unpack,T=function(e){return[255&e]},E=function(e){return[255&e,e>>8&255]},A=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},O=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},M=function(e){return S(e,23,4)},P=function(e){return S(e,52,8)},F=function(e,t){b(e.prototype,t,{get:function(){return v(this)[t]}})},D=function(e,t,n,o){var r=m(n),a=v(e);if(r+t>a.byteLength)throw w("Wrong index");var i=v(a.buffer).bytes,c=r+a.byteOffset,l=i.slice(c,c+t);return o?l:l.reverse()},R=function(e,t,n,o,r,a){var i=m(n),c=v(e);if(i+t>c.byteLength)throw w("Wrong index");for(var l=v(c.buffer).bytes,d=i+c.byteOffset,u=o(+r),s=0;sU;)(j=z[U++])in _||i(_,j,k[j]);W.constructor=_}h&&f(L)!==B&&h(L,B);var H=new x(new _(2)),K=L.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(L,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},{unsafe:!0})}else _=function(e){d(this,_,"ArrayBuffer");var t=m(e);y(this,{bytes:N.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},x=function(e,t,n){d(this,x,"DataView"),d(e,_,"DataView");var o=v(e).byteLength,a=u(t);if(a<0||a>o)throw w("Wrong offset");if(a+(n=n===undefined?o-a:s(n))>o)throw w("Wrong length");y(this,{buffer:e,byteLength:n,byteOffset:a}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},r&&(F(_,"byteLength"),F(x,"buffer"),F(x,"byteLength"),F(x,"byteOffset")),c(x.prototype,{getInt8:function(e){return D(this,1,e)[0]<<24>>24},getUint8:function(e){return D(this,1,e)[0]},getInt16:function(e){var t=D(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=D(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return O(D(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return O(D(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return I(D(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return I(D(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,T,t)},setUint8:function(e,t){R(this,1,e,T,t)},setInt16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,A,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,A,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,P,t,arguments.length>2?arguments[2]:undefined)}});g(_,"ArrayBuffer"),g(x,"DataView"),e.exports={ArrayBuffer:_,DataView:x}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(67),i=n(26),c=n(56),l=n(74),d=n(59),u=n(10),s=n(6),m=n(80),p=n(48),f=n(84);e.exports=function(e,t,n){var h=-1!==e.indexOf("Map"),C=-1!==e.indexOf("Weak"),b=h?"set":"add",N=r[e],g=N&&N.prototype,V=N,v={},y=function(e){var t=g[e];i(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(C&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return C&&!u(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(C&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof N||!(C||g.forEach&&!s((function(){(new N).entries().next()})))))V=n.getConstructor(t,e,h,b),c.REQUIRED=!0;else if(a(e,!0)){var k=new V,_=k[b](C?{}:-0,1)!=k,x=s((function(){k.has(1)})),L=m((function(e){new N(e)})),B=!C&&s((function(){for(var e=new N,t=5;t--;)e[b](t,t);return!e.has(-0)}));L||((V=t((function(t,n){d(t,V,e);var o=f(new N,t,V);return n!=undefined&&l(n,o[b],o,h),o}))).prototype=g,g.constructor=V),(x||B)&&(y("delete"),y("has"),h&&y("get")),(B||_)&&y(b),C&&g.clear&&delete g.clear}return v[e]=V,o({global:!0,forced:V!=N},v),p(V,e),C||n.setStrong(V,e,h),V}},function(e,t,n){"use strict";var o=n(10),r=n(55);e.exports=function(e,t,n){var a,i;return r&&"function"==typeof(a=t.constructor)&&a!==n&&o(i=a.prototype)&&i!==n.prototype&&r(e,i),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(41),r=n(7),a=n(6);e.exports=o||!a((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}))},function(e,t,n){"use strict";var o=n(12);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o,r,a=n(88),i=n(114),c=RegExp.prototype.exec,l=String.prototype.replace,d=c,u=(o=/a/,r=/b*/g,c.call(o,"a"),c.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),s=i.UNSUPPORTED_Y||i.BROKEN_CARET,m=/()??/.exec("")[1]!==undefined;(u||m||s)&&(d=function(e){var t,n,o,r,i=this,d=s&&i.sticky,p=a.call(i),f=i.source,h=0,C=e;return d&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),C=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(f="(?: "+f+")",C=" "+C,h++),n=new RegExp("^(?:"+f+")",p)),m&&(n=new RegExp("^"+f+"$(?!\\s)",p)),u&&(t=i.lastIndex),o=c.call(d?n:i,C),d?o?(o.input=o.input.slice(h),o[0]=o[0].slice(h),o.index=i.lastIndex,i.lastIndex+=o[0].length):i.lastIndex=0:u&&o&&(i.lastIndex=i.global?o.index+o[0].length:t),m&&o&&o.length>1&&l.call(o[0],n,(function(){for(r=1;r")})),u="$0"==="a".replace(/./,"$0"),s=a("replace"),m=!!/./[s]&&""===/./[s]("a","$0"),p=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,s){var f=a(e),h=!r((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),C=h&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t}));if(!h||!C||"replace"===e&&(!d||!u||m)||"split"===e&&!p){var b=/./[f],N=n(f,""[e],(function(e,t,n,o,r){return t.exec===i?h&&!r?{done:!0,value:b.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:m}),g=N[0],V=N[1];o(String.prototype,e,g),o(RegExp.prototype,f,2==t?function(e,t){return V.call(e,this,t)}:function(e){return V.call(e,this)})}s&&c(RegExp.prototype[f],"sham",!0)}},function(e,t,n){"use strict";var o=n(35),r=n(89);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";function o(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=48&&o<=90?String.fromCharCode(o):o>=112&&o<=123?"F"+(o-111):"["+o+"]"},u=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:d(n,o,r,t)}},s=function(){for(var e=0,t=Object.keys(l);e=112&&c<=123){a.log(d);for(var s,p=o(m);!(s=p()).done;)(0,s.value)(n,r)}}}(t,n,e)},document.addEventListener("keydown",(function(e){var n=window.event?e.which:e.keyCode;t(e,"keydown"),l[n]=!0})),document.addEventListener("keyup",(function(e){var n=window.event?e.which:e.keyCode;t(e,"keyup"),l[n]=!1})),Byond.IS_LTE_IE8||function(e){var t;document.addEventListener("focusout",(function(){t=setTimeout(e)})),document.addEventListener("focusin",(function(){clearTimeout(t)})),window.addEventListener("beforeunload",e)}((function(){s()})),function(e){return function(t){return e(t)}}}},function(e,t,n){"use strict";var o=n(7),r=n(10),a=o.document,i=r(a)&&r(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){"use strict";var o=n(7),r=n(32);e.exports=function(e,t){try{r(o,e,t)}catch(n){o[e]=t}return t}},function(e,t,n){"use strict";var o=n(135),r=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return r.call(e)}),e.exports=o.inspectSource},function(e,t,n){"use strict";var o=n(41),r=n(135);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var o=n(40),r=n(52),a=n(99),i=n(12);e.exports=o("Reflect","ownKeys")||function(e){var t=r.f(i(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(6);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var o,r,a=n(7),i=n(78),c=a.process,l=c&&c.versions,d=l&&l.v8;d?r=(o=d.split("."))[0]+o[1]:i&&(!(o=i.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=i.match(/Chrome\/(\d+)/))&&(r=o[1]),e.exports=r&&+r},function(e,t,n){"use strict";var o=n(17),r=n(46),a=n(14);e.exports=function(e){for(var t=o(this),n=a(t.length),i=arguments.length,c=r(i>1?arguments[1]:undefined,n),l=i>2?arguments[2]:undefined,d=l===undefined?n:r(l,n);d>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var o=n(15),r=n(71),a=o("iterator"),i=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||i[a]===e)}},function(e,t,n){"use strict";var o=n(79),r=n(71),a=n(15)("iterator");e.exports=function(e){if(e!=undefined)return e[a]||e["@@iterator"]||r[o(e)]}},function(e,t,n){"use strict";var o={};o[n(15)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(228),a=n(38),i=n(55),c=n(48),l=n(32),d=n(26),u=n(15),s=n(41),m=n(71),p=n(149),f=p.IteratorPrototype,h=p.BUGGY_SAFARI_ITERATORS,C=u("iterator"),b=function(){return this};e.exports=function(e,t,n,u,p,N,g){r(n,t,u);var V,v,y,k=function(e){if(e===p&&w)return w;if(!h&&e in L)return L[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},_=t+" Iterator",x=!1,L=e.prototype,B=L[C]||L["@@iterator"]||p&&L[p],w=!h&&B||k(p),S="Array"==t&&L.entries||B;if(S&&(V=a(S.call(new e)),f!==Object.prototype&&V.next&&(s||a(V)===f||(i?i(V,f):"function"!=typeof V[C]&&l(V,C,b)),c(V,_,!0,!0),s&&(m[_]=b))),"values"==p&&B&&"values"!==B.name&&(x=!0,w=function(){return B.call(this)}),s&&!g||L[C]===w||l(L,C,w),m[t]=w,p)if(v={values:k("values"),keys:N?w:k("keys"),entries:k("entries")},g)for(y in v)(h||x||!(y in L))&&d(L,y,v[y]);else o({target:t,proto:!0,forced:h||x},v);return v}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(14),r=n(110),a=n(25),i=Math.ceil,c=function(e){return function(t,n,c){var l,d,u=String(a(t)),s=u.length,m=c===undefined?" ":String(c),p=o(n);return p<=s||""==m?u:(l=p-s,(d=r.call(m,i(l/m.length))).length>l&&(d=d.slice(0,l)),e?u+d:d+u)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var o=n(33),r=n(25);e.exports="".repeat||function(e){var t=String(r(this)),n="",a=o(e);if(a<0||a==Infinity)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o,r,a,i=n(7),c=n(6),l=n(35),d=n(53),u=n(142),s=n(93),m=n(161),p=i.location,f=i.setImmediate,h=i.clearImmediate,C=i.process,b=i.MessageChannel,N=i.Dispatch,g=0,V={},v=function(e){if(V.hasOwnProperty(e)){var t=V[e];delete V[e],t()}},y=function(e){return function(){v(e)}},k=function(e){v(e.data)},_=function(e){i.postMessage(e+"",p.protocol+"//"+p.host)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return V[++g]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(g),g},h=function(e){delete V[e]},"process"==l(C)?o=function(e){C.nextTick(y(e))}:N&&N.now?o=function(e){N.now(y(e))}:b&&!m?(a=(r=new b).port2,r.port1.onmessage=k,o=d(a.postMessage,a,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||c(_)||"file:"===p.protocol?o="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),v(e)}}:function(e){setTimeout(y(e),0)}:(o=_,i.addEventListener("message",k,!1))),e.exports={set:f,clear:h}},function(e,t,n){"use strict";var o=n(10),r=n(35),a=n(15)("match");e.exports=function(e){var t;return o(e)&&((t=e[a])!==undefined?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(6);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var o=n(33),r=n(25),a=function(e){return function(t,n){var a,i,c=String(r(t)),l=o(n),d=c.length;return l<0||l>=d?e?"":undefined:(a=c.charCodeAt(l))<55296||a>56319||l+1===d||(i=c.charCodeAt(l+1))<56320||i>57343?e?c.charAt(l):a:e?c.slice(l,l+2):i-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){"use strict";var o=n(113);e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(15)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(115).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(6),r=n(86);e.exports=function(e){return o((function(){return!!r[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||r[e].name!==e}))}},function(e,t,n){"use strict";var o=n(7),r=n(6),a=n(80),i=n(13).NATIVE_ARRAY_BUFFER_VIEWS,c=o.ArrayBuffer,l=o.Int8Array;e.exports=!i||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!a((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.debugReducer=t.useDebug=t.selectDebug=t.toggleDebugLayout=t.toggleKitchenSink=void 0;var o=n(92),r=function(){return{type:"debug/toggleKitchenSink"}}; + */var o=0,r=1,a=2,i=3,c=4,l=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r=a){var i=[t].concat(o).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.topic({tgui:1,window_id:window.__windowId__,type:"log",message:i})}},d=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r"+i+""}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.T0C=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.T0C=273.15;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},manifest:{command:"#3333FF",security:"#8e0000",medical:"#006600",engineering:"#b27300",science:"#a65ba6",cargo:"#bb9040",planetside:"#555555",civilian:"#a32800",miscellaneous:"#666666",silicon:"#222222"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Mercenary",freq:1213,color:"#6D3F40"},{name:"Raider",freq:1277,color:"#6D3F40"},{name:"Special Ops",freq:1341,color:"#5C5C8A"},{name:"AI Private",freq:1343,color:"#FF00FF"},{name:"Response Team",freq:1345,color:"#5C5C8A"},{name:"Supply",freq:1347,color:"#5F4519"},{name:"Service",freq:1349,color:"#6eaa2c"},{name:"Science",freq:1351,color:"#993399"},{name:"Command",freq:1353,color:"#193A7A"},{name:"Medical",freq:1355,color:"#008160"},{name:"Engineering",freq:1357,color:"#A66300"},{name:"Security",freq:1359,color:"#A30000"},{name:"Explorer",freq:1361,color:"#555555"},{name:"Talon",freq:1363,color:"#555555"},{name:"Common",freq:1459,color:"#008000"},{name:"Entertainment",freq:1461,color:"#339966"},{name:"Security(I)",freq:1475,color:"#008000"},{name:"Medical(I)",freq:1485,color:"#008000"}];var o=[{id:"oxygen",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"carbon dioxide",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"phoron",name:"Phoron",label:"Phoron",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"other",name:"Other",label:"Other",color:"white"},{id:"pressure",name:"Pressure",label:"Pressure",color:"average"},{id:"temperature",name:"Temperature",label:"Temperature",color:"yellow"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(51);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,a,i=n(137),c=n(8),l=n(10),d=n(33),u=n(20),s=n(78),m=n(65),p=c.WeakMap;if(i){var h=new p,f=h.get,C=h.has,N=h.set;o=function(e,t){return N.call(h,e,t),t},r=function(e){return f.call(h,e)||{}},a=function(e){return C.call(h,e)}}else{var b=s("state");m[b]=!0,o=function(e,t){return d(e,b,t),t},r=function(e){return u(e,b)?e[b]:{}},a=function(e){return u(e,b)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(20),r=n(18),a=n(78),i=n(108),c=a("IE_PROTO"),l=Object.prototype;e.exports=i?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var o=n(139),r=n(8),a=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e])||a(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(11),i=n(121),c=n(13),l=n(83),d=n(59),u=n(51),s=n(33),m=n(14),p=n(153),h=n(168),f=n(37),C=n(20),N=n(80),b=n(10),g=n(47),V=n(55),v=n(52).f,k=n(169),y=n(22).forEach,_=n(58),B=n(16),L=n(23),w=n(38),x=n(85),S=w.get,I=w.set,T=B.f,E=L.f,A=Math.round,P=r.RangeError,M=l.ArrayBuffer,O=l.DataView,F=c.NATIVE_ARRAY_BUFFER_VIEWS,D=c.TYPED_ARRAY_TAG,R=c.TypedArray,j=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,z=c.isTypedArray,U=function(e,t){for(var n=0,o=t.length,r=new(W(e))(o);o>n;)r[n]=t[n++];return r},G=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},H=function(e){var t;return e instanceof M||"ArrayBuffer"==(t=N(e))||"SharedArrayBuffer"==t},K=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Y=function(e,t){return K(e,t=f(t,!0))?u(2,e[t]):E(e,t)},q=function(e,t,n){return!(K(e,t=f(t,!0))&&b(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?T(e,t,n):(e[t]=n.value,e)};a?(F||(L.f=Y,B.f=q,G(j,"buffer"),G(j,"byteOffset"),G(j,"byteLength"),G(j,"length")),o({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:Y,defineProperty:q}),e.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,u="set"+e,f=r[c],C=f,N=C&&C.prototype,B={},L=function(e,t){T(e,t,{get:function(){return function(e,t){var n=S(e);return n.view[l](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=S(e);n&&(o=(o=A(o))<0?0:o>255?255:255&o),r.view[u](t*a+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};F?i&&(C=t((function(e,t,n,o){return d(e,C,c),x(b(t)?H(t)?o!==undefined?new f(t,h(n,a),o):n!==undefined?new f(t,h(n,a)):new f(t):z(t)?U(C,t):k.call(C,t):new f(p(t)),e,C)})),V&&V(C,R),y(v(f),(function(e){e in C||s(C,e,f[e])})),C.prototype=N):(C=t((function(e,t,n,o){d(e,C,c);var r,i,l,u=0,s=0;if(b(t)){if(!H(t))return z(t)?U(C,t):k.call(C,t);r=t,s=h(n,a);var f=t.byteLength;if(o===undefined){if(f%a)throw P("Wrong length");if((i=f-s)<0)throw P("Wrong length")}else if((i=m(o)*a)+s>f)throw P("Wrong length");l=i/a}else l=p(t),r=new M(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new O(r)});u=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1?r-1:0),c=1;c1?o-1:0),a=1;a"+e+"<\/script>"},h=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;h=o?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):((t=d("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=i.length;n--;)delete h.prototype[i[n]];return h()};c[s]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m.prototype=r(e),n=new m,m.prototype=null,n[s]=e):n=h(),t===undefined?n:a(n,t)}},function(e,t,n){"use strict";var o=n(16).f,r=n(20),a=n(15)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&o(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(15),r=n(47),a=n(16),i=o("unscopables"),c=Array.prototype;c[i]==undefined&&a.f(c,i,{configurable:!0,value:r(null)}),e.exports=function(e){c[i][e]=!0}},function(e,t,n){"use strict";var o=n(12),r=n(35),a=n(15)("species");e.exports=function(e,t){var n,i=o(e).constructor;return i===undefined||(n=o(i)[a])==undefined?t:r(n)}},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(140),r=n(99).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(35);e.exports=function(e,t,n){if(o(e),t===undefined)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(37),r=n(16),a=n(51);e.exports=function(e,t,n){var i=o(t);i in e?r.f(e,i,a(0,n)):e[i]=n}},function(e,t,n){"use strict";var o=n(12),r=n(151);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(a){}return function(n,a){return o(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():undefined)},function(e,t,n){"use strict";var o=n(65),r=n(10),a=n(20),i=n(16).f,c=n(64),l=n(73),d=c("meta"),u=0,s=Object.isExtensible||function(){return!0},m=function(e){i(e,d,{value:{objectID:"O"+ ++u,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,d)){if(!s(e))return"F";if(!t)return"E";m(e)}return e[d].objectID},getWeakData:function(e,t){if(!a(e,d)){if(!s(e))return!0;if(!t)return!1;m(e)}return e[d].weakData},onFreeze:function(e){return l&&p.REQUIRED&&s(e)&&!a(e,d)&&m(e),e}};o[d]=!0},function(e,t,n){"use strict";var o=n(36);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(40),r=n(16),a=n(15),i=n(11),c=a("species");e.exports=function(e){var t=o(e),n=r.f;i&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var o=n(25),r="["+n(87)+"]",a=RegExp("^"+r+r+"*"),i=RegExp(r+r+"*$"),c=function(e){return function(t){var n=String(o(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(i,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){"use strict";t.__esModule=!0,t.FullscreenNotice=void 0;var o=n(0),r=n(2);t.FullscreenNotice=function(e,t){var n=e.children,a=e.title,i=void 0===a?"Welcome":a;return(0,o.createComponentVNode)(2,r.Section,{title:i,height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,r.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,r.Flex.Item,{textAlign:"center",mt:"-2rem",children:n})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(7),a=n(1),i=n(2);t.TemporaryNotice=function(e,t){var n,c=e.decode,l=(0,a.useBackend)(t),d=l.act,u=l.data.temp;if(u){var s=((n={})[u.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:c?(0,r.decodeHtmlEntities)(u.text):u.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return d("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";var o=n(6),r=n(36),a="".split;e.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){"use strict";var o=0,r=Math.random();e.exports=function(e){return"Symbol("+String(e===undefined?"":e)+")_"+(++o+r).toString(36)}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(28),r=n(14),a=n(46),i=function(e){return function(t,n,i){var c,l=o(t),d=r(l.length),u=a(i,d);if(e&&n!=n){for(;d>u;)if((c=l[u++])!=c)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){"use strict";var o=n(6),r=/#|\.prototype\./,a=function(e,t){var n=c[i(e)];return n==d||n!=l&&("function"==typeof t?o(t):!!t)},i=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var o=n(140),r=n(99);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(10),r=n(57),a=n(15)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[a])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var o=n(6),r=n(15),a=n(102),i=r("species");e.exports=function(e){return a>=51||!o((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(26);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(12),r=n(104),a=n(14),i=n(53),c=n(105),l=n(148),d=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,s){var m,p,h,f,C,N,b,g=i(t,n,u?2:1);if(s)m=e;else{if("function"!=typeof(p=c(e)))throw TypeError("Target is not iterable");if(r(p)){for(h=0,f=a(e.length);f>h;h++)if((C=u?g(o(b=e[h])[0],b[1]):g(e[h]))&&C instanceof d)return C;return new d(!1)}m=p.call(e)}for(N=m.next;!(b=N.call(m)).done;)if("object"==typeof(C=l(m,g,b.value,u))&&C&&C instanceof d)return C;return new d(!1)}).stop=function(e){return new d(!0,e)}},function(e,t,n){"use strict";t.__esModule=!0,t.assetMiddleware=t.resolveAsset=t.loadCSS=void 0;var o=n(435),r=(0,n(24).createLogger)("assets"),a=[/v4shim/i],i=[],c={},l=function(e){i.includes(e)||(i.push(e),r.log("loading stylesheet '"+e+"'"),(0,o.loadCSS)(e))};t.loadCSS=l;t.resolveAsset=function(e){return c[e]||e};t.assetMiddleware=function(e){return function(e){return function(t){var n=t.type,o=t.payload;if("asset/stylesheet"!==n)if("asset/mappings"!==n)e(t);else for(var r=function(){var e=d[i];if(a.some((function(t){return t.test(e)})))return"continue";var t=o[e],n=e.split(".").pop();c[e]=t,"css"===n&&l(t)},i=0,d=Object.keys(o);i=0:s>m;m+=p)m in u&&(l=n(l,u[m],m,d));return l}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var o=n(8),r=n(11),a=n(109),i=n(33),c=n(72),l=n(6),d=n(59),u=n(34),s=n(14),m=n(153),p=n(246),h=n(39),f=n(55),C=n(52).f,N=n(16).f,b=n(103),g=n(48),V=n(38),v=V.get,k=V.set,y=o.ArrayBuffer,_=y,B=o.DataView,L=B&&B.prototype,w=Object.prototype,x=o.RangeError,S=p.pack,I=p.unpack,T=function(e){return[255&e]},E=function(e){return[255&e,e>>8&255]},A=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},P=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},M=function(e){return S(e,23,4)},O=function(e){return S(e,52,8)},F=function(e,t){N(e.prototype,t,{get:function(){return v(this)[t]}})},D=function(e,t,n,o){var r=m(n),a=v(e);if(r+t>a.byteLength)throw x("Wrong index");var i=v(a.buffer).bytes,c=r+a.byteOffset,l=i.slice(c,c+t);return o?l:l.reverse()},R=function(e,t,n,o,r,a){var i=m(n),c=v(e);if(i+t>c.byteLength)throw x("Wrong index");for(var l=v(c.buffer).bytes,d=i+c.byteOffset,u=o(+r),s=0;sU;)(j=z[U++])in _||i(_,j,y[j]);W.constructor=_}f&&h(L)!==w&&f(L,w);var G=new B(new _(2)),H=L.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||c(L,{setInt8:function(e,t){H.call(this,e,t<<24>>24)},setUint8:function(e,t){H.call(this,e,t<<24>>24)}},{unsafe:!0})}else _=function(e){d(this,_,"ArrayBuffer");var t=m(e);k(this,{bytes:b.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},B=function(e,t,n){d(this,B,"DataView"),d(e,_,"DataView");var o=v(e).byteLength,a=u(t);if(a<0||a>o)throw x("Wrong offset");if(a+(n=n===undefined?o-a:s(n))>o)throw x("Wrong length");k(this,{buffer:e,byteLength:n,byteOffset:a}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},r&&(F(_,"byteLength"),F(B,"buffer"),F(B,"byteLength"),F(B,"byteOffset")),c(B.prototype,{getInt8:function(e){return D(this,1,e)[0]<<24>>24},getUint8:function(e){return D(this,1,e)[0]},getInt16:function(e){var t=D(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=D(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return P(D(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return P(D(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return I(D(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return I(D(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,T,t)},setUint8:function(e,t){R(this,1,e,T,t)},setInt16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,A,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,A,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,O,t,arguments.length>2?arguments[2]:undefined)}});g(_,"ArrayBuffer"),g(B,"DataView"),e.exports={ArrayBuffer:_,DataView:B}},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(67),i=n(26),c=n(56),l=n(74),d=n(59),u=n(10),s=n(6),m=n(81),p=n(48),h=n(85);e.exports=function(e,t,n){var f=-1!==e.indexOf("Map"),C=-1!==e.indexOf("Weak"),N=f?"set":"add",b=r[e],g=b&&b.prototype,V=b,v={},k=function(e){var t=g[e];i(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(C&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return C&&!u(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(C&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof b||!(C||g.forEach&&!s((function(){(new b).entries().next()})))))V=n.getConstructor(t,e,f,N),c.REQUIRED=!0;else if(a(e,!0)){var y=new V,_=y[N](C?{}:-0,1)!=y,B=s((function(){y.has(1)})),L=m((function(e){new b(e)})),w=!C&&s((function(){for(var e=new b,t=5;t--;)e[N](t,t);return!e.has(-0)}));L||((V=t((function(t,n){d(t,V,e);var o=h(new b,t,V);return n!=undefined&&l(n,o[N],o,f),o}))).prototype=g,g.constructor=V),(B||w)&&(k("delete"),k("has"),f&&k("get")),(w||_)&&k(N),C&&g.clear&&delete g.clear}return v[e]=V,o({global:!0,forced:V!=b},v),p(V,e),C||n.setStrong(V,e,f),V}},function(e,t,n){"use strict";var o=n(10),r=n(55);e.exports=function(e,t,n){var a,i;return r&&"function"==typeof(a=t.constructor)&&a!==n&&o(i=a.prototype)&&i!==n.prototype&&r(e,i),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(41),r=n(8),a=n(6);e.exports=o||!a((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}))},function(e,t,n){"use strict";var o=n(12);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o,r,a=n(89),i=n(115),c=RegExp.prototype.exec,l=String.prototype.replace,d=c,u=(o=/a/,r=/b*/g,c.call(o,"a"),c.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),s=i.UNSUPPORTED_Y||i.BROKEN_CARET,m=/()??/.exec("")[1]!==undefined;(u||m||s)&&(d=function(e){var t,n,o,r,i=this,d=s&&i.sticky,p=a.call(i),h=i.source,f=0,C=e;return d&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),C=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(h="(?: "+h+")",C=" "+C,f++),n=new RegExp("^(?:"+h+")",p)),m&&(n=new RegExp("^"+h+"$(?!\\s)",p)),u&&(t=i.lastIndex),o=c.call(d?n:i,C),d?o?(o.input=o.input.slice(f),o[0]=o[0].slice(f),o.index=i.lastIndex,i.lastIndex+=o[0].length):i.lastIndex=0:u&&o&&(i.lastIndex=i.global?o.index+o[0].length:t),m&&o&&o.length>1&&l.call(o[0],n,(function(){for(r=1;r")})),u="$0"==="a".replace(/./,"$0"),s=a("replace"),m=!!/./[s]&&""===/./[s]("a","$0"),p=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,s){var h=a(e),f=!r((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),C=f&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!f||!C||"replace"===e&&(!d||!u||m)||"split"===e&&!p){var N=/./[h],b=n(h,""[e],(function(e,t,n,o,r){return t.exec===i?f&&!r?{done:!0,value:N.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:m}),g=b[0],V=b[1];o(String.prototype,e,g),o(RegExp.prototype,h,2==t?function(e,t){return V.call(e,this,t)}:function(e){return V.call(e,this)})}s&&c(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var o=n(36),r=n(90);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";function o(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=48&&o<=90?String.fromCharCode(o):o>=112&&o<=123?"F"+(o-111):"["+o+"]"},u=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:d(n,o,r,t)}},s=function(){for(var e=0,t=Object.keys(l);e=112&&c<=123){a.log(d);for(var s,p=o(m);!(s=p()).done;)(0,s.value)(n,r)}}}(t,n,e)},document.addEventListener("keydown",(function(e){var n=window.event?e.which:e.keyCode;t(e,"keydown"),l[n]=!0})),document.addEventListener("keyup",(function(e){var n=window.event?e.which:e.keyCode;t(e,"keyup"),l[n]=!1})),Byond.IS_LTE_IE8||function(e){var t;document.addEventListener("focusout",(function(){t=setTimeout(e)})),document.addEventListener("focusin",(function(){clearTimeout(t)})),window.addEventListener("beforeunload",e)}((function(){s()})),function(e){return function(t){return e(t)}}}},function(e,t,n){"use strict";var o=n(8),r=n(10),a=o.document,i=r(a)&&r(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){"use strict";var o=n(8),r=n(33);e.exports=function(e,t){try{r(o,e,t)}catch(n){o[e]=t}return t}},function(e,t,n){"use strict";var o=n(136),r=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return r.call(e)}),e.exports=o.inspectSource},function(e,t,n){"use strict";var o=n(41),r=n(136);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var o=n(40),r=n(52),a=n(100),i=n(12);e.exports=o("Reflect","ownKeys")||function(e){var t=r.f(i(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(6);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var o,r,a=n(8),i=n(79),c=a.process,l=c&&c.versions,d=l&&l.v8;d?r=(o=d.split("."))[0]+o[1]:i&&(!(o=i.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=i.match(/Chrome\/(\d+)/))&&(r=o[1]),e.exports=r&&+r},function(e,t,n){"use strict";var o=n(18),r=n(46),a=n(14);e.exports=function(e){for(var t=o(this),n=a(t.length),i=arguments.length,c=r(i>1?arguments[1]:undefined,n),l=i>2?arguments[2]:undefined,d=l===undefined?n:r(l,n);d>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var o=n(15),r=n(71),a=o("iterator"),i=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||i[a]===e)}},function(e,t,n){"use strict";var o=n(80),r=n(71),a=n(15)("iterator");e.exports=function(e){if(e!=undefined)return e[a]||e["@@iterator"]||r[o(e)]}},function(e,t,n){"use strict";var o={};o[n(15)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(231),a=n(39),i=n(55),c=n(48),l=n(33),d=n(26),u=n(15),s=n(41),m=n(71),p=n(150),h=p.IteratorPrototype,f=p.BUGGY_SAFARI_ITERATORS,C=u("iterator"),N=function(){return this};e.exports=function(e,t,n,u,p,b,g){r(n,t,u);var V,v,k,y=function(e){if(e===p&&x)return x;if(!f&&e in L)return L[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},_=t+" Iterator",B=!1,L=e.prototype,w=L[C]||L["@@iterator"]||p&&L[p],x=!f&&w||y(p),S="Array"==t&&L.entries||w;if(S&&(V=a(S.call(new e)),h!==Object.prototype&&V.next&&(s||a(V)===h||(i?i(V,h):"function"!=typeof V[C]&&l(V,C,N)),c(V,_,!0,!0),s&&(m[_]=N))),"values"==p&&w&&"values"!==w.name&&(B=!0,x=function(){return w.call(this)}),s&&!g||L[C]===x||l(L,C,x),m[t]=x,p)if(v={values:y("values"),keys:b?x:y("keys"),entries:y("entries")},g)for(k in v)(f||B||!(k in L))&&d(L,k,v[k]);else o({target:t,proto:!0,forced:f||B},v);return v}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(14),r=n(111),a=n(25),i=Math.ceil,c=function(e){return function(t,n,c){var l,d,u=String(a(t)),s=u.length,m=c===undefined?" ":String(c),p=o(n);return p<=s||""==m?u:(l=p-s,(d=r.call(m,i(l/m.length))).length>l&&(d=d.slice(0,l)),e?u+d:d+u)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var o=n(34),r=n(25);e.exports="".repeat||function(e){var t=String(r(this)),n="",a=o(e);if(a<0||a==Infinity)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o,r,a,i=n(8),c=n(6),l=n(36),d=n(53),u=n(143),s=n(94),m=n(162),p=i.location,h=i.setImmediate,f=i.clearImmediate,C=i.process,N=i.MessageChannel,b=i.Dispatch,g=0,V={},v=function(e){if(V.hasOwnProperty(e)){var t=V[e];delete V[e],t()}},k=function(e){return function(){v(e)}},y=function(e){v(e.data)},_=function(e){i.postMessage(e+"",p.protocol+"//"+p.host)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return V[++g]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(g),g},f=function(e){delete V[e]},"process"==l(C)?o=function(e){C.nextTick(k(e))}:b&&b.now?o=function(e){b.now(k(e))}:N&&!m?(a=(r=new N).port2,r.port1.onmessage=y,o=d(a.postMessage,a,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||c(_)||"file:"===p.protocol?o="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),v(e)}}:function(e){setTimeout(k(e),0)}:(o=_,i.addEventListener("message",y,!1))),e.exports={set:h,clear:f}},function(e,t,n){"use strict";var o=n(10),r=n(36),a=n(15)("match");e.exports=function(e){var t;return o(e)&&((t=e[a])!==undefined?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(6);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var o=n(34),r=n(25),a=function(e){return function(t,n){var a,i,c=String(r(t)),l=o(n),d=c.length;return l<0||l>=d?e?"":undefined:(a=c.charCodeAt(l))<55296||a>56319||l+1===d||(i=c.charCodeAt(l+1))<56320||i>57343?e?c.charAt(l):a:e?c.slice(l,l+2):i-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){"use strict";var o=n(114);e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(15)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(116).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(6),r=n(87);e.exports=function(e){return o((function(){return!!r[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||r[e].name!==e}))}},function(e,t,n){"use strict";var o=n(8),r=n(6),a=n(81),i=n(13).NATIVE_ARRAY_BUFFER_VIEWS,c=o.ArrayBuffer,l=o.Int8Array;e.exports=!i||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!a((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.debugReducer=t.useDebug=t.selectDebug=t.toggleDebugLayout=t.toggleKitchenSink=void 0;var o=n(93),r=function(){return{type:"debug/toggleKitchenSink"}}; /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */t.toggleKitchenSink=r;var a=function(){return{type:"debug/toggleDebugLayout"}};t.toggleDebugLayout=a,(0,o.subscribeToHotKey)("F11",(function(){return{type:"debug/toggleDebugLayout"}})),(0,o.subscribeToHotKey)("F12",(function(){return{type:"debug/toggleKitchenSink"}})),(0,o.subscribeToHotKey)("Ctrl+Alt+[8]",(function(){setTimeout((function(){throw new Error("OOPSIE WOOPSIE!! UwU We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!")}))}));var i=function(e){return e.debug};t.selectDebug=i;t.useDebug=function(e){return i(e.store.getState())};t.debugReducer=function(e,t){void 0===e&&(e={});var n=t.type;t.payload;return"debug/toggleKitchenSink"===n?Object.assign({},e,{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===n?Object.assign({},e,{debugLayout:!e.debugLayout}):e}},function(e,t,n){"use strict";t.__esModule=!0,t.assetMiddleware=t.resolveAsset=t.loadCSS=void 0;var o=n(432),r=(0,n(24).createLogger)("assets"),a=[/v4shim/i],i=[],c={},l=function(e){i.includes(e)||(i.push(e),r.log("loading stylesheet '"+e+"'"),(0,o.loadCSS)(e))};t.loadCSS=l;t.resolveAsset=function(e){return c[e]||e};t.assetMiddleware=function(e){return function(e){return function(t){var n=t.type,o=t.payload;if("asset/stylesheet"!==n)if("asset/mappings"!==n)e(t);else for(var r=function(){var e=d[i];if(a.some((function(t){return t.test(e)})))return"continue";var t=o[e],n=e.split(".").pop();c[e]=t,"css"===n&&l(t)},i=0,d=Object.keys(o);i=0||(r[n]=e[n]);return r}(e,["className","scrollable","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Layout__content",n&&"Layout__content--scrollable",t].concat((0,a.computeBoxClassName)(c))),i,0,Object.assign({id:"Layout__content"},(0,a.computeBoxProps)(c))))}},function(e,t,n){"use strict";t.__esModule=!0,t.AnimatedNumber=void 0;var o=n(5),r=n(0);var a=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)},i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:0},a(t.initial)?n.state.value=t.initial:a(t.value)&&(n.state.value=Number(t.value)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state,n=Number(t.value),o=Number(e.value);if(a(o)){var r=.5*n+.5*o;this.setState({value:r})}},i.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),50)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){var e=this.props,t=this.state,n=e.format,r=e.children,i=t.value,c=e.value;if(!a(c))return c||null;var l=i;if(n)l=n(i);else{var d=String(c).split(".")[1],u=d?d.length:0;l=(0,o.toFixed)(i,(0,o.clamp)(u,0,8))}return"function"==typeof r?r(l,i):l},r}(r.Component);t.AnimatedNumber=i},function(e,t,n){"use strict";t.__esModule=!0,t.ButtonInput=t.ButtonConfirm=t.ButtonCheckbox=t.Button=void 0;var o=n(0),r=n(9),a=n(92),i=n(3),c=n(24),l=n(18),d=n(126),u=n(175);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var p=(0,c.createLogger)("Button"),f=function(e){var t=e.className,n=e.fluid,c=e.icon,s=e.color,f=e.disabled,h=e.selected,C=e.tooltip,b=e.tooltipPosition,N=e.tooltipScale,g=e.ellipsis,V=e.content,v=e.iconRotation,y=e.iconSpin,k=e.iconColor,_=e.iconSize,x=e.children,L=e.onclick,B=e.onClick,w=m(e,["className","fluid","icon","color","disabled","selected","tooltip","tooltipPosition","tooltipScale","ellipsis","content","iconRotation","iconSpin","iconColor","iconSize","children","onclick","onClick"]),S=!(!V&&!x);return L&&p.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",f&&"Button--disabled",h&&"Button--selected",S&&"Button--hasContent",g&&"Button--ellipsis",s&&"string"==typeof s?"Button--color--"+s:"Button--color--default",t]),tabIndex:!f&&"0",unselectable:Byond.IS_LTE_IE8,onclick:function(e){(0,i.refocusLayout)(),!f&&B&&B(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!f&&B&&B(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},w,{children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:v,spin:y,color:k,fontSize:_}),V,x,C&&(0,o.createComponentVNode)(2,u.Tooltip,{content:C,position:b,scale:N})]})))};t.Button=f,f.defaultHooks=r.pureComponentHooks;var h=function(e){var t=e.checked,n=m(e,["checked"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,f,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=h,f.Checkbox=h;var C=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}s(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,r=void 0===n?"Confirm?":n,a=t.confirmColor,i=void 0===a?"bad":a,c=t.confirmIcon,l=t.icon,d=t.color,u=t.content,s=t.onClick,p=m(t,["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,f,Object.assign({content:this.state.clickedOnce?r:u,icon:this.state.clickedOnce?c:l,color:this.state.clickedOnce?i:d,onClick:function(){return e.state.clickedOnce?s():e.setClickedOnce(!0)}},p)))},t}(o.Component);t.ButtonConfirm=C,f.Confirm=C;var b=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={inInput:!1},t}s(t,e);var n=t.prototype;return n.setInInput=function(e){if(this.setState({inInput:e}),this.inputRef){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,i=t.content,c=t.icon,s=t.iconRotation,p=t.iconSpin,f=t.tooltip,h=t.tooltipPosition,C=t.color,b=void 0===C?"default":C,N=(t.placeholder,t.maxLength,m(t,["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","placeholder","maxLength"]));return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid","Button--color--"+b])},N,{onClick:function(){return e.setInInput(!0)},children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:s,spin:p}),(0,o.createVNode)(1,"div",null,i,0),(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===a.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===a.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),f&&(0,o.createComponentVNode)(2,u.Tooltip,{content:f,position:h})]})))},t}(o.Component);t.ButtonInput=b,f.Input=b},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var o=n(0),r=n(9),a=n(18);var i=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,l=e.className,d=e.style,u=void 0===d?{}:d,s=e.rotation,m=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["name","size","spin","className","style","rotation"]);n&&(u["font-size"]=100*n+"%"),"number"==typeof s&&(u.transform="rotate("+s+"deg)");var p=i.test(t),f=t.replace(i,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"i",className:(0,r.classes)([l,p?"far":"fas","fa-"+f,c&&"fa-spin"]),style:u},m)))};t.Icon=c,c.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(5),a=n(9),i=n(124);var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},l=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,r),value:o,internalValue:o}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,i=t.step,l=t.stepPixelSize,d=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),u=c(e,d)-n.origin;if(t.dragging){var s=Number.isFinite(o)?o%i:0;n.internalValue=(0,r.clamp)(n.internalValue+u*i/l,o-i,a+i),n.value=(0,r.clamp)(n.internalValue-n.internalValue%i+s,o,a),n.origin=c(e,d)}else Math.abs(u)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,i=a.dragging,c=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!i,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),i)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this,t=this.state,n=t.dragging,a=t.editing,c=t.value,l=t.suppressingFlicker,d=this.props,u=d.animated,s=d.value,m=d.unit,p=d.minValue,f=d.maxValue,h=d.format,C=d.onChange,b=d.onDrag,N=d.children,g=d.forcedInputWidth,V=d.height,v=d.lineHeight,y=d.fontSize,k=s;(n||l)&&(k=c);var _=function(e){return e+(m?" "+m:"")},x=u&&!n&&!l&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:k,format:h,children:_})||_(h?h(k):k),L=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:a?undefined:"none",height:V,width:g,"line-height":v,"font-size":y},onBlur:function(t){if(a){var n=(0,r.clamp)(t.target.value,p,f);e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),b&&b(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,p,f);return e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),void(b&&b(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return N({dragging:n,editing:a,value:s,displayValue:k,displayElement:x,inputElement:L,handleDragStart:this.handleDragStart})},a}(o.Component);t.DraggableControl=l,l.defaultHooks=a.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var o=n(0),r=n(9),a=n(18);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.className,n=e.collapsing,c=e.children,l=i(e,["className","collapsing","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Table=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.header,c=i(e,["className","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(c))))};t.TableRow=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.collapsing,c=e.header,l=i(e,["className","collapsing","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(l))))};t.TableCell=d,d.defaultHooks=r.pureComponentHooks,c.Row=l,c.Cell=d},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(5),a=n(9),i=n(124),c=n(18);var l=function(e){var t,n;function l(t){var n;n=e.call(this,t)||this;var a=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:a,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,i=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var d=Number.isFinite(o)?o%i:0;n.internalValue=(0,r.clamp)(n.internalValue+l*i/c,o-i,a+i),n.value=(0,r.clamp)(n.internalValue-n.internalValue%i+d,o,a),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,i=a.dragging,c=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!i,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),i)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state,n=t.dragging,l=t.editing,d=t.value,u=t.suppressingFlicker,s=this.props,m=s.className,p=s.fluid,f=s.animated,h=s.value,C=s.unit,b=s.minValue,N=s.maxValue,g=s.height,V=s.width,v=s.lineHeight,y=s.fontSize,k=s.format,_=s.onChange,x=s.onDrag,L=h;(n||u)&&(L=d);var B=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(C?" "+C:""),0,{unselectable:Byond.IS_LTE_IE8})},w=f&&!n&&!u&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:L,format:k,children:B})||B(k?k(L):L);return(0,o.createComponentVNode)(2,c.Box,{className:(0,a.classes)(["NumberInput",p&&"NumberInput--fluid",m]),minWidth:V,minHeight:g,lineHeight:v,fontSize:y,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((L-b)/(N-b)*100,0,100)+"%"}}),2),w,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:l?undefined:"none",height:g,"line-height":v,"font-size":y},onBlur:function(t){if(l){var n=(0,r.clamp)(t.target.value,b,N);e.setState({editing:!1,value:n}),e.suppressFlicker(),_&&_(t,n),x&&x(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,b,N);return e.setState({editing:!1,value:n}),e.suppressFlicker(),_&&_(t,n),void(x&&x(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},l}(o.Component);t.NumberInput=l,l.defaultHooks=a.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";t.__esModule=!0,t.Materials=t.ExosuitFabricator=void 0;var o,r=n(0),a=n(9),i=n(19),c=n(1),l=n(21),d=n(2),u=n(3),s=n(8);function m(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return p(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn?{color:2,deficit:e-n}:t>n?{color:1,deficit:e}:e+t>n?{color:1,deficit:e+t-n}:{color:0,deficit:0}},b=function(e,t,n){var o={textColor:0};return Object.keys(n.cost).forEach((function(r){o[r]=C(n.cost[r],t[r],e[r]),o[r].color>o.textColor&&(o.textColor=o[r].color)})),o};t.ExosuitFabricator=function(e,t){var n,o,a=(0,c.useBackend)(t),i=a.act,l=a.data,s=l.queue||[],m=(n=l.materials||[],o={},n.forEach((function(e){o[e.name]=e.amount})),o),p=function(e,t){var n={},o={},r={},a={};return t.forEach((function(t,i){a[i]=0,Object.keys(t.cost).forEach((function(c){n[c]=n[c]||0,r[c]=r[c]||0,o[c]=C(t.cost[c],n[c],e[c]),0!==o[c].color?a[i]1&&l0)&&(0,r.createComponentVNode)(2,d.Flex.Item,{width:"80px",children:[(0,r.createComponentVNode)(2,V,{name:e.name,amount:e.amount,formatsi:!0}),!i&&(0,r.createComponentVNode)(2,d.Box,{mt:1,style:{"text-align":"center"},children:(0,r.createComponentVNode)(2,N,{material:e})})]},e.name)||null}))})};t.Materials=g;var V=function(e,t){var n=e.name,o=e.amount,i=e.formatsi,c=e.formatmoney,u=e.color,m=e.style;return(0,r.createComponentVNode)(2,d.Flex,{direction:"column",align:"center",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{className:(0,a.classes)(["sheetmaterials32x32",f[n]]),position:"relative",style:m,children:(0,r.createComponentVNode)(2,d.Tooltip,{position:"bottom",content:(0,s.toTitleCase)(n)})})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{textColor:u,style:{"text-align":"center"},children:i&&(0,l.formatSiUnit)(o,0)||c&&(0,l.formatMoney)(o)||o})})]})},v=function(e,t){var n=(0,c.useBackend)(t).data,o=n.partSets||[],a=n.buildableParts||{},i=(0,c.useSharedState)(t,"part_tab",o.length?a[0]:""),l=i[0],u=i[1];return(0,r.createComponentVNode)(2,d.Tabs,{vertical:!0,children:o.map((function(e){return!!a[e]&&(0,r.createComponentVNode)(2,d.Tabs.Tab,{selected:e===l,disabled:!a[e],onClick:function(){return u(e)},children:e},e)}))})},y=function(e,t){var n,o=(0,c.useBackend)(t).data,a=function(e){for(var t,n=m(e);!(t=n()).done;){var o=t.value;if(u[o])return o}return null},l=o.partSets||[],u=o.buildableParts||[],p=e.queueMaterials,f=e.materials,h=(0,c.useSharedState)(t,"part_tab",a(l)),C=h[0],N=h[1],g=(0,c.useSharedState)(t,"search_text",""),V=g[0],v=g[1];if(!C||!u[C]){var y=a(l);if(!y)return;N(y)}return V?(n=[],function(e,t){var n=[];if(e.length){var o=(0,s.createSearch)(e,(function(e){return(e.name||"")+(e.desc||"")+(e.searchMeta||"")}));return Object.keys(t).forEach((function(e){t[e].filter(o).forEach((function(e){n.push(e)}))})),n=(0,i.uniqBy)((function(e){return e.name}))(n)}}(V,u).forEach((function(e){e.format=b(f,p,e),n.push(e)}))):(n={Parts:[]},u[C].forEach((function(e){e.format=b(f,p,e),e.subCategory?(e.subCategory in n||(n[e.subCategory]=[]),n[e.subCategory].push(e)):n.Parts.push(e)}))),(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Section,{children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{mr:1,children:(0,r.createComponentVNode)(2,d.Icon,{name:"search"})}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1,children:(0,r.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return v(t)}})})]})}),!!V&&(0,r.createComponentVNode)(2,k,{name:"Search Results",parts:n,forceShow:!0,placeholder:"No matching results..."})||Object.keys(n).map((function(e){return(0,r.createComponentVNode)(2,k,{name:e,parts:n[e]},e)}))],0)},k=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data.buildingPart,i=e.parts,l=e.name,u=e.forceShow,s=e.placeholder,m=(0,c.useSharedState)(t,"display_mats",!1)[0];return(!!i.length||u)&&(0,r.createComponentVNode)(2,d.Section,{title:l,buttons:(0,r.createComponentVNode)(2,d.Button,{disabled:!i.length,color:"good",content:"Queue All",icon:"plus-circle",onClick:function(){return o("add_queue_set",{part_list:i.map((function(e){return e.id}))})}}),children:[!i.length&&s,i.map((function(e){return(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Flex,{align:"center",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{disabled:a||2===e.format.textColor,color:"good",height:"20px",mr:1,icon:"play",onClick:function(){return o("build_part",{id:e.id})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{color:"average",height:"20px",mr:1,icon:"plus-circle",onClick:function(){return o("add_queue_part",{id:e.id})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{inline:!0,textColor:h[e.format.textColor],children:e.name})}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{icon:"question-circle",transparent:!0,height:"20px",tooltip:"Build Time: "+e.printTime+"s. "+(e.desc||""),tooltipPosition:"left"})})]}),m&&(0,r.createComponentVNode)(2,d.Flex,{mb:2,children:Object.keys(e.cost).map((function(t){return(0,r.createComponentVNode)(2,d.Flex.Item,{width:"50px",color:h[e.format[t].color],children:(0,r.createComponentVNode)(2,V,{formatmoney:!0,style:{transform:"scale(0.75) translate(0%, 10%)"},name:t,amount:e.cost[t]})},t)}))})],0,e.name)}))]})},_=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data,i=a.isProcessingQueue,l=a.queue||[],u=e.queueMaterials,s=e.missingMaterials,m=e.textColors;return(0,r.createComponentVNode)(2,d.Flex,{height:"100%",width:"100%",direction:"column",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{height:0,grow:1,children:(0,r.createComponentVNode)(2,d.Section,{height:"100%",title:"Queue",overflowY:"auto",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Button.Confirm,{disabled:!l.length,color:"bad",icon:"minus-circle",content:"Clear Queue",onClick:function(){return o("clear_queue")}}),!!i&&(0,r.createComponentVNode)(2,d.Button,{disabled:!l.length,content:"Stop",icon:"stop",onClick:function(){return o("stop_queue")}})||(0,r.createComponentVNode)(2,d.Button,{disabled:!l.length,content:"Build Queue",icon:"play",onClick:function(){return o("build_queue")}})],0),children:(0,r.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,B)}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,L,{textColors:m})})]})})}),!!l.length&&(0,r.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,r.createComponentVNode)(2,d.Section,{title:"Material Cost",children:(0,r.createComponentVNode)(2,x,{queueMaterials:u,missingMaterials:s})})})]})},x=function(e,t){var n=e.queueMaterials,o=e.missingMaterials;return(0,r.createComponentVNode)(2,d.Flex,{wrap:"wrap",children:Object.keys(n).map((function(e){return(0,r.createComponentVNode)(2,d.Flex.Item,{width:"12%",children:[(0,r.createComponentVNode)(2,V,{formatmoney:!0,name:e,amount:n[e]}),!!o[e]&&(0,r.createComponentVNode)(2,d.Box,{textColor:"bad",style:{"text-align":"center"},children:(0,l.formatMoney)(o[e])})]},e)}))})},L=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data,i=e.textColors,l=a.queue||[];return l.length?l.map((function(e,t){return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.Flex,{mb:.5,direction:"column",justify:"center",wrap:"wrap",height:"20px",inline:!0,children:[(0,r.createComponentVNode)(2,d.Flex.Item,{basis:"content",children:(0,r.createComponentVNode)(2,d.Button,{height:"20px",mr:1,icon:"minus-circle",color:"bad",onClick:function(){return o("del_queue_part",{index:t+1})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{inline:!0,textColor:h[i[t]],children:e.name})})]})},e.name)})):(0,r.createFragment)([(0,r.createTextVNode)("No parts in queue.")],4)},B=function(e,t){var n=(0,c.useBackend)(t).data,o=n.buildingPart,a=n.storedPart;if(a){var i=a.name;return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.ProgressBar,{minValue:0,maxValue:1,value:1,color:"average",children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:i}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:"Fabricator outlet obstructed..."})]})})})}if(o){var l=o.name,u=o.duration,s=o.printTime,m=Math.ceil(u/10);return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.ProgressBar,{minValue:0,maxValue:s,value:u,children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:l}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:m>=0&&m+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var o=n(0),r=n(1),a=n(2);t.LoginInfo=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.authenticated,d=c.rank;if(c)return(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",l," (",d,")"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",content:"Logout and Eject ID",color:"good",float:"right",onClick:function(){return i("logout")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var o=n(0),r=n(1),a=n(2),i=n(61);t.LoginScreen=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.scan,u=l.isAI,s=l.isRobot;return(0,o.createComponentVNode)(2,i.FullscreenNotice,{title:"Welcome",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,o.createComponentVNode)(2,a.Box,{color:"label",my:"1rem",children:["ID:",(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d||"----------",ml:"0.5rem",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",disabled:!d,content:"Login",onClick:function(){return c("login",{login_type:1})}}),!!u&&(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return c("login",{login_type:2})}}),!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return c("login",{login_type:3})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapPanControls=t.OvermapFlightData=void 0;var o=n(0),r=(n(5),n(1)),a=n(2);t.OvermapFlightData=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.disableLimiterControls,d=c.ETAnext,u=c.speed,s=c.speed_color,m=c.accel,p=c.heading,f=c.accellimit;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ETA To Next Grid",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speed",color:s,children:[u," Gm/h"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceleration",children:[m," Gm/h"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heading",children:[p,"\xb0"]}),!l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceleration Limiter",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("accellimit")},children:[f," Gm/h"]})})||null]})};t.OvermapPanControls=function(e,t){var n=(0,r.useBackend)(t).act,i=e.disabled,c=e.actToDo,l=e.selected,d=void 0===l?function(e){return!1}:l;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(9),onClick:function(){return n(c,{dir:9})},icon:"arrow-up",iconRotation:-45}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(1),onClick:function(){return n(c,{dir:1})},icon:"arrow-up"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(5),onClick:function(){return n(c,{dir:5})},icon:"arrow-up",iconRotation:45})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(8),onClick:function(){return n(c,{dir:8})},icon:"arrow-left"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(0),onClick:function(){return n("brake")},icon:"ban"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(4),onClick:function(){return n(c,{dir:4})},icon:"arrow-right"})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(10),onClick:function(){return n(c,{dir:10})},icon:"arrow-down",iconRotation:45}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(2),onClick:function(){return n(c,{dir:2})},icon:"arrow-down"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(6),onClick:function(){return n(c,{dir:6})},icon:"arrow-down",iconRotation:-45})]})],4)}},function(e,t,n){"use strict";var o=n(11),r=n(6),a=n(93);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(7),r=n(94),a=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){"use strict";var o=n(7),r=n(95),a=o.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){"use strict";var o=n(20),r=n(97),a=n(23),i=n(16);e.exports=function(e,t){for(var n=r(t),c=i.f,l=a.f,d=0;dl;)o(c,n=t[l++])&&(~a(d,n)||d.push(n));return d}},function(e,t,n){"use strict";var o=n(100);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(12),i=n(68);e.exports=o?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),c=o.length,l=0;c>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(40);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(28),r=n(52).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return r(e)}catch(t){return i.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(15);t.f=o},function(e,t,n){"use strict";var o=n(17),r=n(46),a=n(14),i=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),c=a(n.length),l=r(e,c),d=r(t,c),u=arguments.length>2?arguments[2]:undefined,s=i((u===undefined?c:r(u,c))-d,c-l),m=1;for(d0;)d in n?n[l]=n[d]:delete n[l],l+=m,d+=m;return n}},function(e,t,n){"use strict";var o=n(57),r=n(14),a=n(53);e.exports=function i(e,t,n,c,l,d,u,s){for(var m,p=l,f=0,h=!!u&&a(u,s,3);f0&&o(m))p=i(e,t,m,r(m.length),p,d-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=m}p++}f++}return p}},function(e,t,n){"use strict";var o=n(12);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(i){var a=e["return"];throw a!==undefined&&o(a.call(e)),i}}},function(e,t,n){"use strict";var o=n(28),r=n(49),a=n(71),i=n(37),c=n(106),l=i.set,d=i.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=d(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var o,r,a,i=n(38),c=n(32),l=n(20),d=n(15),u=n(41),s=d("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(r=i(i(a)))!==Object.prototype&&(o=r):m=!0),o==undefined&&(o={}),u||l(o,s)||c(o,s,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:m}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var o=n(28),r=n(33),a=n(14),i=n(42),c=n(27),l=Math.min,d=[].lastIndexOf,u=!!d&&1/[1].lastIndexOf(1,-0)<0,s=i("lastIndexOf"),m=c("indexOf",{ACCESSORS:!0,1:0}),p=u||!s||!m;e.exports=p?function(e){if(u)return d.apply(this,arguments)||0;var t=o(this),n=a(t.length),i=n-1;for(arguments.length>1&&(i=l(i,r(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:d},function(e,t,n){"use strict";var o=n(33),r=n(14);e.exports=function(e){if(e===undefined)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var o=n(34),r=n(10),a=[].slice,i={},c=function(e,t,n){if(!(t in i)){for(var o=[],r=0;r1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),a(u.prototype,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return C(this,0===e?0:e,t)}}:{add:function(e){return C(this,e=0===e?0:e,e)}}),s&&o(u.prototype,"size",{get:function(){return p(this).size}}),u},setStrong:function(e,t,n){var o=t+" Iterator",r=h(t),a=h(o);d(e,t,(function(e,t){f(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(10),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(7),r=n(60).trim,a=n(86),i=o.parseInt,c=/^[+-]?0[Xx]/,l=8!==i(a+"08")||22!==i(a+"0x16");e.exports=l?function(e,t){var n=r(String(e));return i(n,t>>>0||(c.test(n)?16:10))}:i},function(e,t,n){"use strict";var o=n(11),r=n(68),a=n(28),i=n(76).f,c=function(e){return function(t){for(var n,c=a(t),l=r(c),d=l.length,u=0,s=[];d>u;)n=l[u++],o&&!i.call(c,n)||s.push(e?[n,c[n]]:c[n]);return s}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(7);e.exports=o.Promise},function(e,t,n){"use strict";var o=n(78);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,a,i,c,l,d,u,s=n(7),m=n(23).f,p=n(35),f=n(112).set,h=n(161),C=s.MutationObserver||s.WebKitMutationObserver,b=s.process,N=s.Promise,g="process"==p(b),V=m(s,"queueMicrotask"),v=V&&V.value;v||(o=function(){var e,t;for(g&&(e=b.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?i():a=undefined,n}}a=undefined,e&&e.enter()},g?i=function(){b.nextTick(o)}:C&&!h?(c=!0,l=document.createTextNode(""),new C(o).observe(l,{characterData:!0}),i=function(){l.data=c=!c}):N&&N.resolve?(d=N.resolve(undefined),u=d.then,i=function(){u.call(d,o)}):i=function(){f.call(s,o)}),e.exports=v||function(e){var t={fn:e,next:undefined};a&&(a.next=t),r||(r=t,i()),a=t}},function(e,t,n){"use strict";var o=n(12),r=n(10),a=n(164);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(34),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(4),r=n(89);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(78);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(372);e.exports=function(e,t){var n=o(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(17),r=n(14),a=n(104),i=n(103),c=n(53),l=n(13).aTypedArrayConstructor;e.exports=function(e){var t,n,d,u,s,m,p=o(e),f=arguments.length,h=f>1?arguments[1]:undefined,C=h!==undefined,b=a(p);if(b!=undefined&&!i(b))for(m=(s=b.call(p)).next,p=[];!(u=m.call(s)).done;)p.push(u.value);for(C&&f>2&&(h=c(h,arguments[2],2)),n=r(p.length),d=new(l(this))(n),t=0;n>t;t++)d[t]=C?h(p[t],t):p[t];return d}},function(e,t,n){"use strict";var o=n(72),r=n(56).getWeakData,a=n(12),i=n(10),c=n(59),l=n(74),d=n(22),u=n(20),s=n(37),m=s.set,p=s.getterFor,f=d.find,h=d.findIndex,C=0,b=function(e){return e.frozen||(e.frozen=new N)},N=function(){this.entries=[]},g=function(e,t){return f(e.entries,(function(e){return e[0]===t}))};N.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=h(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,d){var s=e((function(e,o){c(e,s,t),m(e,{type:t,id:C++,frozen:undefined}),o!=undefined&&l(o,e[d],e,n)})),f=p(t),h=function(e,t,n){var o=f(e),i=r(a(t),!0);return!0===i?b(o).set(t,n):i[o.id]=n,e};return o(s.prototype,{"delete":function(e){var t=f(this);if(!i(e))return!1;var n=r(e);return!0===n?b(t)["delete"](e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=f(this);if(!i(e))return!1;var n=r(e);return!0===n?b(t).has(e):n&&u(n,t.id)}}),o(s.prototype,n?{get:function(e){var t=f(this);if(i(e)){var n=r(e);return!0===n?b(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return h(this,e,t)}}:{add:function(e){return h(this,e,!0)}}),s}}},function(e,t,n){"use strict";t.__esModule=!0,t.perf=void 0;var o={mark:function(e,t){0},measure:function(e,t){0}};t.perf=o},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=t.recallWindowGeometry=t.storeWindowGeometry=t.getScreenSize=t.getScreenPosition=t.setWindowSize=t.setWindowPosition=t.getWindowSize=t.getWindowPosition=t.setWindowKey=void 0;var o=n(430),r=n(173);function a(e,t,n,o,r,a,i){try{var c=e[a](i),l=c.value}catch(d){return void n(d)}c.done?t(l):Promise.resolve(l).then(o,r)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function c(e){a(i,o,r,c,l,"next",e)}function l(e){a(i,o,r,c,l,"throw",e)}c(undefined)}))}}var c,l,d,u,s,m=(0,n(24).createLogger)("drag"),p=window.__windowId__,f=!1,h=!1,C=[0,0];t.setWindowKey=function(e){p=e};var b=function(){return[window.screenLeft,window.screenTop]};t.getWindowPosition=b;var N=function(){return[window.innerWidth,window.innerHeight]};t.getWindowSize=N;var g=function(e){var t=(0,r.vecAdd)(e,C);return Byond.winset(window.__windowId__,{pos:t[0]+","+t[1]})};t.setWindowPosition=g;var V=function(e){return Byond.winset(window.__windowId__,{size:e[0]+"x"+e[1]})};t.setWindowSize=V;var v=function(){return[0-C[0],0-C[1]]};t.getScreenPosition=v;var y=function(){return[window.screen.availWidth,window.screen.availHeight]};t.getScreenSize=y;var k=function(e){m.log("storing geometry");var t={pos:b(),size:N()};o.storage.set(e,t);var n=function(e,t,n){void 0===n&&(n=50);for(var o,r=[t],a=0;al&&(r[i]=l-t[i],a=!0)}return[a,r]};t.dragStartHandler=function(e){m.log("drag start"),f=!0,l=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",w),document.addEventListener("mouseup",B),w(e)};var B=function T(e){m.log("drag end"),w(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",T),f=!1,k(p)},w=function(e){f&&(e.preventDefault(),g((0,r.vecAdd)([e.screenX,e.screenY],l)))};t.resizeStartHandler=function(e,t){return function(n){d=[e,t],m.log("resize start",d),h=!0,l=[window.screenLeft-n.screenX,window.screenTop-n.screenY],u=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",I),document.addEventListener("mouseup",S),I(n)}};var S=function E(e){m.log("resize end",s),I(e),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",E),h=!1,k(p)},I=function(e){h&&(e.preventDefault(),(s=(0,r.vecAdd)(u,(0,r.vecMultiply)(d,(0,r.vecAdd)([e.screenX,e.screenY],(0,r.vecInverse)([window.screenLeft,window.screenTop]),l,[1,1]))))[0]=Math.max(s[0],150),s[1]=Math.max(s[1],50),V(s))}},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=void 0;var o=n(19),r=function(e,t){return e+t},a=function(e,t){return e-t},i=function(e,t){return e*t},c=function(e,t){return e/t}; + */t.toggleKitchenSink=r;var a=function(){return{type:"debug/toggleDebugLayout"}};t.toggleDebugLayout=a,(0,o.subscribeToHotKey)("F11",(function(){return{type:"debug/toggleDebugLayout"}})),(0,o.subscribeToHotKey)("F12",(function(){return{type:"debug/toggleKitchenSink"}})),(0,o.subscribeToHotKey)("Ctrl+Alt+[8]",(function(){setTimeout((function(){throw new Error("OOPSIE WOOPSIE!! UwU We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!")}))}));var i=function(e){return e.debug};t.selectDebug=i;t.useDebug=function(e){return i(e.store.getState())};t.debugReducer=function(e,t){void 0===e&&(e={});var n=t.type;t.payload;return"debug/toggleKitchenSink"===n?Object.assign({},e,{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===n?Object.assign({},e,{debugLayout:!e.debugLayout}):e}},function(e,t,n){"use strict";t.__esModule=!0,t.Layout=t.refocusLayout=void 0;var o=n(0),r=n(9),a=n(19);t.refocusLayout=function(){if(!Byond.IS_LTE_IE8){var e=document.getElementById("Layout__content");e&&e.focus()}};var i=function(e){var t=e.className,n=e.theme,a=void 0===n?"nanotrasen":n,i=e.children;return(0,o.createVNode)(1,"div","theme-"+a,(0,o.createVNode)(1,"div",(0,r.classes)(["Layout",t]),i,0),2)};t.Layout=i;i.Content=function(e){var t=e.className,n=e.scrollable,i=e.children,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","scrollable","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Layout__content",n&&"Layout__content--scrollable",t].concat((0,a.computeBoxClassName)(c))),i,0,Object.assign({id:"Layout__content"},(0,a.computeBoxProps)(c))))}},function(e,t,n){"use strict";t.__esModule=!0,t.AnimatedNumber=void 0;var o=n(5),r=n(0);var a=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)},i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:0},a(t.initial)?n.state.value=t.initial:a(t.value)&&(n.state.value=Number(t.value)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state,n=Number(t.value),o=Number(e.value);if(a(o)){var r=.5*n+.5*o;this.setState({value:r})}},i.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),50)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){var e=this.props,t=this.state,n=e.format,r=e.children,i=t.value,c=e.value;if(!a(c))return c||null;var l=i;if(n)l=n(i);else{var d=String(c).split(".")[1],u=d?d.length:0;l=(0,o.toFixed)(i,(0,o.clamp)(u,0,8))}return"function"==typeof r?r(l,i):l},r}(r.Component);t.AnimatedNumber=i},function(e,t,n){"use strict";t.__esModule=!0,t.ButtonInput=t.ButtonConfirm=t.ButtonCheckbox=t.Button=void 0;var o=n(0),r=n(9),a=n(93),i=n(3),c=n(24),l=n(19),d=n(126),u=n(176);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var p=(0,c.createLogger)("Button"),h=function(e){var t=e.className,n=e.fluid,c=e.icon,s=e.color,h=e.disabled,f=e.selected,C=e.tooltip,N=e.tooltipPosition,b=e.tooltipScale,g=e.ellipsis,V=e.content,v=e.iconRotation,k=e.iconSpin,y=e.iconColor,_=e.iconSize,B=e.children,L=e.onclick,w=e.onClick,x=m(e,["className","fluid","icon","color","disabled","selected","tooltip","tooltipPosition","tooltipScale","ellipsis","content","iconRotation","iconSpin","iconColor","iconSize","children","onclick","onClick"]),S=!(!V&&!B);return L&&p.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",h&&"Button--disabled",f&&"Button--selected",S&&"Button--hasContent",g&&"Button--ellipsis",s&&"string"==typeof s?"Button--color--"+s:"Button--color--default",t]),tabIndex:!h&&"0",unselectable:Byond.IS_LTE_IE8,onclick:function(e){(0,i.refocusLayout)(),!h&&w&&w(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!h&&w&&w(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},x,{children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:v,spin:k,color:y,fontSize:_}),V,B,C&&(0,o.createComponentVNode)(2,u.Tooltip,{content:C,position:N,scale:b})]})))};t.Button=h,h.defaultHooks=r.pureComponentHooks;var f=function(e){var t=e.checked,n=m(e,["checked"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,h,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=f,h.Checkbox=f;var C=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}s(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,r=void 0===n?"Confirm?":n,a=t.confirmColor,i=void 0===a?"bad":a,c=t.confirmIcon,l=t.icon,d=t.color,u=t.content,s=t.onClick,p=m(t,["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,h,Object.assign({content:this.state.clickedOnce?r:u,icon:this.state.clickedOnce?c:l,color:this.state.clickedOnce?i:d,onClick:function(){return e.state.clickedOnce?s():e.setClickedOnce(!0)}},p)))},t}(o.Component);t.ButtonConfirm=C,h.Confirm=C;var N=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={inInput:!1},t}s(t,e);var n=t.prototype;return n.setInInput=function(e){if(this.setState({inInput:e}),this.inputRef){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,i=t.content,c=t.icon,s=t.iconRotation,p=t.iconSpin,h=t.tooltip,f=t.tooltipPosition,C=t.color,N=void 0===C?"default":C,b=(t.placeholder,t.maxLength,m(t,["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","placeholder","maxLength"]));return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid","Button--color--"+N])},b,{onClick:function(){return e.setInInput(!0)},children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:s,spin:p}),(0,o.createVNode)(1,"div",null,i,0),(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===a.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===a.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),h&&(0,o.createComponentVNode)(2,u.Tooltip,{content:h,position:f})]})))},t}(o.Component);t.ButtonInput=N,h.Input=N},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var o=n(0),r=n(9),a=n(19);var i=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,l=e.className,d=e.style,u=void 0===d?{}:d,s=e.rotation,m=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["name","size","spin","className","style","rotation"]);n&&(u["font-size"]=100*n+"%"),"number"==typeof s&&(u.transform="rotate("+s+"deg)");var p=i.test(t),h=t.replace(i,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"i",className:(0,r.classes)([l,p?"far":"fas","fa-"+h,c&&"fa-spin"]),style:u},m)))};t.Icon=c,c.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(5),a=n(9),i=n(124);var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},l=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,r),value:o,internalValue:o}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,i=t.step,l=t.stepPixelSize,d=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),u=c(e,d)-n.origin;if(t.dragging){var s=Number.isFinite(o)?o%i:0;n.internalValue=(0,r.clamp)(n.internalValue+u*i/l,o-i,a+i),n.value=(0,r.clamp)(n.internalValue-n.internalValue%i+s,o,a),n.origin=c(e,d)}else Math.abs(u)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,i=a.dragging,c=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!i,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),i)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this,t=this.state,n=t.dragging,a=t.editing,c=t.value,l=t.suppressingFlicker,d=this.props,u=d.animated,s=d.value,m=d.unit,p=d.minValue,h=d.maxValue,f=d.format,C=d.onChange,N=d.onDrag,b=d.children,g=d.forcedInputWidth,V=d.height,v=d.lineHeight,k=d.fontSize,y=s;(n||l)&&(y=c);var _=function(e){return e+(m?" "+m:"")},B=u&&!n&&!l&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:y,format:f,children:_})||_(f?f(y):y),L=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:a?undefined:"none",height:V,width:g,"line-height":v,"font-size":k},onBlur:function(t){if(a){var n=(0,r.clamp)(t.target.value,p,h);e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),N&&N(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,p,h);return e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),void(N&&N(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return b({dragging:n,editing:a,value:s,displayValue:y,displayElement:B,inputElement:L,handleDragStart:this.handleDragStart})},a}(o.Component);t.DraggableControl=l,l.defaultHooks=a.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var o=n(0),r=n(9),a=n(19);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.className,n=e.collapsing,c=e.children,l=i(e,["className","collapsing","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Table=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.header,c=i(e,["className","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(c))))};t.TableRow=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.collapsing,c=e.header,l=i(e,["className","collapsing","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(l))))};t.TableCell=d,d.defaultHooks=r.pureComponentHooks,c.Row=l,c.Cell=d},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(5),a=n(9),i=n(124),c=n(19);var l=function(e){var t,n;function l(t){var n;n=e.call(this,t)||this;var a=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:a,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,i=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var d=Number.isFinite(o)?o%i:0;n.internalValue=(0,r.clamp)(n.internalValue+l*i/c,o-i,a+i),n.value=(0,r.clamp)(n.internalValue-n.internalValue%i+d,o,a),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,i=a.dragging,c=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!i,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),i)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state,n=t.dragging,l=t.editing,d=t.value,u=t.suppressingFlicker,s=this.props,m=s.className,p=s.fluid,h=s.animated,f=s.value,C=s.unit,N=s.minValue,b=s.maxValue,g=s.height,V=s.width,v=s.lineHeight,k=s.fontSize,y=s.format,_=s.onChange,B=s.onDrag,L=f;(n||u)&&(L=d);var w=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(C?" "+C:""),0,{unselectable:Byond.IS_LTE_IE8})},x=h&&!n&&!u&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:L,format:y,children:w})||w(y?y(L):L);return(0,o.createComponentVNode)(2,c.Box,{className:(0,a.classes)(["NumberInput",p&&"NumberInput--fluid",m]),minWidth:V,minHeight:g,lineHeight:v,fontSize:k,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((L-N)/(b-N)*100,0,100)+"%"}}),2),x,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:l?undefined:"none",height:g,"line-height":v,"font-size":k},onBlur:function(t){if(l){var n=(0,r.clamp)(t.target.value,N,b);e.setState({editing:!1,value:n}),e.suppressFlicker(),_&&_(t,n),B&&B(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,N,b);return e.setState({editing:!1,value:n}),e.suppressFlicker(),_&&_(t,n),void(B&&B(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},l}(o.Component);t.NumberInput=l,l.defaultHooks=a.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";t.__esModule=!0,t.Materials=t.ExosuitFabricator=void 0;var o,r=n(0),a=n(9),i=n(17),c=n(1),l=n(21),d=n(2),u=n(3),s=n(7);function m(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return p(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn?{color:2,deficit:e-n}:t>n?{color:1,deficit:e}:e+t>n?{color:1,deficit:e+t-n}:{color:0,deficit:0}},N=function(e,t,n){var o={textColor:0};return Object.keys(n.cost).forEach((function(r){o[r]=C(n.cost[r],t[r],e[r]),o[r].color>o.textColor&&(o.textColor=o[r].color)})),o};t.ExosuitFabricator=function(e,t){var n,o,a=(0,c.useBackend)(t),i=a.act,l=a.data,s=l.queue||[],m=(n=l.materials||[],o={},n.forEach((function(e){o[e.name]=e.amount})),o),p=function(e,t){var n={},o={},r={},a={};return t.forEach((function(t,i){a[i]=0,Object.keys(t.cost).forEach((function(c){n[c]=n[c]||0,r[c]=r[c]||0,o[c]=C(t.cost[c],n[c],e[c]),0!==o[c].color?a[i]1&&l0)&&(0,r.createComponentVNode)(2,d.Flex.Item,{width:"80px",children:[(0,r.createComponentVNode)(2,V,{name:e.name,amount:e.amount,formatsi:!0}),!i&&(0,r.createComponentVNode)(2,d.Box,{mt:1,style:{"text-align":"center"},children:(0,r.createComponentVNode)(2,b,{material:e})})]},e.name)||null}))})};t.Materials=g;var V=function(e,t){var n=e.name,o=e.amount,i=e.formatsi,c=e.formatmoney,u=e.color,m=e.style;return(0,r.createComponentVNode)(2,d.Flex,{direction:"column",align:"center",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{className:(0,a.classes)(["sheetmaterials32x32",h[n]]),position:"relative",style:m,children:(0,r.createComponentVNode)(2,d.Tooltip,{position:"bottom",content:(0,s.toTitleCase)(n)})})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{textColor:u,style:{"text-align":"center"},children:i&&(0,l.formatSiUnit)(o,0)||c&&(0,l.formatMoney)(o)||o})})]})},v=function(e,t){var n=(0,c.useBackend)(t).data,o=n.partSets||[],a=n.buildableParts||{},i=(0,c.useSharedState)(t,"part_tab",o.length?a[0]:""),l=i[0],u=i[1];return(0,r.createComponentVNode)(2,d.Tabs,{vertical:!0,children:o.map((function(e){return!!a[e]&&(0,r.createComponentVNode)(2,d.Tabs.Tab,{selected:e===l,disabled:!a[e],onClick:function(){return u(e)},children:e},e)}))})},k=function(e,t){var n,o=(0,c.useBackend)(t).data,a=function(e){for(var t,n=m(e);!(t=n()).done;){var o=t.value;if(u[o])return o}return null},l=o.partSets||[],u=o.buildableParts||[],p=e.queueMaterials,h=e.materials,f=(0,c.useSharedState)(t,"part_tab",a(l)),C=f[0],b=f[1],g=(0,c.useSharedState)(t,"search_text",""),V=g[0],v=g[1];if(!C||!u[C]){var k=a(l);if(!k)return;b(k)}return V?(n=[],function(e,t){var n=[];if(e.length){var o=(0,s.createSearch)(e,(function(e){return(e.name||"")+(e.desc||"")+(e.searchMeta||"")}));return Object.keys(t).forEach((function(e){t[e].filter(o).forEach((function(e){n.push(e)}))})),n=(0,i.uniqBy)((function(e){return e.name}))(n)}}(V,u).forEach((function(e){e.format=N(h,p,e),n.push(e)}))):(n={Parts:[]},u[C].forEach((function(e){e.format=N(h,p,e),e.subCategory?(e.subCategory in n||(n[e.subCategory]=[]),n[e.subCategory].push(e)):n.Parts.push(e)}))),(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Section,{children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{mr:1,children:(0,r.createComponentVNode)(2,d.Icon,{name:"search"})}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1,children:(0,r.createComponentVNode)(2,d.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return v(t)}})})]})}),!!V&&(0,r.createComponentVNode)(2,y,{name:"Search Results",parts:n,forceShow:!0,placeholder:"No matching results..."})||Object.keys(n).map((function(e){return(0,r.createComponentVNode)(2,y,{name:e,parts:n[e]},e)}))],0)},y=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data.buildingPart,i=e.parts,l=e.name,u=e.forceShow,s=e.placeholder,m=(0,c.useSharedState)(t,"display_mats",!1)[0];return(!!i.length||u)&&(0,r.createComponentVNode)(2,d.Section,{title:l,buttons:(0,r.createComponentVNode)(2,d.Button,{disabled:!i.length,color:"good",content:"Queue All",icon:"plus-circle",onClick:function(){return o("add_queue_set",{part_list:i.map((function(e){return e.id}))})}}),children:[!i.length&&s,i.map((function(e){return(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Flex,{align:"center",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{disabled:a||2===e.format.textColor,color:"good",height:"20px",mr:1,icon:"play",onClick:function(){return o("build_part",{id:e.id})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{color:"average",height:"20px",mr:1,icon:"plus-circle",onClick:function(){return o("add_queue_part",{id:e.id})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{inline:!0,textColor:f[e.format.textColor],children:e.name})}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Button,{icon:"question-circle",transparent:!0,height:"20px",tooltip:"Build Time: "+e.printTime+"s. "+(e.desc||""),tooltipPosition:"left"})})]}),m&&(0,r.createComponentVNode)(2,d.Flex,{mb:2,children:Object.keys(e.cost).map((function(t){return(0,r.createComponentVNode)(2,d.Flex.Item,{width:"50px",color:f[e.format[t].color],children:(0,r.createComponentVNode)(2,V,{formatmoney:!0,style:{transform:"scale(0.75) translate(0%, 10%)"},name:t,amount:e.cost[t]})},t)}))})],0,e.name)}))]})},_=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data,i=a.isProcessingQueue,l=a.queue||[],u=e.queueMaterials,s=e.missingMaterials,m=e.textColors;return(0,r.createComponentVNode)(2,d.Flex,{height:"100%",width:"100%",direction:"column",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{height:0,grow:1,children:(0,r.createComponentVNode)(2,d.Section,{height:"100%",title:"Queue",overflowY:"auto",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,d.Button.Confirm,{disabled:!l.length,color:"bad",icon:"minus-circle",content:"Clear Queue",onClick:function(){return o("clear_queue")}}),!!i&&(0,r.createComponentVNode)(2,d.Button,{disabled:!l.length,content:"Stop",icon:"stop",onClick:function(){return o("stop_queue")}})||(0,r.createComponentVNode)(2,d.Button,{disabled:!l.length,content:"Build Queue",icon:"play",onClick:function(){return o("build_queue")}})],0),children:(0,r.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,w)}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,L,{textColors:m})})]})})}),!!l.length&&(0,r.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,r.createComponentVNode)(2,d.Section,{title:"Material Cost",children:(0,r.createComponentVNode)(2,B,{queueMaterials:u,missingMaterials:s})})})]})},B=function(e,t){var n=e.queueMaterials,o=e.missingMaterials;return(0,r.createComponentVNode)(2,d.Flex,{wrap:"wrap",children:Object.keys(n).map((function(e){return(0,r.createComponentVNode)(2,d.Flex.Item,{width:"12%",children:[(0,r.createComponentVNode)(2,V,{formatmoney:!0,name:e,amount:n[e]}),!!o[e]&&(0,r.createComponentVNode)(2,d.Box,{textColor:"bad",style:{"text-align":"center"},children:(0,l.formatMoney)(o[e])})]},e)}))})},L=function(e,t){var n=(0,c.useBackend)(t),o=n.act,a=n.data,i=e.textColors,l=a.queue||[];return l.length?l.map((function(e,t){return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.Flex,{mb:.5,direction:"column",justify:"center",wrap:"wrap",height:"20px",inline:!0,children:[(0,r.createComponentVNode)(2,d.Flex.Item,{basis:"content",children:(0,r.createComponentVNode)(2,d.Button,{height:"20px",mr:1,icon:"minus-circle",color:"bad",onClick:function(){return o("del_queue_part",{index:t+1})}})}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,d.Box,{inline:!0,textColor:f[i[t]],children:e.name})})]})},e.name)})):(0,r.createFragment)([(0,r.createTextVNode)("No parts in queue.")],4)},w=function(e,t){var n=(0,c.useBackend)(t).data,o=n.buildingPart,a=n.storedPart;if(a){var i=a.name;return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.ProgressBar,{minValue:0,maxValue:1,value:1,color:"average",children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:i}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:"Fabricator outlet obstructed..."})]})})})}if(o){var l=o.name,u=o.duration,s=o.printTime,m=Math.ceil(u/10);return(0,r.createComponentVNode)(2,d.Box,{children:(0,r.createComponentVNode)(2,d.ProgressBar,{minValue:0,maxValue:s,value:u,children:(0,r.createComponentVNode)(2,d.Flex,{children:[(0,r.createComponentVNode)(2,d.Flex.Item,{children:l}),(0,r.createComponentVNode)(2,d.Flex.Item,{grow:1}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:m>=0&&m+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var o=n(0),r=n(1),a=n(2);t.LoginInfo=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.authenticated,d=c.rank;if(c)return(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",l," (",d,")"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",content:"Logout and Eject ID",color:"good",float:"right",onClick:function(){return i("logout")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var o=n(0),r=n(1),a=n(2),i=n(61);t.LoginScreen=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.scan,u=l.isAI,s=l.isRobot;return(0,o.createComponentVNode)(2,i.FullscreenNotice,{title:"Welcome",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,o.createComponentVNode)(2,a.Box,{color:"label",my:"1rem",children:["ID:",(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d||"----------",ml:"0.5rem",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",disabled:!d,content:"Login",onClick:function(){return c("login",{login_type:1})}}),!!u&&(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return c("login",{login_type:2})}}),!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return c("login",{login_type:3})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.IdentificationComputerCrewManifest=t.IdentificationComputerRegions=t.IdentificationComputerAccessModification=t.IdentificationComputerPrinting=t.IdentificationComputerContent=t.IdentificationComputer=void 0;var o=n(0),r=n(17),a=n(1),i=n(2),c=n(3),l=n(7),d=n(32);t.IdentificationComputer=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:700,children:(0,o.createComponentVNode)(2,c.Window.Content,{resizable:!0,children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.ntos,d=c.mode,u=c.has_modify,p=c.printing,f=(0,o.createComponentVNode)(2,m,{ntos:l});return l&&!c.have_id_slot?f=(0,o.createComponentVNode)(2,h):p?f=(0,o.createComponentVNode)(2,s):1===d&&(f=(0,o.createComponentVNode)(2,h)),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(!l||!!c.have_id_slot)&&(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"home",selected:0===d,onClick:function(){return r("mode",{mode_target:0})},children:"Access Modification"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"home",selected:1===d,onClick:function(){return r("mode",{mode_target:1})},children:"Crew Manifest"}),!l||!!c.have_printer&&(0,o.createComponentVNode)(2,i.Tabs.Tab,{float:"right",icon:"print",onClick:function(){return r("print")},disabled:!d&&!u,color:"",children:"Print"})]}),f],0)};t.IdentificationComputerContent=u;var s=function(e,t){return(0,o.createComponentVNode)(2,i.Section,{title:"Printing",children:"Please wait..."})};t.IdentificationComputerPrinting=s;var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,d=e.ntos,u=c.station_name,s=c.target_name,m=c.target_owner,h=c.scan_name,f=c.authenticated,C=c.has_modify,N=c.account_number,b=c.centcom_access,g=c.all_centcom_access,V=(c.regions,c.id_rank),v=c.departments;return(0,o.createComponentVNode)(2,i.Section,{title:"Access Modification",children:[!f&&(0,o.createComponentVNode)(2,i.Box,{italic:!0,mb:1,children:"Please insert the IDs into the terminal to proceed."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Identitity",children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",fluid:!0,content:s,onClick:function(){return r("modify")}})}),!d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Authorized Identitity",children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",fluid:!0,content:h,onClick:function(){return r("scan")}})})]}),!!f&&!!C&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Details",level:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Registered Name",children:(0,o.createComponentVNode)(2,i.Input,{value:m,fluid:!0,onInput:function(e,t){return r("reg",{reg:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Number",children:(0,o.createComponentVNode)(2,i.Input,{value:N,fluid:!0,onInput:function(e,t){return r("account",{account:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Dismissals",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"bad",icon:"exclamation-triangle",confirmIcon:"fire",fluid:!0,content:"Dismiss "+m,confirmContent:"You are dismissing "+m+", confirm?",onClick:function(){return r("terminate")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Assignment",level:2,children:(0,o.createComponentVNode)(2,i.Table,{children:[v.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,verticalAlign:"middle",children:e.department_name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:e.job===V,onClick:function(){return r("assign",{assign_target:e.job})},children:(0,l.decodeHtmlEntities)(e.display_name)},e.job)}))})]}),(0,o.createComponentVNode)(2,i.Box,{mt:-1,children:"\xa0"}),(0,o.createTextVNode)(" ")],0,e.department_name)})),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,verticalAlign:"middle",children:"Special"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("assign",{assign_target:"Custom"})},children:"Custom"})})]})]})}),!!b&&(0,o.createComponentVNode)(2,i.Section,{title:"Central Command",level:2,children:g.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,selected:e.allowed,onClick:function(){return r("access",{access_target:e.ref,allowed:e.allowed})},children:(0,l.decodeHtmlEntities)(e.desc)})},e.ref)}))})||(0,o.createComponentVNode)(2,i.Section,{title:u,level:2,children:(0,o.createComponentVNode)(2,p,{actName:"access"})})],0)]})};t.IdentificationComputerAccessModification=m;var p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=e.actName,s=d.regions;return(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",spacing:1,children:(0,r.sortBy)((function(e){return e.name}))(s).map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{mb:1,basis:"content",grow:1,children:(0,o.createComponentVNode)(2,i.Section,{title:e.name,height:"100%",children:(0,r.sortBy)((function(e){return e.desc}))(e.accesses).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,selected:e.allowed,onClick:function(){return c(u,{access_target:e.ref,allowed:e.allowed})},children:(0,l.decodeHtmlEntities)(e.desc)})},e.ref)}))})},e.name)}))})};t.IdentificationComputerRegions=p;var h=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.manifest);return(0,o.createComponentVNode)(2,i.Section,{title:"Crew Manifest",noTopPadding:!0,children:r.map((function(e){return!!e.elems.length&&(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:d.COLORS.manifest[e.cat.toLowerCase()],m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:e.cat})}),level:2,children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Active"})]}),e.elems.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{color:"average",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.active})]},e.name+e.rank)}))]})},e.cat)}))})};t.IdentificationComputerCrewManifest=h},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapPanControls=t.OvermapFlightData=void 0;var o=n(0),r=(n(5),n(1)),a=n(2);t.OvermapFlightData=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.disableLimiterControls,d=c.ETAnext,u=c.speed,s=c.speed_color,m=c.accel,p=c.heading,h=c.accellimit;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ETA To Next Grid",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speed",color:s,children:[u," Gm/h"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceleration",children:[m," Gm/h"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heading",children:[p,"\xb0"]}),!l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceleration Limiter",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("accellimit")},children:[h," Gm/h"]})})||null]})};t.OvermapPanControls=function(e,t){var n=(0,r.useBackend)(t).act,i=e.disabled,c=e.actToDo,l=e.selected,d=void 0===l?function(e){return!1}:l;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(9),onClick:function(){return n(c,{dir:9})},icon:"arrow-up",iconRotation:-45}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(1),onClick:function(){return n(c,{dir:1})},icon:"arrow-up"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(5),onClick:function(){return n(c,{dir:5})},icon:"arrow-up",iconRotation:45})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(8),onClick:function(){return n(c,{dir:8})},icon:"arrow-left"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(0),onClick:function(){return n("brake")},icon:"ban"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(4),onClick:function(){return n(c,{dir:4})},icon:"arrow-right"})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(10),onClick:function(){return n(c,{dir:10})},icon:"arrow-down",iconRotation:45}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(2),onClick:function(){return n(c,{dir:2})},icon:"arrow-down"}),(0,o.createComponentVNode)(2,a.Button,{disabled:i,selected:d(6),onClick:function(){return n(c,{dir:6})},icon:"arrow-down",iconRotation:-45})]})],4)}},function(e,t,n){"use strict";var o=n(11),r=n(6),a=n(94);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(8),r=n(95),a=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){"use strict";var o=n(8),r=n(96),a=o.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){"use strict";var o=n(20),r=n(98),a=n(23),i=n(16);e.exports=function(e,t){for(var n=r(t),c=i.f,l=a.f,d=0;dl;)o(c,n=t[l++])&&(~a(d,n)||d.push(n));return d}},function(e,t,n){"use strict";var o=n(101);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(12),i=n(68);e.exports=o?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),c=o.length,l=0;c>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(40);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(28),r=n(52).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return r(e)}catch(t){return i.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(15);t.f=o},function(e,t,n){"use strict";var o=n(18),r=n(46),a=n(14),i=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),c=a(n.length),l=r(e,c),d=r(t,c),u=arguments.length>2?arguments[2]:undefined,s=i((u===undefined?c:r(u,c))-d,c-l),m=1;for(d0;)d in n?n[l]=n[d]:delete n[l],l+=m,d+=m;return n}},function(e,t,n){"use strict";var o=n(57),r=n(14),a=n(53);e.exports=function i(e,t,n,c,l,d,u,s){for(var m,p=l,h=0,f=!!u&&a(u,s,3);h0&&o(m))p=i(e,t,m,r(m.length),p,d-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=m}p++}h++}return p}},function(e,t,n){"use strict";var o=n(12);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(i){var a=e["return"];throw a!==undefined&&o(a.call(e)),i}}},function(e,t,n){"use strict";var o=n(28),r=n(49),a=n(71),i=n(38),c=n(107),l=i.set,d=i.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=d(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var o,r,a,i=n(39),c=n(33),l=n(20),d=n(15),u=n(41),s=d("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(r=i(i(a)))!==Object.prototype&&(o=r):m=!0),o==undefined&&(o={}),u||l(o,s)||c(o,s,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:m}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var o=n(28),r=n(34),a=n(14),i=n(42),c=n(27),l=Math.min,d=[].lastIndexOf,u=!!d&&1/[1].lastIndexOf(1,-0)<0,s=i("lastIndexOf"),m=c("indexOf",{ACCESSORS:!0,1:0}),p=u||!s||!m;e.exports=p?function(e){if(u)return d.apply(this,arguments)||0;var t=o(this),n=a(t.length),i=n-1;for(arguments.length>1&&(i=l(i,r(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:d},function(e,t,n){"use strict";var o=n(34),r=n(14);e.exports=function(e){if(e===undefined)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var o=n(35),r=n(10),a=[].slice,i={},c=function(e,t,n){if(!(t in i)){for(var o=[],r=0;r1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!N(this,e)}}),a(u.prototype,n?{get:function(e){var t=N(this,e);return t&&t.value},set:function(e,t){return C(this,0===e?0:e,t)}}:{add:function(e){return C(this,e=0===e?0:e,e)}}),s&&o(u.prototype,"size",{get:function(){return p(this).size}}),u},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),a=f(o);d(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(10),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(8),r=n(60).trim,a=n(87),i=o.parseInt,c=/^[+-]?0[Xx]/,l=8!==i(a+"08")||22!==i(a+"0x16");e.exports=l?function(e,t){var n=r(String(e));return i(n,t>>>0||(c.test(n)?16:10))}:i},function(e,t,n){"use strict";var o=n(11),r=n(68),a=n(28),i=n(77).f,c=function(e){return function(t){for(var n,c=a(t),l=r(c),d=l.length,u=0,s=[];d>u;)n=l[u++],o&&!i.call(c,n)||s.push(e?[n,c[n]]:c[n]);return s}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(8);e.exports=o.Promise},function(e,t,n){"use strict";var o=n(79);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,a,i,c,l,d,u,s=n(8),m=n(23).f,p=n(36),h=n(113).set,f=n(162),C=s.MutationObserver||s.WebKitMutationObserver,N=s.process,b=s.Promise,g="process"==p(N),V=m(s,"queueMicrotask"),v=V&&V.value;v||(o=function(){var e,t;for(g&&(e=N.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?i():a=undefined,n}}a=undefined,e&&e.enter()},g?i=function(){N.nextTick(o)}:C&&!f?(c=!0,l=document.createTextNode(""),new C(o).observe(l,{characterData:!0}),i=function(){l.data=c=!c}):b&&b.resolve?(d=b.resolve(undefined),u=d.then,i=function(){u.call(d,o)}):i=function(){h.call(s,o)}),e.exports=v||function(e){var t={fn:e,next:undefined};a&&(a.next=t),r||(r=t,i()),a=t}},function(e,t,n){"use strict";var o=n(12),r=n(10),a=n(165);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(35),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(4),r=n(90);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(79);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(375);e.exports=function(e,t){var n=o(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(18),r=n(14),a=n(105),i=n(104),c=n(53),l=n(13).aTypedArrayConstructor;e.exports=function(e){var t,n,d,u,s,m,p=o(e),h=arguments.length,f=h>1?arguments[1]:undefined,C=f!==undefined,N=a(p);if(N!=undefined&&!i(N))for(m=(s=N.call(p)).next,p=[];!(u=m.call(s)).done;)p.push(u.value);for(C&&h>2&&(f=c(f,arguments[2],2)),n=r(p.length),d=new(l(this))(n),t=0;n>t;t++)d[t]=C?f(p[t],t):p[t];return d}},function(e,t,n){"use strict";var o=n(72),r=n(56).getWeakData,a=n(12),i=n(10),c=n(59),l=n(74),d=n(22),u=n(20),s=n(38),m=s.set,p=s.getterFor,h=d.find,f=d.findIndex,C=0,N=function(e){return e.frozen||(e.frozen=new b)},b=function(){this.entries=[]},g=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};b.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=f(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,d){var s=e((function(e,o){c(e,s,t),m(e,{type:t,id:C++,frozen:undefined}),o!=undefined&&l(o,e[d],e,n)})),h=p(t),f=function(e,t,n){var o=h(e),i=r(a(t),!0);return!0===i?N(o).set(t,n):i[o.id]=n,e};return o(s.prototype,{"delete":function(e){var t=h(this);if(!i(e))return!1;var n=r(e);return!0===n?N(t)["delete"](e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!i(e))return!1;var n=r(e);return!0===n?N(t).has(e):n&&u(n,t.id)}}),o(s.prototype,n?{get:function(e){var t=h(this);if(i(e)){var n=r(e);return!0===n?N(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return f(this,e,t)}}:{add:function(e){return f(this,e,!0)}}),s}}},function(e,t,n){"use strict";t.__esModule=!0,t.perf=void 0;var o={mark:function(e,t){0},measure:function(e,t){0}};t.perf=o},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=t.recallWindowGeometry=t.storeWindowGeometry=t.getScreenSize=t.getScreenPosition=t.setWindowSize=t.setWindowPosition=t.getWindowSize=t.getWindowPosition=t.setWindowKey=void 0;var o=n(433),r=n(174);function a(e,t,n,o,r,a,i){try{var c=e[a](i),l=c.value}catch(d){return void n(d)}c.done?t(l):Promise.resolve(l).then(o,r)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function c(e){a(i,o,r,c,l,"next",e)}function l(e){a(i,o,r,c,l,"throw",e)}c(undefined)}))}}var c,l,d,u,s,m=(0,n(24).createLogger)("drag"),p=window.__windowId__,h=!1,f=!1,C=[0,0];t.setWindowKey=function(e){p=e};var N=function(){return[window.screenLeft,window.screenTop]};t.getWindowPosition=N;var b=function(){return[window.innerWidth,window.innerHeight]};t.getWindowSize=b;var g=function(e){var t=(0,r.vecAdd)(e,C);return Byond.winset(window.__windowId__,{pos:t[0]+","+t[1]})};t.setWindowPosition=g;var V=function(e){return Byond.winset(window.__windowId__,{size:e[0]+"x"+e[1]})};t.setWindowSize=V;var v=function(){return[0-C[0],0-C[1]]};t.getScreenPosition=v;var k=function(){return[window.screen.availWidth,window.screen.availHeight]};t.getScreenSize=k;var y=function(e){m.log("storing geometry");var t={pos:N(),size:b()};o.storage.set(e,t);var n=function(e,t,n){void 0===n&&(n=50);for(var o,r=[t],a=0;al&&(r[i]=l-t[i],a=!0)}return[a,r]};t.dragStartHandler=function(e){m.log("drag start"),h=!0,l=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),x(e)};var w=function T(e){m.log("drag end"),x(e),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T),h=!1,y(p)},x=function(e){h&&(e.preventDefault(),g((0,r.vecAdd)([e.screenX,e.screenY],l)))};t.resizeStartHandler=function(e,t){return function(n){d=[e,t],m.log("resize start",d),f=!0,l=[window.screenLeft-n.screenX,window.screenTop-n.screenY],u=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",I),document.addEventListener("mouseup",S),I(n)}};var S=function E(e){m.log("resize end",s),I(e),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",E),f=!1,y(p)},I=function(e){f&&(e.preventDefault(),(s=(0,r.vecAdd)(u,(0,r.vecMultiply)(d,(0,r.vecAdd)([e.screenX,e.screenY],(0,r.vecInverse)([window.screenLeft,window.screenTop]),l,[1,1]))))[0]=Math.max(s[0],150),s[1]=Math.max(s[1],50),V(s))}},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=void 0;var o=n(17),r=function(e,t){return e+t},a=function(e,t){return e-t},i=function(e,t){return e*t},c=function(e,t){return e/t}; /** * N-dimensional vector manipulation functions. * @@ -22,14 +22,14 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */t.vecAdd=function(){for(var e=arguments.length,t=new Array(e),n=0;n35;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a,i&&"Tooltip--scale--"+Math.floor(i)]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var o=n(0),r=n(9),a=n(18);t.Dimmer=function(e){var t=e.className,n=e.children,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Dimmer"].concat(t))},i,{children:(0,o.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var o=n(0),r=n(9);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,o.createVNode)(1,"div",(0,r.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var o=n(0),r=n(9),a=n(18);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.className,n=e.direction,o=e.wrap,a=e.align,c=e.alignContent,l=e.justify,d=e.inline,u=e.spacing,s=void 0===u?0:u,m=e.spacingPrecise,p=void 0===m?0:m,f=i(e,["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"]);return Object.assign({className:(0,r.classes)(["Flex",Byond.IS_LTE_IE10&&("column"===n?"Flex--iefix--column":"Flex--iefix"),d&&"Flex--inline",s>0&&"Flex--spacing--"+s,p>0&&"Flex--spacingPrecise--"+p,t]),style:Object.assign({},f.style,{"flex-direction":n,"flex-wrap":o,"align-items":a,"align-content":c,"justify-content":l})},f)};t.computeFlexProps=c;var l=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},c(e))))};t.Flex=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.grow,o=e.order,c=e.shrink,l=e.basis,d=void 0===l?e.width:l,u=e.align,s=i(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,r.classes)(["Flex__item",Byond.IS_LTE_IE10&&"Flex__item--iefix",t]),style:Object.assign({},s.style,{"flex-grow":n,"flex-shrink":c,"flex-basis":(0,a.unit)(d),order:o,"align-self":u})},s)};t.computeFlexItemProps=d;var u=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},d(e))))};t.FlexItem=u,u.defaultHooks=r.pureComponentHooks,l.Item=u},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var o=n(0),r=n(9),a=n(8),i=n(1),c=n(2),l=n(39),d=n(121),u=n(172),s=n(24),m=n(174),p=n(123);var f=(0,s.createLogger)("Window"),h=[400,600],C=function(e){var t,n;function c(){return e.apply(this,arguments)||this}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){var e=(0,i.useBackend)(this.context),t=e.config;if(!e.suspended){f.log("mounting");var n=Object.assign({size:h},t.window);this.props.width&&this.props.height&&(n.size=[this.props.width,this.props.height]),(0,u.setWindowKey)(t.window.key),(0,u.recallWindowGeometry)(t.window.key,n),(0,p.refocusLayout)()}},s.render=function(){var e,t=this.props,n=t.resizable,c=t.theme,s=t.title,h=t.children,C=(0,i.useBackend)(this.context),b=C.config,g=C.suspended,V=(0,d.useDebug)(this.context).debugLayout,v=(0,m.useDispatch)(this.context),y=null==(e=b.window)?void 0:e.fancy,k=b.user.observer?b.status=0||(r[n]=e[n]);return r}(e,["className","fitted","scrollable","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,p.Layout.Content,Object.assign({scrollable:a,className:(0,r.classes)(["Window__content",t])},c,{children:n&&i||(0,o.createVNode)(1,"div","Window__contentPadding",i,0)})))};var b=function(e){switch(e){case l.UI_INTERACTIVE:return"good";case l.UI_UPDATE:return"average";case l.UI_DISABLED:default:return"bad"}},N=function(e,t){var n=e.className,i=e.title,l=e.status,d=e.fancy,u=e.onDragStart,s=e.onClose;(0,m.useDispatch)(t);return(0,o.createVNode)(1,"div",(0,r.classes)(["TitleBar",n]),[(0,o.createComponentVNode)(2,c.Icon,{className:"TitleBar__statusIcon",color:b(l),name:"eye"}),(0,o.createVNode)(1,"div","TitleBar__title","string"==typeof i&&i===i.toLowerCase()&&(0,a.toTitleCase)(i)||i,0),(0,o.createVNode)(1,"div","TitleBar__dragZone",null,1,{onMousedown:function(e){return d&&u(e)}}),!1,!!d&&(0,o.createVNode)(1,"div","TitleBar__close TitleBar__clickable",Byond.IS_LTE_IE8?"x":"\xd7",0,{onclick:s})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(0),r=n(1),a=n(2);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.siliconUser,d=void 0===l?c.siliconUser:l,u=e.locked,s=void 0===u?c.locked:u,m=e.normallyLocked,p=void 0===m?c.normallyLocked:m,f=e.onLockStatusChange,h=void 0===f?function(){return i("lock")}:f,C=e.accessText,b=void 0===C?"an ID card":C,N=e.deny,g=void 0!==N&&N,V=e.denialMessage;return g?void 0===V?"Error.":V:d?(0,o.createComponentVNode)(2,a.NoticeBox,{color:d&&"grey",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{m:"0",color:p?"red":"green",icon:p?"lock":"unlock",content:p?"Locked":"Unlocked",onClick:function(){h&&h(!s)}})})]})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe ",b," ","to ",s?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlContent=t.AtmosControl=void 0;var o=n(0),r=n(19),a=n(3),i=n(2),c=n(1);(0,n(24).createLogger)("fuck");t.AtmosControl=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:600,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=a.config,s=(0,r.sortBy)((function(e){return e.name}))(d.alarms||[]),m=(0,c.useLocalState)(t,"tabIndex",0),p=m[0],f=m[1],h=(0,c.useLocalState)(t,"mapZoom",1),C=h[0],b=h[1];return 0===p?n=(0,o.createComponentVNode)(2,i.Section,{title:"Alarms",children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,color:2===e.danger?"bad":1===e.danger?"average":"",onClick:function(){return l("alarm",{alarm:e.ref})}},e.name)}))}):1===p&&(n=(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:["Zoom Level:",(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,width:"40px",step:.5,stepPixelSize:"5",value:C,minValue:1,maxValue:8,onChange:function(e,t){return b(t)}}),"Z-Level:",d.map_levels.sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:~~e==~~u.mapZLevel,content:e,onClick:function(){l("setZLevel",{mapZLevel:e})}},e)})),(0,o.createComponentVNode)(2,i.NanoMap,{zoom:C,children:s.filter((function(e){return~~e.z==~~u.mapZLevel})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:C,icon:"bell",tooltip:e.name,color:e.danger?"red":"green",onClick:function(){return l("alarm",{alarm:e.ref})}},e.ref)}))})]})),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===p,onClick:function(){return f(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Alarm View"]},"AlarmView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===p,onClick:function(){return f(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)};t.AtmosControlContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleSearch=t.CameraConsoleContent=t.CameraConsole=void 0;var o=n(0),r=n(19),a=n(44),i=n(9),c=n(8),l=n(1),d=n(2),u=n(3),s=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n="");var o=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(o),n&&(0,r.filter)((function(e){return e.networks.includes(n)})),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){return(0,o.createComponentVNode)(2,u.Window,{width:870,height:708,resizable:!0,children:(0,o.createComponentVNode)(2,m)})};var m=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,i=(n.config,a.mapRef),c=a.activeCamera,m=function(e,t){var n,o;if(!t)return[];var r=e.findIndex((function(e){return e.name===t.name}));return[null==(n=e[r-1])?void 0:n.name,null==(o=e[r+1])?void 0:o.name]}(s(a.cameras),c);m[0],m[1];return(0,o.createFragment)([(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),c&&c.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-left",onClick:function(){return r("pan",{dir:8})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-up",onClick:function(){return r("pan",{dir:1})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-right",onClick:function(){return r("pan",{dir:4})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-down",onClick:function(){return r("pan",{dir:2})}})],4),(0,o.createComponentVNode)(2,d.ByondUi,{className:"CameraConsole__map",params:{id:i,type:"map"}})],4)],4)};t.CameraConsoleContent=m;var p=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=(0,l.useLocalState)(t,"searchText",""),m=c[0],p=c[1],f=(0,l.useLocalState)(t,"networkFilter",""),h=f[0],C=f[1],b=a.activeCamera,N=a.allNetworks;N.sort();var g=s(a.cameras,m,h);return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,d.Dropdown,{mb:1,width:"177px",options:N,placeholder:"No Filter",onSelected:function(e){return C(e)}}),(0,o.createComponentVNode)(2,d.Section,{children:g.map((function(e){return(0,o.createVNode)(1,"div",(0,i.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",b&&e.name===b.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,u.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)};t.CameraConsoleSearch=p},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(2),a=n(483),i=function(e){var t=e.beakerLoaded,n=e.beakerContents,a=void 0===n?[]:n,i=e.buttons;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===a.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),a.map((function(e,t){return(0,o.createComponentVNode)(2,r.Box,{width:"100%",children:[(0,o.createComponentVNode)(2,r.Box,{color:"label",display:"inline",verticalAlign:"middle",children:[(n=e.volume,n+" unit"+(1===n?"":"s"))," of ",e.name]}),!!i&&(0,o.createComponentVNode)(2,r.Box,{float:"right",display:"inline",children:i(e,t)}),(0,o.createComponentVNode)(2,r.Box,{clear:"both"})]},e.name);var n}))]})};t.BeakerContents=i,i.propTypes={beakerLoaded:a.bool,beakerContents:a.array,buttons:a.arrayOf(a.element)}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitorContent=t.CrewMonitor=void 0;var o=n(0),r=n(19),a=n(44),i=n(1),c=n(3),l=n(2),d=n(128);t.CrewMonitor=function(){return(0,o.createComponentVNode)(2,c.Window,{width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,s=c.data,m=c.config,p=(0,i.useLocalState)(t,"tabIndex",0),f=p[0],h=p[1],C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name})),(0,r.sortBy)((function(e){return null==e?void 0:e.x})),(0,r.sortBy)((function(e){return null==e?void 0:e.y})),(0,r.sortBy)((function(e){return null==e?void 0:e.realZ}))])(s.crewmembers||[]),b=(0,i.useLocalState)(t,"number",1),N=b[0],g=b[1];return n=0===f?(0,o.createComponentVNode)(2,l.Table,{children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Location"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,d.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,d.TableCell,{children:[(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,o.createComponentVNode)(2,l.Box,{inline:!0,children:["(",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,o.createComponentVNode)(2,d.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,l.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+", "+e.z+")":"Not Available"})]},e.name)}))]}):1===f?(0,o.createComponentVNode)(2,l.Box,{textAlign:"center",children:["Zoom Level:",(0,o.createComponentVNode)(2,l.NumberInput,{animated:!0,width:"40px",step:.5,stepPixelSize:"5",value:N,minValue:1,maxValue:8,onChange:function(e,t){return g(t)}}),"Z-Level:",s.map_levels.sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return(0,o.createComponentVNode)(2,l.Button,{selected:~~e==~~m.mapZLevel,content:e,onClick:function(){u("setZLevel",{mapZLevel:e})}},e)})),(0,o.createComponentVNode)(2,l.NanoMap,{zoom:N,children:C.filter((function(e){return 3===e.sensor_type&&~~e.realZ==~~m.mapZLevel})).map((function(e){return(0,o.createComponentVNode)(2,l.NanoMap.Marker,{x:e.x,y:e.y,zoom:N,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)}))})]}):"ERROR",(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===f,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,l.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===f,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,l.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),(0,o.createComponentVNode)(2,l.Box,{m:2,children:n})],4)};t.CrewMonitorContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.CryoStorageItems=t.CryoStorageCrew=t.CryoStorage=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.CryoStorage=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.real_name,s=d.allow_items,m=(0,r.useLocalState)(t,"tab",0),p=m[0],f=m[1];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return f(0)},children:"Crew"}),!!s&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return f(1)},children:"Items"})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Welcome, ",u,"."]}),0===p&&(0,o.createComponentVNode)(2,c),!!s&&1===p&&(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.crew);return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Crew",children:i.length&&i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e},e)}))||(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"No crew currently stored."})})};t.CryoStorageCrew=c;var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.items;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hand-rock",onClick:function(){return i("allitems")},children:"Claim All"}),children:c.length&&c.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"hand-rock",onClick:function(){return i("item",{ref:e.ref})},children:e.name},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No items stored."})})};t.CryoStorageItems=l},function(e,t,n){"use strict";t.__esModule=!0,t.RankIcon=void 0;var o=n(0),r=n(2),a={"Colony Director":"user-tie","Site Manager":"user-tie",Overseer:"user-tie","Head of Personnel":"briefcase","Crew Resources Officer":"briefcase","Deputy Director":"briefcase","Command Secretary":"user-tie","Head of Security":"user-shield","Security Commander":"user-shield","Chief of Security":"user-shield",Warden:["city","shield-alt"],Detective:"search","Forensic Technician":"search","Security Officer":"user-shield","Junior Officer":"user-shield","Chief Engineer":"toolbox","Atmospheric Technician":"wind","Station Engineer":"toolbox","Maintenance Technician":"wrench","Engine Technician":"toolbox",Electrician:"toolbox","Chief Medical Officer":"user-md",Chemist:"mortar-pestle",Pharmacist:"mortar-pestle","Medical Doctor":"user-md",Surgeon:"user-md","Emergency Physician":"user-md",Nurse:"user-md",Virologist:"disease",Paramedic:"ambulance","Emergency Medical Technician":"ambulance",Psychiatrist:"couch",Psychologist:"couch","Research Director":"user-graduate","Research Supervisor":"user-graduate",Roboticist:"robot","Biomechanical Engineer":["wrench","heartbeat"],"Mechatronic Engineer":"wrench",Scientist:"flask",Xenoarchaeologist:"flask",Anomalist:"flask","Phoron Researcher":"flask","Circuit Designer":"car-battery",Xenobiologist:"meteor",Xenobotanist:["biohazard","seedling"],Quartermaster:"box-open","Supply Chief":"warehouse","Cargo Technician":"box-open","Shaft Miner":"hard-hat","Drill Technician":"hard-hat",Pathfinder:"binoculars",Explorer:"user-astronaut","Field Medic":["user-md","user-astronaut"],Pilot:"space-shuttle",Bartender:"glass-martini",Barista:"coffee",Botanist:"leaf",Gardener:"leaf",Chaplain:"place-of-worship",Counselor:"couch",Chef:"utensils",Cook:"utensils",Entertainer:"smile-beam",Performer:"smile-beam",Musician:"guitar",Stagehand:"smile-beam",Intern:"school","Apprentice Engineer":["school","wrench"],"Medical Intern":["school","user-md"],"Lab Assistant":["school","flask"],"Security Cadet":["school","shield-alt"],"Jr. Cargo Tech":["school","box"],"Jr. Explorer":["school","user-astronaut"],Server:["school","utensils"],"Internal Affairs Agent":"balance-scale",Janitor:"broom",Custodian:"broom","Sanitation Technician":"hand-sparkles",Maid:"broom",Librarian:"book",Journalist:"newspaper",Writer:"book",Historian:"chalkboard-teacher",Professor:"chalkboard-teacher",Visitor:"user","Emergency Responder":"fighter-jet"};t.RankIcon=function(e,t){var n=e.rank,i=e.color,c=void 0===i?"label":i,l=a[n];return"string"==typeof l?(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:l,size:2}):Array.isArray(l)?l.map((function(e){return(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:e,size:2},e)})):(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:"user",size:2})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningUser=void 0;var o=n(0),r=n(1),a=n(2);t.MiningUser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.insertIdText,d=c.has_id,u=c.id;return(0,o.createComponentVNode)(2,a.NoticeBox,{success:d,children:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",u.name,".",(0,o.createVNode)(1,"br"),"You have ",u.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return i("logoff")}}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})],4):l})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapNavigationContent=t.OvermapNavigation=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(133);t.OvermapNavigation=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:380,height:530,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sector,u=l.s_x,s=l.s_y,m=l.sector_info,p=l.viewing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Current Location",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:p,onClick:function(){return i("viewing")},children:"Map View"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coordiantes",children:[u," : ",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Additional Information",children:m})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Flight Data",children:(0,o.createComponentVNode)(2,c.OvermapFlightData,{disableLimiterControls:!0})})],4)};t.OvermapNavigationContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.AreaCharge=t.PowerMonitorFocus=t.PowerMonitorContent=t.PowerMonitor=t.powerRank=void 0;var o=n(0),r=n(19),a=n(44),i=n(5),c=n(9),l=n(1),d=n(2),u=n(3),s=5e5,m=function(e){var t=String(e.split(" ")[1]).toLowerCase();return["w","kw","mw","gw"].indexOf(t)};t.powerRank=m;t.PowerMonitor=function(){return(0,o.createComponentVNode)(2,u.Window,{width:550,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)})})};var p=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,i=(a.map_levels,a.all_sensors),c=a.focus;if(c)return(0,o.createComponentVNode)(2,f,{focus:c});var u=(0,o.createComponentVNode)(2,d.Box,{color:"bad",children:"No sensors detected"});return i&&(u=(0,o.createComponentVNode)(2,d.Table,{children:i.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{children:(0,o.createComponentVNode)(2,d.Table.Cell,{children:(0,o.createComponentVNode)(2,d.Button,{content:e.name,icon:e.alarm?"bell":"sign-in-alt",onClick:function(){return r("setsensor",{id:e.name})}})})},e.name)}))})),(0,o.createComponentVNode)(2,d.Section,{title:"No active sensor. Listing all.",buttons:(0,o.createComponentVNode)(2,d.Button,{content:"Scan For Sensors",icon:"undo",onClick:function(){return r("refresh")}}),children:u})};t.PowerMonitorContent=p;var f=function(e,t){var n=(0,l.useBackend)(t),c=n.act,u=(n.data,e.focus),p=u.history,f=(0,l.useLocalState)(t,"sortByField",null),b=f[0],N=f[1],g=p.supply[p.supply.length-1]||0,V=p.demand[p.demand.length-1]||0,v=p.supply.map((function(e,t){return[t,e]})),y=p.demand.map((function(e,t){return[t,e]})),k=Math.max.apply(Math,[s].concat(p.supply,p.demand)),_=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===b&&(0,r.sortBy)((function(e){return e.name})),"charge"===b&&(0,r.sortBy)((function(e){return-e.charge})),"draw"===b&&(0,r.sortBy)((function(e){return-m(e.load)}),(function(e){return-parseFloat(e.load)})),"problems"===b&&(0,r.sortBy)((function(e){return e.eqp}),(function(e){return e.lgt}),(function(e){return e.env}),(function(e){return e.charge}),(function(e){return e.name}))])(u.areas);return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:u.name,buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"sign-out-alt",content:"Back To Main",onClick:function(){return c("clear")}})}),(0,o.createComponentVNode)(2,d.Flex,{mx:-.5,mb:1,children:[(0,o.createComponentVNode)(2,d.Flex.Item,{mx:.5,width:"200px",children:(0,o.createComponentVNode)(2,d.Section,{children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Supply",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:g,minValue:0,maxValue:k,color:"teal",children:(0,i.toFixed)(g/1e3)+" kW"})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:V,minValue:0,maxValue:k,color:"pink",children:(0,i.toFixed)(V/1e3)+" kW"})})]})})}),(0,o.createComponentVNode)(2,d.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,d.Section,{position:"relative",height:"100%",children:[(0,o.createComponentVNode)(2,d.Chart.Line,{fillPositionedParent:!0,data:v,rangeX:[0,v.length-1],rangeY:[0,k],strokeColor:"rgba(0, 181, 173, 1)",fillColor:"rgba(0, 181, 173, 0.25)"}),(0,o.createComponentVNode)(2,d.Chart.Line,{fillPositionedParent:!0,data:y,rangeX:[0,y.length-1],rangeY:[0,k],strokeColor:"rgba(224, 57, 151, 1)",fillColor:"rgba(224, 57, 151, 0.25)"})]})})]}),(0,o.createComponentVNode)(2,d.Section,{children:[(0,o.createComponentVNode)(2,d.Box,{mb:1,children:[(0,o.createComponentVNode)(2,d.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"name"===b,content:"Name",onClick:function(){return N("name"!==b&&"name")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"charge"===b,content:"Charge",onClick:function(){return N("charge"!==b&&"charge")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"draw"===b,content:"Draw",onClick:function(){return N("draw"!==b&&"draw")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"problems"===b,content:"Problems",onClick:function(){return N("problems"!==b&&"problems")}})]}),(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),_.map((function(e,t){return(0,o.createVNode)(1,"tr","Table__row candystripe",[(0,o.createVNode)(1,"td",null,e.name,0),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",(0,o.createComponentVNode)(2,h,{charging:e.charging,charge:e.charge}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",e.load,0),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.eqp}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.lgt}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.env}),2)],4,null,e.id)}))]})]})],4)};t.PowerMonitorFocus=f;var h=function(e){var t=e.charging,n=e.charge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Icon,{width:"18px",textAlign:"center",name:0===t&&(n>50?"battery-half":"battery-quarter")||1===t&&"bolt"||2===t&&"battery-full",color:0===t&&(n>50?"yellow":"red")||1===t&&"yellow"||2===t&&"green"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,i.toFixed)(n)+"%"})],4)};t.AreaCharge=h,h.defaultHooks=c.pureComponentHooks;var C=function(e){var t=e.status,n=Boolean(2&t),r=Boolean(1&t),a=(n?"On":"Off")+" ["+(r?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:r?undefined:"M",title:a})};C.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RCONContent=t.RCON=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.RCON=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:630,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n,r=(0,a.useLocalState)(t,"tabIndex",0),c=r[0],l=r[1];return 0===c?n=(0,o.createComponentVNode)(2,d):1===c&&(n=(0,o.createComponentVNode)(2,u)),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===c,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"power-off"})," SMESs"]},"SMESs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bolt"})," Breakers"]},"Breakers")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)};t.RCONContent=l;var d=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.smes_info;return(0,o.createComponentVNode)(2,i.Section,{title:"SMESs",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l?l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.RCON_tag,children:[(0,o.createComponentVNode)(2,i.Box,{mb:1,children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*e.capacityPercent,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[(0,r.round)(e.charge/6e4,1)," kWh / ",(0,r.round)(e.capacity/6e4)," kWh (",e.capacityPercent,"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return c("smes_in_toggle",{smes:e.RCON_tag})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("smes_in_set",{smes:e.RCON_tag})}})],4),children:[e.input_val," kW - ",e.input_set?"ON":"OFF"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return c("smes_out_toggle",{smes:e.RCON_tag})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("smes_out_set",{smes:e.RCON_tag})}})],4),children:[e.output_val," kW - ",e.output_set?"ONLINE":"OFFLINE"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Load",children:[e.output_load," kW"]})]})]},e.RCON_tag)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No SMESs detected."})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.breaker_info;return(0,o.createComponentVNode)(2,i.Section,{title:"Breakers",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c?c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.RCON_tag,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.enabled?"Enabled":"Disabled",selected:e.enabled,color:e.enabled?null:"bad",onClick:function(){return r("toggle_breaker",{breaker:e.RCON_tag})}})},e.RCON_tag)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No breakers detected."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShutoffMonitorContent=t.ShutoffMonitor=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.ShutoffMonitor=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:627,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.valves;return(0,o.createComponentVNode)(2,i.Section,{title:"Valves",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Position"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Open"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Mode"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Actions"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[e.x,", ",e.y,", ",e.z]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.open?"Yes":"No"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.enabled?"Auto":"Manual"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.open?"Opened":"Closed",selected:e.open,disabled:!e.enabled,onClick:function(){return a("toggle_open",{valve:e.ref})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.enabled?"Auto":"Manual",selected:e.enabled,onClick:function(){return a("toggle_enable",{valve:e.ref})}})]})]},e.name)}))]})})};t.ShutoffMonitorContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,i.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.categories;return(void 0===c?[]:c).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.category,children:(0,o.createVNode)(1,"ul",null,[0===e.alarms.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),e.alarms.map((function(e){var t="";return e.has_cameras?t=(0,o.createComponentVNode)(2,a.Section,{children:e.cameras.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{disabled:e.deact,content:e.name+(e.deact?" (deactived)":""),icon:"video",onClick:function(){return i("switchTo",{camera:e.camera})}},e.name)}))}):e.lost_sources&&(t=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Lost Alarm Sources: ",e.lost_sources]})),(0,o.createVNode)(1,"li",null,[e.name,e.origin_lost?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Alarm Origin Lost."}):"",t],0,null,e.name)}))],0)},e.category)}))};t.StationAlertConsoleContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitorContent=t.SupermatterMonitor=void 0;var o=n(0),r=n(1),a=n(2),i=(n(21),n(3)),c=n(5),l=n(8);t.SupermatterMonitor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.active?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,u)};t.SupermatterMonitorContent=d;var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.supermatters;return(0,o.createComponentVNode)(2,a.Section,{title:"Supermatters Detected",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Refresh",icon:"sync",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"49%",grow:t%2,children:(0,o.createComponentVNode)(2,a.Section,{title:e.area_name+" (#"+e.uid+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:[e.integrity," %"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View Details",onClick:function(){return i("set",{set:e.uid})}})})]})})},t)}))})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.SM_area,s=d.SM_integrity,m=d.SM_power,p=d.SM_ambienttemp,f=d.SM_ambientpressure,h=d.SM_EPR,C=d.SM_gas_O2,b=d.SM_gas_CO2,N=d.SM_gas_N2,g=d.SM_gas_PH,V=d.SM_gas_N2O;return(0,o.createComponentVNode)(2,a.Section,{title:(0,l.toTitleCase)(u),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return to Menu",onClick:function(){return i("clear")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{animated:!0,value:s,minValue:0,maxValue:100,ranges:{good:[100,100],average:[50,100],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,a.Box,{color:(m>300?"bad":m>150&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" MeV/cm\xb3"},value:m})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:(p>5e3?"bad":p>4e3&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" K"},value:p})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:(f>1e4?"bad":f>5e3&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" kPa"},value:f})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber EPR",children:(0,o.createComponentVNode)(2,a.Box,{color:(h>4?"bad":h>1&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)},value:h})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gas Composition",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"O\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:C}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CO\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:b}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:N}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"PH",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2O",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V}),"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=t.ICON_BY_CATEGORY_NAME=void 0;var o=n(0),r=n(9),a=n(8),i=n(1),c=n(2),l=n(3),d=["Atmospherics","Disposals"],u={Atmospherics:"wrench",Disposals:"trash-alt","Transit Tubes":"bus",Pipes:"grip-lines","Disposal Pipes":"grip-lines",Devices:"microchip","Heat Exchange":"thermometer-half","Insulated pipes":"snowflake","Station Equipment":"microchip"};t.ICON_BY_CATEGORY_NAME=u;var s=[{name:"Dispense",bitmask:1},{name:"Connect",bitmask:2},{name:"Destroy",bitmask:4},{name:"Paint",bitmask:8}];t.RapidPipeDispenser=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,f=p.category,h=p.categories,C=void 0===h?[]:h,b=p.selected_color,N=p.paint_colors,g=p.piping_layer,V=p.pipe_layers,v=p.mode,y=p.preview_rows.flatMap((function(e){return e.previews})),k=(0,i.useLocalState)(t,"categoryName"),_=k[0],x=k[1],L=C.find((function(e){return e.cat_name===_}))||C[0];return(0,o.createComponentVNode)(2,l.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Category",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{selected:f===t,icon:u[e],color:"transparent",content:e,onClick:function(){return m("category",{category:t})}},e)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Modes",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:v&e.bitmask,content:e.name,onClick:function(){return m("mode",{mode:e.bitmask})}},e.bitmask)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,width:"64px",color:N[b],children:(0,a.capitalize)(b)}),Object.keys(N).map((function(e){return(0,o.createComponentVNode)(2,c.ColorBox,{ml:1,color:N[e],onClick:function(){return m("color",{paint_color:e})}},e)}))]})]})}),(0,o.createComponentVNode)(2,c.Flex,{m:-.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,c.Section,{children:[0===f&&(0,o.createComponentVNode)(2,c.Box,{mb:1,children:Object.keys(V).map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:V[e]===g,content:e,onClick:function(){return m("piping_layer",{piping_layer:V[e]})}},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"108px",children:y.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{title:e.dir_name,selected:e.selected,style:{width:"48px",height:"48px",padding:0},onClick:function(){return m("setdir",{dir:e.dir,flipped:e.flipped})},children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["pipes32x32",e.dir+"-"+e.icon_state]),style:{transform:"scale(1.5) translate(17%, 17%)"}})},e.dir)}))})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Tabs,{children:C.map((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{fluid:!0,icon:u[e.cat_name],selected:e.cat_name===L.cat_name,onClick:function(){return x(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==L?void 0:L.recipes.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,ellipsis:!0,checked:e.selected,content:e.pipe_name,title:e.pipe_name,onClick:function(){return m("pipe_type",{pipe_type:e.pipe_index,category:L.cat_name})}},e.pipe_index)}))]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableBasicInfo=void 0;var o=n(0),r=n(1),a=n(2);t.PortableBasicInfo=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.connected,d=c.holding,u=c.on,s=c.pressure,m=c.powerDraw,p=c.cellCharge,f=c.cellMaxCharge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return i("power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Port",color:l?"good":"average",children:l?"Connected":"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",children:[m," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:f,ranges:{good:[.5*f,Infinity],average:[.25*f,.5*f],bad:[-Infinity,.25*f]},children:[p," W"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holding Tank",minHeight:"82px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!d,onClick:function(){return i("eject")}}),children:d?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.pressure})," kPa"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No holding tank"})})],4)}},function(e,t,n){e.exports=n(197)},function(e,t,n){"use strict";n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(223),n(225),n(226),n(227),n(148),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(246),n(247),n(248),n(250),n(251),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(282),n(283),n(284),n(285),n(286),n(287),n(289),n(290),n(292),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(318),n(319),n(320),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(165),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410);var o=n(0);n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426);var r=n(170),a=(n(171),n(1)),i=n(172),c=n(24),l=n(174); + */t.vecAdd=function(){for(var e=arguments.length,t=new Array(e),n=0;n35;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a,i&&"Tooltip--scale--"+Math.floor(i)]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var o=n(0),r=n(9),a=n(19);t.Dimmer=function(e){var t=e.className,n=e.children,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Dimmer"].concat(t))},i,{children:(0,o.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var o=n(0),r=n(9);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,o.createVNode)(1,"div",(0,r.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var o=n(0),r=n(9),a=n(19);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.className,n=e.direction,o=e.wrap,a=e.align,c=e.alignContent,l=e.justify,d=e.inline,u=e.spacing,s=void 0===u?0:u,m=e.spacingPrecise,p=void 0===m?0:m,h=i(e,["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"]);return Object.assign({className:(0,r.classes)(["Flex",Byond.IS_LTE_IE10&&("column"===n?"Flex--iefix--column":"Flex--iefix"),d&&"Flex--inline",s>0&&"Flex--spacing--"+s,p>0&&"Flex--spacingPrecise--"+p,t]),style:Object.assign({},h.style,{"flex-direction":n,"flex-wrap":o,"align-items":a,"align-content":c,"justify-content":l})},h)};t.computeFlexProps=c;var l=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},c(e))))};t.Flex=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.grow,o=e.order,c=e.shrink,l=e.basis,d=void 0===l?e.width:l,u=e.align,s=i(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,r.classes)(["Flex__item",Byond.IS_LTE_IE10&&"Flex__item--iefix",t]),style:Object.assign({},s.style,{"flex-grow":n,"flex-shrink":c,"flex-basis":(0,a.unit)(d),order:o,"align-self":u})},s)};t.computeFlexItemProps=d;var u=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},d(e))))};t.FlexItem=u,u.defaultHooks=r.pureComponentHooks,l.Item=u},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var o=n(0),r=n(9),a=n(7),i=n(1),c=n(2),l=n(32),d=n(122),u=n(173),s=n(24),m=n(175),p=n(123);var h=(0,s.createLogger)("Window"),f=[400,600],C=function(e){var t,n;function c(){return e.apply(this,arguments)||this}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){var e=(0,i.useBackend)(this.context),t=e.config;if(!e.suspended){h.log("mounting");var n=Object.assign({size:f},t.window);this.props.width&&this.props.height&&(n.size=[this.props.width,this.props.height]),(0,u.setWindowKey)(t.window.key),(0,u.recallWindowGeometry)(t.window.key,n),(0,p.refocusLayout)()}},s.render=function(){var e,t=this.props,n=t.resizable,c=t.theme,s=t.title,f=t.children,C=(0,i.useBackend)(this.context),N=C.config,g=C.suspended,V=(0,d.useDebug)(this.context).debugLayout,v=(0,m.useDispatch)(this.context),k=null==(e=N.window)?void 0:e.fancy,y=N.user.observer?N.status=0||(r[n]=e[n]);return r}(e,["className","fitted","scrollable","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,p.Layout.Content,Object.assign({scrollable:a,className:(0,r.classes)(["Window__content",t])},c,{children:n&&i||(0,o.createVNode)(1,"div","Window__contentPadding",i,0)})))};var N=function(e){switch(e){case l.UI_INTERACTIVE:return"good";case l.UI_UPDATE:return"average";case l.UI_DISABLED:default:return"bad"}},b=function(e,t){var n=e.className,i=e.title,l=e.status,d=e.fancy,u=e.onDragStart,s=e.onClose;(0,m.useDispatch)(t);return(0,o.createVNode)(1,"div",(0,r.classes)(["TitleBar",n]),[(0,o.createComponentVNode)(2,c.Icon,{className:"TitleBar__statusIcon",color:N(l),name:"eye"}),(0,o.createVNode)(1,"div","TitleBar__title","string"==typeof i&&i===i.toLowerCase()&&(0,a.toTitleCase)(i)||i,0),(0,o.createVNode)(1,"div","TitleBar__dragZone",null,1,{onMousedown:function(e){return d&&u(e)}}),!1,!!d&&(0,o.createVNode)(1,"div","TitleBar__close TitleBar__clickable",Byond.IS_LTE_IE8?"x":"\xd7",0,{onclick:s})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(0),r=n(1),a=n(2);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.siliconUser,d=void 0===l?c.siliconUser:l,u=e.locked,s=void 0===u?c.locked:u,m=e.normallyLocked,p=void 0===m?c.normallyLocked:m,h=e.onLockStatusChange,f=void 0===h?function(){return i("lock")}:h,C=e.accessText,N=void 0===C?"an ID card":C,b=e.deny,g=void 0!==b&&b,V=e.denialMessage;return g?void 0===V?"Error.":V:d?(0,o.createComponentVNode)(2,a.NoticeBox,{color:d&&"grey",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{m:"0",color:p?"red":"green",icon:p?"lock":"unlock",content:p?"Locked":"Unlocked",onClick:function(){f&&f(!s)}})})]})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe ",N," ","to ",s?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlContent=t.AtmosControl=void 0;var o=n(0),r=n(17),a=n(3),i=n(2),c=n(1);(0,n(24).createLogger)("fuck");t.AtmosControl=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:600,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=a.config,s=(0,r.sortBy)((function(e){return e.name}))(d.alarms||[]),m=(0,c.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1],f=(0,c.useLocalState)(t,"mapZoom",1),C=f[0],N=f[1];return 0===p?n=(0,o.createComponentVNode)(2,i.Section,{title:"Alarms",children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,color:2===e.danger?"bad":1===e.danger?"average":"",onClick:function(){return l("alarm",{alarm:e.ref})}},e.name)}))}):1===p&&(n=(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:["Zoom Level:",(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,width:"40px",step:.5,stepPixelSize:"5",value:C,minValue:1,maxValue:8,onChange:function(e,t){return N(t)}}),"Z-Level:",d.map_levels.sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:~~e==~~u.mapZLevel,content:e,onClick:function(){l("setZLevel",{mapZLevel:e})}},e)})),(0,o.createComponentVNode)(2,i.NanoMap,{zoom:C,children:s.filter((function(e){return~~e.z==~~u.mapZLevel})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:C,icon:"bell",tooltip:e.name,color:e.danger?"red":"green",onClick:function(){return l("alarm",{alarm:e.ref})}},e.ref)}))})]})),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Alarm View"]},"AlarmView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)};t.AtmosControlContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleSearch=t.CameraConsoleContent=t.CameraConsole=void 0;var o=n(0),r=n(17),a=n(44),i=n(9),c=n(7),l=n(1),d=n(2),u=n(3),s=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n="");var o=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(o),n&&(0,r.filter)((function(e){return e.networks.includes(n)})),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){return(0,o.createComponentVNode)(2,u.Window,{width:870,height:708,resizable:!0,children:(0,o.createComponentVNode)(2,m)})};var m=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,i=(n.config,a.mapRef),c=a.activeCamera,m=function(e,t){var n,o;if(!t)return[];var r=e.findIndex((function(e){return e.name===t.name}));return[null==(n=e[r-1])?void 0:n.name,null==(o=e[r+1])?void 0:o.name]}(s(a.cameras),c);m[0],m[1];return(0,o.createFragment)([(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),c&&c.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-left",onClick:function(){return r("pan",{dir:8})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-up",onClick:function(){return r("pan",{dir:1})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-right",onClick:function(){return r("pan",{dir:4})}}),(0,o.createComponentVNode)(2,d.Button,{icon:"chevron-down",onClick:function(){return r("pan",{dir:2})}})],4),(0,o.createComponentVNode)(2,d.ByondUi,{className:"CameraConsole__map",params:{id:i,type:"map"}})],4)],4)};t.CameraConsoleContent=m;var p=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=(0,l.useLocalState)(t,"searchText",""),m=c[0],p=c[1],h=(0,l.useLocalState)(t,"networkFilter",""),f=h[0],C=h[1],N=a.activeCamera,b=a.allNetworks;b.sort();var g=s(a.cameras,m,f);return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,d.Dropdown,{mb:1,width:"177px",options:b,placeholder:"No Filter",onSelected:function(e){return C(e)}}),(0,o.createComponentVNode)(2,d.Section,{children:g.map((function(e){return(0,o.createVNode)(1,"div",(0,i.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",N&&e.name===N.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,u.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)};t.CameraConsoleSearch=p},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(2),a=n(486),i=function(e){var t=e.beakerLoaded,n=e.beakerContents,a=void 0===n?[]:n,i=e.buttons;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===a.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),a.map((function(e,t){return(0,o.createComponentVNode)(2,r.Box,{width:"100%",children:[(0,o.createComponentVNode)(2,r.Box,{color:"label",display:"inline",verticalAlign:"middle",children:[(n=e.volume,n+" unit"+(1===n?"":"s"))," of ",e.name]}),!!i&&(0,o.createComponentVNode)(2,r.Box,{float:"right",display:"inline",children:i(e,t)}),(0,o.createComponentVNode)(2,r.Box,{clear:"both"})]},e.name);var n}))]})};t.BeakerContents=i,i.propTypes={beakerLoaded:a.bool,beakerContents:a.array,buttons:a.arrayOf(a.element)}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsConsoleContent=t.CommunicationsConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.CommunicationsConsole=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.menu_state),c=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["ERRROR. Unknown menu_state: ",i,"Please report this to NT Technical Support."]});return 1===i?c=(0,o.createComponentVNode)(2,l):2===i?c=(0,o.createComponentVNode)(2,s):3===i&&(c=(0,o.createComponentVNode)(2,u)),(0,o.createFragment)([(0,o.createComponentVNode)(2,d),c],0)};t.CommunicationsConsoleContent=c;var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.messages,d=c.msg_cooldown,u=c.emagged,s=c.cc_cooldown,m=c.str_security_level,p=c.levels,h=c.authmax,f=c.security_level,C=c.security_level_color,N=c.authenticated,b=c.atcsquelch,g=c.boss_short,V="View ("+l.length+")",v="Make Priority Announcement";d>0&&(v+=" ("+d+"s)");var k=u?"Message [UNKNOWN]":"Message "+g;s>0&&(k+=" ("+s+"s)");var y=m,_=p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!h,selected:e.id===f,onClick:function(){return i("newalertlevel",{level:e.id})}},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Site Director-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:C,children:y}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:_}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:v,disabled:!h||d>0,onClick:function(){return i("announce")}})}),!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:k,disabled:!h||s>0,onClick:function(){return i("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!h,onClick:function(){return i("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:k,disabled:!h||s>0,onClick:function(){return i("MessageCentCom")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!N,onClick:function(){return i("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:V,disabled:!N,onClick:function(){return i("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"microphone",content:b?"ATC Relay Disabled":"ATC Relay Enabled",disabled:!N,selected:b,onClick:function(){return i("toggleatc")}})})]})})],4)},d=function(e,t){var n,i=(0,r.useBackend)(t),c=i.act,l=i.data,d=l.authenticated,u=l.is_ai,s=l.esc_status,m=l.esc_callable,p=l.esc_recallable;return n=d?u?"AI":1===d?"Command":2===d?"Site Director":"ERROR: Report This Bug!":"Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access Level",children:"AI"})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return c("auth")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:s}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!d,onClick:function(){return c("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!d||u,onClick:function(){return c("cancelshuttle")}})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.message_current,d=c.message_deletion_allowed,u=c.authenticated,s=c.messages;if(l)return(0,o.createComponentVNode)(2,a.Section,{title:l.title,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!u,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:l.contents})});var m=s.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!u||l&&l.title===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete",disabled:!u||!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.length&&m||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"404",color:"bad",children:"No messages."})})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.stat_display,d=c.authenticated,u=l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return i("setstat",{statdisp:e.name})}},e.name)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return i("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return i("setmsg2")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitorContent=t.CrewMonitor=void 0;var o=n(0),r=n(17),a=n(44),i=n(1),c=n(3),l=n(2),d=n(128);t.CrewMonitor=function(){return(0,o.createComponentVNode)(2,c.Window,{width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,s=c.data,m=c.config,p=(0,i.useLocalState)(t,"tabIndex",0),h=p[0],f=p[1],C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name})),(0,r.sortBy)((function(e){return null==e?void 0:e.x})),(0,r.sortBy)((function(e){return null==e?void 0:e.y})),(0,r.sortBy)((function(e){return null==e?void 0:e.realZ}))])(s.crewmembers||[]),N=(0,i.useLocalState)(t,"number",1),b=N[0],g=N[1];return n=0===h?(0,o.createComponentVNode)(2,l.Table,{children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Location"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,d.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,d.TableCell,{children:[(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,o.createComponentVNode)(2,l.Box,{inline:!0,children:["(",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,o.createComponentVNode)(2,l.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,o.createComponentVNode)(2,d.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,l.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+", "+e.z+")":"Not Available"})]},e.name)}))]}):1===h?(0,o.createComponentVNode)(2,l.Box,{textAlign:"center",children:["Zoom Level:",(0,o.createComponentVNode)(2,l.NumberInput,{animated:!0,width:"40px",step:.5,stepPixelSize:"5",value:b,minValue:1,maxValue:8,onChange:function(e,t){return g(t)}}),"Z-Level:",s.map_levels.sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return(0,o.createComponentVNode)(2,l.Button,{selected:~~e==~~m.mapZLevel,content:e,onClick:function(){u("setZLevel",{mapZLevel:e})}},e)})),(0,o.createComponentVNode)(2,l.NanoMap,{zoom:b,children:C.filter((function(e){return 3===e.sensor_type&&~~e.realZ==~~m.mapZLevel})).map((function(e){return(0,o.createComponentVNode)(2,l.NanoMap.Marker,{x:e.x,y:e.y,zoom:b,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)}))})]}):"ERROR",(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===h,onClick:function(){return f(0)},children:[(0,o.createComponentVNode)(2,l.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===h,onClick:function(){return f(1)},children:[(0,o.createComponentVNode)(2,l.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),(0,o.createComponentVNode)(2,l.Box,{m:2,children:n})],4)};t.CrewMonitorContent=u},function(e,t,n){"use strict";t.__esModule=!0,t.CryoStorageItems=t.CryoStorageCrew=t.CryoStorage=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.CryoStorage=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.real_name,s=d.allow_items,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:"Crew"}),!!s&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:"Items"})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Welcome, ",u,"."]}),0===p&&(0,o.createComponentVNode)(2,c),!!s&&1===p&&(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.crew);return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Crew",children:i.length&&i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e},e)}))||(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"No crew currently stored."})})};t.CryoStorageCrew=c;var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.items;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hand-rock",onClick:function(){return i("allitems")},children:"Claim All"}),children:c.length&&c.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"hand-rock",onClick:function(){return i("item",{ref:e.ref})},children:e.name},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No items stored."})})};t.CryoStorageItems=l},function(e,t,n){"use strict";t.__esModule=!0,t.RankIcon=void 0;var o=n(0),r=n(2),a={"Colony Director":"user-tie","Site Manager":"user-tie",Overseer:"user-tie","Head of Personnel":"briefcase","Crew Resources Officer":"briefcase","Deputy Director":"briefcase","Command Secretary":"user-tie","Head of Security":"user-shield","Security Commander":"user-shield","Chief of Security":"user-shield",Warden:["city","shield-alt"],Detective:"search","Forensic Technician":"search","Security Officer":"user-shield","Junior Officer":"user-shield","Chief Engineer":"toolbox","Atmospheric Technician":"wind","Station Engineer":"toolbox","Maintenance Technician":"wrench","Engine Technician":"toolbox",Electrician:"toolbox","Chief Medical Officer":"user-md",Chemist:"mortar-pestle",Pharmacist:"mortar-pestle","Medical Doctor":"user-md",Surgeon:"user-md","Emergency Physician":"user-md",Nurse:"user-md",Virologist:"disease",Paramedic:"ambulance","Emergency Medical Technician":"ambulance",Psychiatrist:"couch",Psychologist:"couch","Research Director":"user-graduate","Research Supervisor":"user-graduate",Roboticist:"robot","Biomechanical Engineer":["wrench","heartbeat"],"Mechatronic Engineer":"wrench",Scientist:"flask",Xenoarchaeologist:"flask",Anomalist:"flask","Phoron Researcher":"flask","Circuit Designer":"car-battery",Xenobiologist:"meteor",Xenobotanist:["biohazard","seedling"],Quartermaster:"box-open","Supply Chief":"warehouse","Cargo Technician":"box-open","Shaft Miner":"hard-hat","Drill Technician":"hard-hat",Pathfinder:"binoculars",Explorer:"user-astronaut","Field Medic":["user-md","user-astronaut"],Pilot:"space-shuttle",Bartender:"glass-martini",Barista:"coffee",Botanist:"leaf",Gardener:"leaf",Chaplain:"place-of-worship",Counselor:"couch",Chef:"utensils",Cook:"utensils",Entertainer:"smile-beam",Performer:"smile-beam",Musician:"guitar",Stagehand:"smile-beam",Intern:"school","Apprentice Engineer":["school","wrench"],"Medical Intern":["school","user-md"],"Lab Assistant":["school","flask"],"Security Cadet":["school","shield-alt"],"Jr. Cargo Tech":["school","box"],"Jr. Explorer":["school","user-astronaut"],Server:["school","utensils"],"Internal Affairs Agent":"balance-scale",Janitor:"broom",Custodian:"broom","Sanitation Technician":"hand-sparkles",Maid:"broom",Librarian:"book",Journalist:"newspaper",Writer:"book",Historian:"chalkboard-teacher",Professor:"chalkboard-teacher",Visitor:"user","Emergency Responder":"fighter-jet"};t.RankIcon=function(e,t){var n=e.rank,i=e.color,c=void 0===i?"label":i,l=a[n];return"string"==typeof l?(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:l,size:2}):Array.isArray(l)?l.map((function(e){return(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:e,size:2},e)})):(0,o.createComponentVNode)(2,r.Icon,{inline:!0,color:c,name:"user",size:2})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningUser=void 0;var o=n(0),r=n(1),a=n(2);t.MiningUser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.insertIdText,d=c.has_id,u=c.id;return(0,o.createComponentVNode)(2,a.NoticeBox,{success:d,children:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",u.name,".",(0,o.createVNode)(1,"br"),"You have ",u.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return i("logoff")}}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})],4):l})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosEmailClientViewMessage=t.NtosEmailClient=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(5);t.NtosEmailClient=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.PC_device_theme,u=a.error,s=a.downloading,m=a.current_account,p=(0,o.createComponentVNode)(2,f);return u?p=(0,o.createComponentVNode)(2,h,{error:u}):s?p=(0,o.createComponentVNode)(2,l):m&&(p=(0,o.createComponentVNode)(2,d)),(0,o.createComponentVNode)(2,i.NtosWindow,{resizable:!0,theme:c,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:p})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.down_filename,d=i.down_progress,u=i.down_size,s=i.down_speed;return(0,o.createComponentVNode)(2,a.Section,{title:"Downloading...",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"File",children:[l," (",u," GQ)"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speed",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," GQ/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:d,maxValue:u,children:[d,"/",u," (",(0,c.round)(d/u*100,1),"%)"]})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.current_account,d=c.addressbook,h=c.new_message,f=c.cur_title,C=(0,o.createComponentVNode)(2,u);return d?C=(0,o.createComponentVNode)(2,m):h?C=(0,o.createComponentVNode)(2,p):f&&(C=(0,o.createComponentVNode)(2,s)),(0,o.createComponentVNode)(2,a.Section,{title:"Logged in as: "+l,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"plus",tooltip:"New Message",tooltipPosition:"left",onClick:function(){return i("new_message")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cogs",tooltip:"Change Password",tooltipPosition:"left",onClick:function(){return i("changepassword")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",tooltip:"Log Out",tooltipPosition:"left",onClick:function(){return i("logout")}})],4),children:C})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.current_account,c.folder),d=c.messagecount,u=c.messages;return(0,o.createComponentVNode)(2,a.Section,{level:2,noTopPadding:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:"Inbox"===l,onClick:function(){return i("set_folder",{set_folder:"Inbox"})},children:"Inbox"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:"Spam"===l,onClick:function(){return i("set_folder",{set_folder:"Spam"})},children:"Spam"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:"Deleted"===l,onClick:function(){return i("set_folder",{set_folder:"Deleted"})},children:"Deleted"})]}),d&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Source"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Received At"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.source}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return i("view",{view:e.uid})},tooltip:"View"}),(0,o.createComponentVNode)(2,a.Button,{icon:"share",onClick:function(){return i("reply",{reply:e.uid})},tooltip:"Reply"}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"trash",onClick:function(){return i("delete",{"delete":e.uid})},tooltip:"Delete"})]})]},e.timestamp+e.title)}))]})})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["No emails found in ",l,"."]})]})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.administrator,d=c.cur_title,u=c.cur_source,s=c.cur_timestamp,m=c.cur_body,p=c.cur_hasattachment,h=c.cur_attachment_filename,f=c.cur_attachment_size,C=c.cur_uid;return(0,o.createComponentVNode)(2,a.Section,{title:d,buttons:l?(0,o.createComponentVNode)(2,a.Button,{icon:"times",onClick:function(){return i("back")}}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"share",tooltip:"Reply",tooltipPosition:"left",onClick:function(){return i("reply",{reply:C})}}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"trash",tooltip:"Delete",tooltipPosition:"left",onClick:function(){return i("delete",{"delete":C})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"save",tooltip:"Save To Disk",tooltipPosition:"left",onClick:function(){return i("save",{save:C})}}),p&&(0,o.createComponentVNode)(2,a.Button,{icon:"paperclip",tooltip:"Save Attachment",tooltipPosition:"left",onClick:function(){return i("downloadattachment")}})||null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",tooltip:"Close",tooltipPosition:"left",onClick:function(){return i("cancel",{cancel:C})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"From",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"At",children:s}),p&&!l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",color:"average",children:[h," (",f,"GQ)"]})||null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:m}})})})]})})};t.NtosEmailClientViewMessage=s;var m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.accounts;return(0,o.createComponentVNode)(2,a.Section,{title:"Address Book",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"times",onClick:function(){return i("set_recipient",{set_recipient:null})}}),children:c.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.login,fluid:!0,onClick:function(){return i("set_recipient",{set_recipient:e.login})}},e.login)}))})},p=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.current_account,c.msg_title),d=c.msg_recipient,u=c.msg_body,s=c.msg_hasattachment,m=c.msg_attachment_filename,p=c.msg_attachment_size;return(0,o.createComponentVNode)(2,a.Section,{title:"New Message",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"share",onClick:function(){return i("send")},children:"Send Message"}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"times",onClick:function(){return i("cancel")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:l,onInput:function(e,t){return i("edit_title",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:d,onInput:function(e,t){return i("edit_recipient",{val:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"address-book",onClick:function(){return i("addressbook")},tooltip:"Find Receipients",tooltipPosition:"left"})})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachments",buttons:s&&(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"times",onClick:function(){return i("remove_attachment")},children:"Remove Attachment"})||(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("addattachment")},children:"Add Attachment"}),children:s&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[m," (",p,"GQ)"]})||null}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{width:"99%",inline:!0,children:(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:u}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{verticalAlign:"top",onClick:function(){return i("edit_body")},icon:"pen",tooltip:"Edit Message",tooltipPosition:"left"})})]})})]})})},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.error;return(0,o.createComponentVNode)(2,a.Section,{title:"Notification",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return",onClick:function(){return n("reset")}}),children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:i})})},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.stored_login,d=c.stored_password;return(0,o.createComponentVNode)(2,a.Section,{title:"Please Log In",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Email address",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:l,onInput:function(e,t){return i("edit_login",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Password",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:d,onInput:function(e,t){return i("edit_password",{val:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",onClick:function(){return i("login")},children:"Log In"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapNavigationContent=t.OvermapNavigation=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(134);t.OvermapNavigation=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:380,height:530,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sector,u=l.s_x,s=l.s_y,m=l.sector_info,p=l.viewing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Current Location",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:p,onClick:function(){return i("viewing")},children:"Map View"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coordiantes",children:[u," : ",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Additional Information",children:m})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Flight Data",children:(0,o.createComponentVNode)(2,c.OvermapFlightData,{disableLimiterControls:!0})})],4)};t.OvermapNavigationContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.AreaCharge=t.PowerMonitorFocus=t.PowerMonitorContent=t.PowerMonitor=t.powerRank=void 0;var o=n(0),r=n(17),a=n(44),i=n(5),c=n(9),l=n(1),d=n(2),u=n(3),s=5e5,m=function(e){var t=String(e.split(" ")[1]).toLowerCase();return["w","kw","mw","gw"].indexOf(t)};t.powerRank=m;t.PowerMonitor=function(){return(0,o.createComponentVNode)(2,u.Window,{width:550,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)})})};var p=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,i=(a.map_levels,a.all_sensors),c=a.focus;if(c)return(0,o.createComponentVNode)(2,h,{focus:c});var u=(0,o.createComponentVNode)(2,d.Box,{color:"bad",children:"No sensors detected"});return i&&(u=(0,o.createComponentVNode)(2,d.Table,{children:i.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{children:(0,o.createComponentVNode)(2,d.Table.Cell,{children:(0,o.createComponentVNode)(2,d.Button,{content:e.name,icon:e.alarm?"bell":"sign-in-alt",onClick:function(){return r("setsensor",{id:e.name})}})})},e.name)}))})),(0,o.createComponentVNode)(2,d.Section,{title:"No active sensor. Listing all.",buttons:(0,o.createComponentVNode)(2,d.Button,{content:"Scan For Sensors",icon:"undo",onClick:function(){return r("refresh")}}),children:u})};t.PowerMonitorContent=p;var h=function(e,t){var n=(0,l.useBackend)(t),c=n.act,u=(n.data,e.focus),p=u.history,h=(0,l.useLocalState)(t,"sortByField",null),N=h[0],b=h[1],g=p.supply[p.supply.length-1]||0,V=p.demand[p.demand.length-1]||0,v=p.supply.map((function(e,t){return[t,e]})),k=p.demand.map((function(e,t){return[t,e]})),y=Math.max.apply(Math,[s].concat(p.supply,p.demand)),_=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===N&&(0,r.sortBy)((function(e){return e.name})),"charge"===N&&(0,r.sortBy)((function(e){return-e.charge})),"draw"===N&&(0,r.sortBy)((function(e){return-m(e.load)}),(function(e){return-parseFloat(e.load)})),"problems"===N&&(0,r.sortBy)((function(e){return e.eqp}),(function(e){return e.lgt}),(function(e){return e.env}),(function(e){return e.charge}),(function(e){return e.name}))])(u.areas);return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:u.name,buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"sign-out-alt",content:"Back To Main",onClick:function(){return c("clear")}})}),(0,o.createComponentVNode)(2,d.Flex,{mx:-.5,mb:1,children:[(0,o.createComponentVNode)(2,d.Flex.Item,{mx:.5,width:"200px",children:(0,o.createComponentVNode)(2,d.Section,{children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Supply",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:g,minValue:0,maxValue:y,color:"teal",children:(0,i.toFixed)(g/1e3)+" kW"})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:V,minValue:0,maxValue:y,color:"pink",children:(0,i.toFixed)(V/1e3)+" kW"})})]})})}),(0,o.createComponentVNode)(2,d.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,d.Section,{position:"relative",height:"100%",children:[(0,o.createComponentVNode)(2,d.Chart.Line,{fillPositionedParent:!0,data:v,rangeX:[0,v.length-1],rangeY:[0,y],strokeColor:"rgba(0, 181, 173, 1)",fillColor:"rgba(0, 181, 173, 0.25)"}),(0,o.createComponentVNode)(2,d.Chart.Line,{fillPositionedParent:!0,data:k,rangeX:[0,k.length-1],rangeY:[0,y],strokeColor:"rgba(224, 57, 151, 1)",fillColor:"rgba(224, 57, 151, 0.25)"})]})})]}),(0,o.createComponentVNode)(2,d.Section,{children:[(0,o.createComponentVNode)(2,d.Box,{mb:1,children:[(0,o.createComponentVNode)(2,d.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"name"===N,content:"Name",onClick:function(){return b("name"!==N&&"name")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"charge"===N,content:"Charge",onClick:function(){return b("charge"!==N&&"charge")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"draw"===N,content:"Draw",onClick:function(){return b("draw"!==N&&"draw")}}),(0,o.createComponentVNode)(2,d.Button.Checkbox,{checked:"problems"===N,content:"Problems",onClick:function(){return b("problems"!==N&&"problems")}})]}),(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,d.Table.Cell,{textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),_.map((function(e,t){return(0,o.createVNode)(1,"tr","Table__row candystripe",[(0,o.createVNode)(1,"td",null,e.name,0),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",(0,o.createComponentVNode)(2,f,{charging:e.charging,charge:e.charge}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",e.load,0),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.eqp}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.lgt}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,C,{status:e.env}),2)],4,null,e.id)}))]})]})],4)};t.PowerMonitorFocus=h;var f=function(e){var t=e.charging,n=e.charge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Icon,{width:"18px",textAlign:"center",name:0===t&&(n>50?"battery-half":"battery-quarter")||1===t&&"bolt"||2===t&&"battery-full",color:0===t&&(n>50?"yellow":"red")||1===t&&"yellow"||2===t&&"green"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,i.toFixed)(n)+"%"})],4)};t.AreaCharge=f,f.defaultHooks=c.pureComponentHooks;var C=function(e){var t=e.status,n=Boolean(2&t),r=Boolean(1&t),a=(n?"On":"Off")+" ["+(r?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:r?undefined:"M",title:a})};C.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RCONContent=t.RCON=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.RCON=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:630,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n,r=(0,a.useLocalState)(t,"tabIndex",0),c=r[0],l=r[1];return 0===c?n=(0,o.createComponentVNode)(2,d):1===c&&(n=(0,o.createComponentVNode)(2,u)),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===c,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"power-off"})," SMESs"]},"SMESs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bolt"})," Breakers"]},"Breakers")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)};t.RCONContent=l;var d=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.smes_info;return(0,o.createComponentVNode)(2,i.Section,{title:"SMESs",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l?l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.RCON_tag,children:[(0,o.createComponentVNode)(2,i.Box,{mb:1,children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*e.capacityPercent,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[(0,r.round)(e.charge/6e4,1)," kWh / ",(0,r.round)(e.capacity/6e4)," kWh (",e.capacityPercent,"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return c("smes_in_toggle",{smes:e.RCON_tag})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("smes_in_set",{smes:e.RCON_tag})}})],4),children:[e.input_val," kW - ",e.input_set?"ON":"OFF"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",onClick:function(){return c("smes_out_toggle",{smes:e.RCON_tag})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("smes_out_set",{smes:e.RCON_tag})}})],4),children:[e.output_val," kW - ",e.output_set?"ONLINE":"OFFLINE"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Load",children:[e.output_load," kW"]})]})]},e.RCON_tag)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No SMESs detected."})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.breaker_info;return(0,o.createComponentVNode)(2,i.Section,{title:"Breakers",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c?c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.RCON_tag,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.enabled?"Enabled":"Disabled",selected:e.enabled,color:e.enabled?null:"bad",onClick:function(){return r("toggle_breaker",{breaker:e.RCON_tag})}})},e.RCON_tag)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No breakers detected."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShutoffMonitorContent=t.ShutoffMonitor=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.ShutoffMonitor=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:627,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.valves;return(0,o.createComponentVNode)(2,i.Section,{title:"Valves",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Position"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Open"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Mode"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Actions"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[e.x,", ",e.y,", ",e.z]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.open?"Yes":"No"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.enabled?"Auto":"Manual"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.open?"Opened":"Closed",selected:e.open,disabled:!e.enabled,onClick:function(){return a("toggle_open",{valve:e.ref})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.enabled?"Auto":"Manual",selected:e.enabled,onClick:function(){return a("toggle_enable",{valve:e.ref})}})]})]},e.name)}))]})})};t.ShutoffMonitorContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,i.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.categories;return(void 0===c?[]:c).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.category,children:(0,o.createVNode)(1,"ul",null,[0===e.alarms.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),e.alarms.map((function(e){var t="";return e.has_cameras?t=(0,o.createComponentVNode)(2,a.Section,{children:e.cameras.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{disabled:e.deact,content:e.name+(e.deact?" (deactived)":""),icon:"video",onClick:function(){return i("switchTo",{camera:e.camera})}},e.name)}))}):e.lost_sources&&(t=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Lost Alarm Sources: ",e.lost_sources]})),(0,o.createVNode)(1,"li",null,[e.name,e.origin_lost?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Alarm Origin Lost."}):"",t],0,null,e.name)}))],0)},e.category)}))};t.StationAlertConsoleContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitorContent=t.SupermatterMonitor=void 0;var o=n(0),r=n(1),a=n(2),i=(n(21),n(3)),c=n(5),l=n(7);t.SupermatterMonitor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.active?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,u)};t.SupermatterMonitorContent=d;var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.supermatters;return(0,o.createComponentVNode)(2,a.Section,{title:"Supermatters Detected",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Refresh",icon:"sync",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"49%",grow:t%2,children:(0,o.createComponentVNode)(2,a.Section,{title:e.area_name+" (#"+e.uid+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:[e.integrity," %"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View Details",onClick:function(){return i("set",{set:e.uid})}})})]})})},t)}))})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.SM_area,s=d.SM_integrity,m=d.SM_power,p=d.SM_ambienttemp,h=d.SM_ambientpressure,f=d.SM_EPR,C=d.SM_gas_O2,N=d.SM_gas_CO2,b=d.SM_gas_N2,g=d.SM_gas_PH,V=d.SM_gas_N2O;return(0,o.createComponentVNode)(2,a.Section,{title:(0,l.toTitleCase)(u),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return to Menu",onClick:function(){return i("clear")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{animated:!0,value:s,minValue:0,maxValue:100,ranges:{good:[100,100],average:[50,100],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,a.Box,{color:(m>300?"bad":m>150&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" MeV/cm\xb3"},value:m})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:(p>5e3?"bad":p>4e3&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" K"},value:p})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:(h>1e4?"bad":h>5e3&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)+" kPa"},value:h})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber EPR",children:(0,o.createComponentVNode)(2,a.Box,{color:(f>4?"bad":f>1&&"average")||"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{format:function(e){return(0,c.round)(e,2)},value:f})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gas Composition",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"O\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:C}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CO\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:N}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:b}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"PH",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2O",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V}),"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=t.ICON_BY_CATEGORY_NAME=void 0;var o=n(0),r=n(9),a=n(7),i=n(1),c=n(2),l=n(3),d=["Atmospherics","Disposals"],u={Atmospherics:"wrench",Disposals:"trash-alt","Transit Tubes":"bus",Pipes:"grip-lines","Disposal Pipes":"grip-lines",Devices:"microchip","Heat Exchange":"thermometer-half","Insulated pipes":"snowflake","Station Equipment":"microchip"};t.ICON_BY_CATEGORY_NAME=u;var s=[{name:"Dispense",bitmask:1},{name:"Connect",bitmask:2},{name:"Destroy",bitmask:4},{name:"Paint",bitmask:8}];t.RapidPipeDispenser=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=p.category,f=p.categories,C=void 0===f?[]:f,N=p.selected_color,b=p.paint_colors,g=p.piping_layer,V=p.pipe_layers,v=p.mode,k=p.preview_rows.flatMap((function(e){return e.previews})),y=(0,i.useLocalState)(t,"categoryName"),_=y[0],B=y[1],L=C.find((function(e){return e.cat_name===_}))||C[0];return(0,o.createComponentVNode)(2,l.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Category",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{selected:h===t,icon:u[e],color:"transparent",content:e,onClick:function(){return m("category",{category:t})}},e)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Modes",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:v&e.bitmask,content:e.name,onClick:function(){return m("mode",{mode:e.bitmask})}},e.bitmask)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,width:"64px",color:b[N],children:(0,a.capitalize)(N)}),Object.keys(b).map((function(e){return(0,o.createComponentVNode)(2,c.ColorBox,{ml:1,color:b[e],onClick:function(){return m("color",{paint_color:e})}},e)}))]})]})}),(0,o.createComponentVNode)(2,c.Flex,{m:-.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,c.Section,{children:[0===h&&(0,o.createComponentVNode)(2,c.Box,{mb:1,children:Object.keys(V).map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:V[e]===g,content:e,onClick:function(){return m("piping_layer",{piping_layer:V[e]})}},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"108px",children:k.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{title:e.dir_name,selected:e.selected,style:{width:"48px",height:"48px",padding:0},onClick:function(){return m("setdir",{dir:e.dir,flipped:e.flipped})},children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["pipes32x32",e.dir+"-"+e.icon_state]),style:{transform:"scale(1.5) translate(17%, 17%)"}})},e.dir)}))})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Tabs,{children:C.map((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{fluid:!0,icon:u[e.cat_name],selected:e.cat_name===L.cat_name,onClick:function(){return B(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==L?void 0:L.recipes.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,ellipsis:!0,checked:e.selected,content:e.pipe_name,title:e.pipe_name,onClick:function(){return m("pipe_type",{pipe_type:e.pipe_index,category:L.cat_name})}},e.pipe_index)}))]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableBasicInfo=void 0;var o=n(0),r=n(1),a=n(2);t.PortableBasicInfo=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.connected,d=c.holding,u=c.on,s=c.pressure,m=c.powerDraw,p=c.cellCharge,h=c.cellMaxCharge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return i("power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Port",color:l?"good":"average",children:l?"Connected":"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",children:[m," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:h,ranges:{good:[.5*h,Infinity],average:[.25*h,.5*h],bad:[-Infinity,.25*h]},children:[p," W"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holding Tank",minHeight:"82px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!d,onClick:function(){return i("eject")}}),children:d?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.pressure})," kPa"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No holding tank"})})],4)}},function(e,t,n){e.exports=n(200)},function(e,t,n){"use strict";n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(226),n(228),n(229),n(230),n(149),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(247),n(248),n(249),n(250),n(251),n(253),n(254),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(285),n(286),n(287),n(288),n(289),n(290),n(292),n(293),n(295),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(321),n(322),n(323),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(166),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413);var o=n(0);n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429);var r=n(171),a=(n(172),n(1)),i=n(173),c=n(24),l=n(175); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -r.perf.mark("inception",window.__inception__),r.perf.mark("init");var d,u=(0,l.createStore)(),s=!0,m=function(){for(u.subscribe((function(){!function(){var e=document.getElementById("tgui-loading");e&&(e.style.display="none"),r.perf.mark("render/start");var t=u.getState(),m=(0,a.selectBackend)(t),p=m.suspended;m.assets;s&&(c.logger.log("initial render",t),"recycled"!==s&&(0,i.setupDrag)());var f=(0,n(433).getRoutedComponent)(t),h=(0,o.createComponentVNode)(2,l.StoreProvider,{store:u,children:(0,o.createComponentVNode)(2,f)});d||(d=document.getElementById("react-root")),(0,o.render)(h,d),p||(r.perf.mark("render/finish"),s&&(s=!1))}()})),window.update=function(e){var t=(0,a.selectBackend)(u.getState()).suspended,n="string"==typeof e?function(e){var t=function(e,t){return"object"==typeof t&&null!==t&&t.__number__?parseFloat(t.__number__):t};Byond.IS_LTE_IE8&&(t=undefined);try{return JSON.parse(e,t)}catch(o){c.logger.log(o),c.logger.log("What we got:",e);var n=o&&o.message;throw new Error("JSON parsing error: "+n)}}(e):e;c.logger.debug("received message '"+(null==n?void 0:n.type)+"'");var o=n.type,r=n.payload;if("update"===o)return window.__ref__=r.config.ref,t&&(c.logger.log("resuming"),s="recycled"),void u.dispatch((0,a.backendUpdate)(r));"suspend"!==o?"ping"!==o?u.dispatch(n):(0,a.sendMessage)({type:"pingReply"}):u.dispatch((0,a.backendSuspendSuccess)())};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}};window.__logger__={fatal:function(e,t){var n=(0,a.selectBackend)(u.getState()),o={config:n.config,suspended:n.suspended,suspending:n.suspending};return c.logger.log("FatalError:",e||t),c.logger.log("State:",o),t+="\nState: "+JSON.stringify(o)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",m):m()},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(40),i=n(41),c=n(11),l=n(100),d=n(140),u=n(6),s=n(20),m=n(57),p=n(10),f=n(12),h=n(17),C=n(28),b=n(36),N=n(51),g=n(47),V=n(68),v=n(52),y=n(143),k=n(99),_=n(23),x=n(16),L=n(76),B=n(32),w=n(26),S=n(96),I=n(77),T=n(65),E=n(64),A=n(15),O=n(144),M=n(29),P=n(48),F=n(37),D=n(22).forEach,R=I("hidden"),j=A("toPrimitive"),W=F.set,z=F.getterFor("Symbol"),U=Object.prototype,H=r.Symbol,K=a("JSON","stringify"),G=_.f,Y=x.f,q=y.f,$=L.f,X=S("symbols"),J=S("op-symbols"),Q=S("string-to-symbol-registry"),Z=S("symbol-to-string-registry"),ee=S("wks"),te=r.QObject,ne=!te||!te.prototype||!te.prototype.findChild,oe=c&&u((function(){return 7!=g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=G(U,t);o&&delete U[t],Y(e,t,n),o&&e!==U&&Y(U,t,o)}:Y,re=function(e,t){var n=X[e]=g(H.prototype);return W(n,{type:"Symbol",tag:e,description:t}),c||(n.description=t),n},ae=d?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},ie=function(e,t,n){e===U&&ie(J,t,n),f(e);var o=b(t,!0);return f(n),s(X,o)?(n.enumerable?(s(e,R)&&e[R][o]&&(e[R][o]=!1),n=g(n,{enumerable:N(0,!1)})):(s(e,R)||Y(e,R,N(1,{})),e[R][o]=!0),oe(e,o,n)):Y(e,o,n)},ce=function(e,t){f(e);var n=C(t),o=V(n).concat(me(n));return D(o,(function(t){c&&!de.call(n,t)||ie(e,t,n[t])})),e},le=function(e,t){return t===undefined?g(e):ce(g(e),t)},de=function(e){var t=b(e,!0),n=$.call(this,t);return!(this===U&&s(X,t)&&!s(J,t))&&(!(n||!s(this,t)||!s(X,t)||s(this,R)&&this[R][t])||n)},ue=function(e,t){var n=C(e),o=b(t,!0);if(n!==U||!s(X,o)||s(J,o)){var r=G(n,o);return!r||!s(X,o)||s(n,R)&&n[R][o]||(r.enumerable=!0),r}},se=function(e){var t=q(C(e)),n=[];return D(t,(function(e){s(X,e)||s(T,e)||n.push(e)})),n},me=function(e){var t=e===U,n=q(t?J:C(e)),o=[];return D(n,(function(e){!s(X,e)||t&&!s(U,e)||o.push(X[e])})),o};(l||(w((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,t=E(e),n=function o(e){this===U&&o.call(J,e),s(this,R)&&s(this[R],t)&&(this[R][t]=!1),oe(this,t,N(1,e))};return c&&ne&&oe(U,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return z(this).tag})),w(H,"withoutSetter",(function(e){return re(E(e),e)})),L.f=de,x.f=ie,_.f=ue,v.f=y.f=se,k.f=me,O.f=function(e){return re(A(e),e)},c&&(Y(H.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),i||w(U,"propertyIsEnumerable",de,{unsafe:!0}))),o({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),D(V(ee),(function(e){M(e)})),o({target:"Symbol",stat:!0,forced:!l},{"for":function(e){var t=String(e);if(s(Q,t))return Q[t];var n=H(t);return Q[t]=n,Z[n]=t,n},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(s(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),o({target:"Object",stat:!0,forced:!l,sham:!c},{create:le,defineProperty:ie,defineProperties:ce,getOwnPropertyDescriptor:ue}),o({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:se,getOwnPropertySymbols:me}),o({target:"Object",stat:!0,forced:u((function(){k.f(1)}))},{getOwnPropertySymbols:function(e){return k.f(h(e))}}),K)&&o({target:"JSON",stat:!0,forced:!l||u((function(){var e=H();return"[null]"!=K([e])||"{}"!=K({a:e})||"{}"!=K(Object(e))}))},{stringify:function(e,t,n){for(var o,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(o=t,(p(t)||e!==undefined)&&!ae(e))return m(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!ae(t))return t}),r[1]=t,K.apply(null,r)}});H.prototype[j]||B(H.prototype,j,H.prototype.valueOf),P(H,"Symbol"),T[R]=!0},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(7),i=n(20),c=n(10),l=n(16).f,d=n(137),u=a.Symbol;if(r&&"function"==typeof u&&(!("description"in u.prototype)||u().description!==undefined)){var s={},m=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof m?new u(e):e===undefined?u():u(e);return""===e&&(s[t]=!0),t};d(m,u);var p=m.prototype=u.prototype;p.constructor=m;var f=p.toString,h="Symbol(test)"==String(u("test")),C=/^Symbol\((.*)\)[^)]+$/;l(p,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=f.call(e);if(i(s,e))return"";var n=h?t.slice(7,-1):t.replace(C,"$1");return""===n?undefined:n}}),o({global:!0,forced:!0},{Symbol:m})}},function(e,t,n){"use strict";n(29)("asyncIterator")},function(e,t,n){"use strict";n(29)("hasInstance")},function(e,t,n){"use strict";n(29)("isConcatSpreadable")},function(e,t,n){"use strict";n(29)("iterator")},function(e,t,n){"use strict";n(29)("match")},function(e,t,n){"use strict";n(29)("replace")},function(e,t,n){"use strict";n(29)("search")},function(e,t,n){"use strict";n(29)("species")},function(e,t,n){"use strict";n(29)("split")},function(e,t,n){"use strict";n(29)("toPrimitive")},function(e,t,n){"use strict";n(29)("toStringTag")},function(e,t,n){"use strict";n(29)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(57),i=n(10),c=n(17),l=n(14),d=n(54),u=n(69),s=n(70),m=n(15),p=n(101),f=m("isConcatSpreadable"),h=p>=51||!r((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),C=s("concat"),b=function(e){if(!i(e))return!1;var t=e[f];return t!==undefined?!!t:a(e)};o({target:"Array",proto:!0,forced:!h||!C},{concat:function(e){var t,n,o,r,a,i=c(this),s=u(i,0),m=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");d(s,m++,a)}return s.length=m,s}})},function(e,t,n){"use strict";var o=n(4),r=n(145),a=n(49);o({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(22).every,a=n(42),i=n(27),c=a("every"),l=i("every");o({target:"Array",proto:!0,forced:!c||!l},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(102),a=n(49);o({target:"Array",proto:!0},{fill:r}),a("fill")},function(e,t,n){"use strict";var o=n(4),r=n(22).filter,a=n(70),i=n(27),c=a("filter"),l=i("filter");o({target:"Array",proto:!0,forced:!c||!l},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(22).find,a=n(49),i=n(27),c=!0,l=i("find");"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("find")},function(e,t,n){"use strict";var o=n(4),r=n(22).findIndex,a=n(49),i=n(27),c=!0,l=i("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(146),a=n(17),i=n(14),c=n(33),l=n(69);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=a(this),n=i(t.length),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:c(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(146),a=n(17),i=n(14),c=n(34),l=n(69);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),o=i(n.length);return c(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(222);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(22).forEach,r=n(42),a=n(27),i=r("forEach"),c=a("forEach");e.exports=i&&c?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(224);o({target:"Array",stat:!0,forced:!n(80)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(53),r=n(17),a=n(147),i=n(103),c=n(14),l=n(54),d=n(104);e.exports=function(e){var t,n,u,s,m,p,f=r(e),h="function"==typeof this?this:Array,C=arguments.length,b=C>1?arguments[1]:undefined,N=b!==undefined,g=d(f),V=0;if(N&&(b=o(b,C>2?arguments[2]:undefined,2)),g==undefined||h==Array&&i(g))for(n=new h(t=c(f.length));t>V;V++)p=N?b(f[V],V):f[V],l(n,V,p);else for(m=(s=g.call(f)).next,n=new h;!(u=m.call(s)).done;V++)p=N?a(s,b,[u.value,V],!0):u.value,l(n,V,p);return n.length=V,n}},function(e,t,n){"use strict";var o=n(4),r=n(66).includes,a=n(49);o({target:"Array",proto:!0,forced:!n(27)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("includes")},function(e,t,n){"use strict";var o=n(4),r=n(66).indexOf,a=n(42),i=n(27),c=[].indexOf,l=!!c&&1/[1].indexOf(1,-0)<0,d=a("indexOf"),u=i("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:l||!d||!u},{indexOf:function(e){return l?c.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(57)})},function(e,t,n){"use strict";var o=n(149).IteratorPrototype,r=n(47),a=n(51),i=n(48),c=n(71),l=function(){return this};e.exports=function(e,t,n){var d=t+" Iterator";return e.prototype=r(o,{next:a(1,n)}),i(e,d,!1,!0),c[d]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(63),a=n(28),i=n(42),c=[].join,l=r!=Object,d=i("join",",");o({target:"Array",proto:!0,forced:l||!d},{join:function(e){return c.call(a(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(151);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(22).map,a=n(70),i=n(27),c=a("map"),l=i("map");o({target:"Array",proto:!0,forced:!c||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(54);o({target:"Array",stat:!0,forced:r((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(81).left,a=n(42),i=n(27),c=a("reduce"),l=i("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(81).right,a=n(42),i=n(27),c=a("reduceRight"),l=i("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(57),i=n(46),c=n(14),l=n(28),d=n(54),u=n(15),s=n(70),m=n(27),p=s("slice"),f=m("slice",{ACCESSORS:!0,0:0,1:2}),h=u("species"),C=[].slice,b=Math.max;o({target:"Array",proto:!0,forced:!p||!f},{slice:function(e,t){var n,o,u,s=l(this),m=c(s.length),p=i(e,m),f=i(t===undefined?m:t,m);if(a(s)&&("function"!=typeof(n=s.constructor)||n!==Array&&!a(n.prototype)?r(n)&&null===(n=n[h])&&(n=undefined):n=undefined,n===Array||n===undefined))return C.call(s,p,f);for(o=new(n===undefined?Array:n)(b(f-p,0)),u=0;p1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(17),i=n(6),c=n(42),l=[],d=l.sort,u=i((function(){l.sort(undefined)})),s=i((function(){l.sort(null)})),m=c("sort");o({target:"Array",proto:!0,forced:u||!s||!m},{sort:function(e){return e===undefined?d.call(a(this)):d.call(a(this),r(e))}})},function(e,t,n){"use strict";n(58)("Array")},function(e,t,n){"use strict";var o=n(4),r=n(46),a=n(33),i=n(14),c=n(17),l=n(69),d=n(54),u=n(70),s=n(27),m=u("splice"),p=s("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,h=Math.min;o({target:"Array",proto:!0,forced:!m||!p},{splice:function(e,t){var n,o,u,s,m,p,C=c(this),b=i(C.length),N=r(e,b),g=arguments.length;if(0===g?n=o=0:1===g?(n=0,o=b-N):(n=g-2,o=h(f(a(t),0),b-N)),b+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(C,o),s=0;sb-o+n;s--)delete C[s-1]}else if(n>o)for(s=b-o;s>N;s--)p=s+n-1,(m=s+o-1)in C?C[p]=C[m]:delete C[p];for(s=0;s>1,h=23===t?r(2,-24)-r(2,-77):0,C=e<0||0===e&&1/e<0?1:0,b=0;for((e=o(e))!=e||e===1/0?(d=e!=e?1:0,l=p):(l=a(i(e)/c),e*(u=r(2,-l))<1&&(l--,u*=2),(e+=l+f>=1?h/u:h*r(2,1-f))*u>=2&&(l++,u/=2),l+f>=p?(d=0,l=p):l+f>=1?(d=(e*u-1)*r(2,t),l+=f):(d=e*r(2,f-1)*r(2,t),l=0));t>=8;s[b++]=255&d,d/=256,t-=8);for(l=l<0;s[b++]=255&l,l/=256,m-=8);return s[--b]|=128*C,s},unpack:function(e,t){var n,o=e.length,a=8*o-t-1,i=(1<>1,l=a-7,d=o-1,u=e[d--],s=127&u;for(u>>=7;l>0;s=256*s+e[d],d--,l-=8);for(n=s&(1<<-l)-1,s>>=-l,l+=t;l>0;n=256*n+e[d],d--,l-=8);if(0===s)s=1-c;else{if(s===i)return n?NaN:u?-1/0:1/0;n+=r(2,t),s-=c}return(u?-1:1)*n*r(2,s-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(13);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(82),i=n(12),c=n(46),l=n(14),d=n(50),u=a.ArrayBuffer,s=a.DataView,m=u.prototype.slice;o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r((function(){return!new u(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(m!==undefined&&t===undefined)return m.call(i(this),e);for(var n=i(this).byteLength,o=c(e,n),r=c(t===undefined?n:t,n),a=new(d(this,u))(l(r-o)),p=new s(this),f=new s(a),h=0;o9999?"+":"";return n+r(a(e),n?6:4,0)+"-"+r(this.getUTCMonth()+1,2,0)+"-"+r(this.getUTCDate(),2,0)+"T"+r(this.getUTCHours(),2,0)+":"+r(this.getUTCMinutes(),2,0)+":"+r(this.getUTCSeconds(),2,0)+"."+r(t,3,0)+"Z"}:l},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(17),i=n(36);o({target:"Date",proto:!0,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(32),r=n(252),a=n(15)("toPrimitive"),i=Date.prototype;a in i||o(i,a,r)},function(e,t,n){"use strict";var o=n(12),r=n(36);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!==e)}},function(e,t,n){"use strict";var o=n(26),r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&o(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(4)({target:"Function",proto:!0},{bind:n(153)})},function(e,t,n){"use strict";var o=n(10),r=n(16),a=n(38),i=n(15)("hasInstance"),c=Function.prototype;i in c||r.f(c,i,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var o=n(11),r=n(16).f,a=Function.prototype,i=a.toString,c=/^\s*function ([^ (]*)/;o&&!("name"in a)&&r(a,"name",{configurable:!0,get:function(){try{return i.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(7);n(48)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(83),r=n(154);e.exports=o("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(155),a=Math.acosh,i=Math.log,c=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?i(e)+l:r(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,a=Math.log,i=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):a(e+i(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,a=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:a((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(111),a=Math.abs,i=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*i(a(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,a=Math.log,i=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(a(e+.5)*i):32}})},function(e,t,n){"use strict";var o=n(4),r=n(85),a=Math.cosh,i=Math.abs,c=Math.E;o({target:"Math",stat:!0,forced:!a||a(710)===Infinity},{cosh:function(e){var t=r(i(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(85);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(267)})},function(e,t,n){"use strict";var o=n(111),r=Math.abs,a=Math.pow,i=a(2,-52),c=a(2,-23),l=a(2,127)*(2-c),d=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=r(e),u=o(e);return al||n!=n?u*Infinity:u*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,a=Math.abs,i=Math.sqrt;o({target:"Math",stat:!0,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,c=0,l=arguments.length,d=0;c0?(o=n/d)*o:n;return d===Infinity?Infinity:d*i(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o;return 0|r*a+((65535&n>>>16)*a+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LOG10E;o({target:"Math",stat:!0},{log10:function(e){return r(e)*a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(155)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(111)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(85),i=Math.abs,c=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return i(e=+e)<1?(a(e)-a(-e))/2:(c(e-1)-c(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(85),a=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){"use strict";n(48)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,a=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?a:r)(e)}})},function(e,t,n){"use strict";var o=n(11),r=n(7),a=n(67),i=n(26),c=n(20),l=n(35),d=n(84),u=n(36),s=n(6),m=n(47),p=n(52).f,f=n(23).f,h=n(16).f,C=n(60).trim,b=r.Number,N=b.prototype,g="Number"==l(m(N)),V=function(e){var t,n,o,r,a,i,c,l,d=u(e,!1);if("string"==typeof d&&d.length>2)if(43===(t=(d=C(d)).charCodeAt(0))||45===t){if(88===(n=d.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(d.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+d}for(i=(a=d.slice(2)).length,c=0;cr)return NaN;return parseInt(a,o)}return+d};if(a("Number",!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var v,y=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof y&&(g?s((function(){N.valueOf.call(n)})):"Number"!=l(n))?d(new b(V(t)),n,y):V(t)},k=o?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;k.length>_;_++)c(b,v=k[_])&&!c(y,v)&&h(y,v,f(b,v));y.prototype=N,N.constructor=y,i(r,"Number",y)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(281)})},function(e,t,n){"use strict";var o=n(7).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(156)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(156),a=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&a(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(288);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(7),r=n(60).trim,a=n(86),i=o.parseFloat,c=1/i(a+"-0")!=-Infinity;e.exports=c?function(e){var t=r(String(e)),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){"use strict";var o=n(4),r=n(157);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(33),a=n(291),i=n(110),c=n(6),l=1..toFixed,d=Math.floor,u=function s(e,t,n){return 0===t?n:t%2==1?s(e,t-1,n*e):s(e*e,t/2,n)};o({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){l.call({})}))},{toFixed:function(e){var t,n,o,c,l=a(this),s=r(e),m=[0,0,0,0,0,0],p="",f="0",h=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*m[n],m[n]=o%1e7,o=d(o/1e7)},C=function(e){for(var t=6,n=0;--t>=0;)n+=m[t],m[t]=d(n/e),n=n%e*1e7},b=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==m[e]){var n=String(m[e]);t=""===t?n:t+i.call("0",7-n.length)+n}return t};if(s<0||s>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(p="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*u(2,69,1))-69)<0?l*u(2,-t,1):l/u(2,t,1),n*=4503599627370496,(t=52-t)>0){for(h(0,n),o=s;o>=7;)h(1e7,0),o-=7;for(h(u(10,o,1),0),o=t-1;o>=23;)C(1<<23),o-=23;C(1<0?p+((c=f.length)<=s?"0."+i.call("0",s-c)+f:f.slice(0,c-s)+"."+f.slice(c-s)):p+f}})},function(e,t,n){"use strict";var o=n(35);e.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var o=n(4),r=n(293);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(11),r=n(6),a=n(68),i=n(99),c=n(76),l=n(17),d=n(63),u=Object.assign,s=Object.defineProperty;e.exports=!u||r((function(){if(o&&1!==u({b:1},u(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=a(u({},t)).join("")}))?function(e,t){for(var n=l(e),r=arguments.length,u=1,s=i.f,m=c.f;r>u;)for(var p,f=d(arguments[u++]),h=s?a(f).concat(s(f)):a(f),C=h.length,b=0;C>b;)p=h[b++],o&&!m.call(f,p)||(n[p]=f[p]);return n}:u},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(11)},{create:n(47)})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(87),i=n(17),c=n(34),l=n(16);r&&o({target:"Object",proto:!0,forced:a},{__defineGetter__:function(e,t){l.f(i(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(141)})},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(16).f})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(87),i=n(17),c=n(34),l=n(16);r&&o({target:"Object",proto:!0,forced:a},{__defineSetter__:function(e,t){l.f(i(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(158).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(73),a=n(6),i=n(10),c=n(56).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!r},{freeze:function(e){return l&&i(e)?l(c(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(74),a=n(54);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){a(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(28),i=n(23).f,c=n(11),l=r((function(){i(1)}));o({target:"Object",stat:!0,forced:!c||l,sham:!c},{getOwnPropertyDescriptor:function(e,t){return i(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(97),i=n(28),c=n(23),l=n(54);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),r=c.f,d=a(o),u={},s=0;d.length>s;)(n=r(o,t=d[s++]))!==undefined&&l(u,t,n);return u}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(143).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(17),i=n(38),c=n(107);o({target:"Object",stat:!0,forced:r((function(){i(1)})),sham:!c},{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(159)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isExtensible;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isExtensible:function(e){return!!a(e)&&(!i||i(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isFrozen:function(e){return!a(e)||!!i&&i(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isSealed:function(e){return!a(e)||!!i&&i(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(17),a=n(68);o({target:"Object",stat:!0,forced:n(6)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(87),i=n(17),c=n(36),l=n(38),d=n(23).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(e){var t,n=i(this),o=c(e,!0);do{if(t=d(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(87),i=n(17),c=n(36),l=n(38),d=n(23).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(e){var t,n=i(this),o=c(e,!0);do{if(t=d(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(56).onFreeze,i=n(73),c=n(6),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!i},{preventExtensions:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(56).onFreeze,i=n(73),c=n(6),l=Object.seal;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!i},{seal:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(55)})},function(e,t,n){"use strict";var o=n(105),r=n(26),a=n(317);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(105),r=n(79);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(158).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(157);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,a,i,c=n(4),l=n(41),d=n(7),u=n(40),s=n(160),m=n(26),p=n(72),f=n(48),h=n(58),C=n(10),b=n(34),N=n(59),g=n(35),V=n(95),v=n(74),y=n(80),k=n(50),_=n(112).set,x=n(162),L=n(163),B=n(321),w=n(164),S=n(322),I=n(37),T=n(67),E=n(15),A=n(101),O=E("species"),M="Promise",P=I.get,F=I.set,D=I.getterFor(M),R=s,j=d.TypeError,W=d.document,z=d.process,U=u("fetch"),H=w.f,K=H,G="process"==g(z),Y=!!(W&&W.createEvent&&d.dispatchEvent),q=T(M,(function(){if(!(V(R)!==String(R))){if(66===A)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!R.prototype["finally"])return!0;if(A>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[O]=t,!(e.then((function(){}))instanceof t)})),$=q||!y((function(e){R.all(e)["catch"]((function(){}))})),X=function(e){var t;return!(!C(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t,n){if(!t.notified){t.notified=!0;var o=t.reactions;x((function(){for(var r=t.value,a=1==t.state,i=0;o.length>i;){var c,l,d,u=o[i++],s=a?u.ok:u.fail,m=u.resolve,p=u.reject,f=u.domain;try{s?(a||(2===t.rejection&&te(e,t),t.rejection=1),!0===s?c=r:(f&&f.enter(),c=s(r),f&&(f.exit(),d=!0)),c===u.promise?p(j("Promise-chain cycle")):(l=X(c))?l.call(c,m,p):m(c)):p(r)}catch(h){f&&!d&&f.exit(),p(h)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Z(e,t)}))}},Q=function(e,t,n){var o,r;Y?((o=W.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),d.dispatchEvent(o)):o={promise:t,reason:n},(r=d["on"+e])?r(o):"unhandledrejection"===e&&B("Unhandled promise rejection",n)},Z=function(e,t){_.call(d,(function(){var n,o=t.value;if(ee(t)&&(n=S((function(){G?z.emit("unhandledRejection",o,e):Q("unhandledrejection",e,o)})),t.rejection=G||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){_.call(d,(function(){G?z.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},ne=function(e,t,n,o){return function(r){e(t,n,r,o)}},oe=function(e,t,n,o){t.done||(t.done=!0,o&&(t=o),t.value=n,t.state=2,J(e,t,!0))},re=function ae(e,t,n,o){if(!t.done){t.done=!0,o&&(t=o);try{if(e===n)throw j("Promise can't be resolved itself");var r=X(n);r?x((function(){var o={done:!1};try{r.call(n,ne(ae,e,o,t),ne(oe,e,o,t))}catch(a){oe(e,o,a,t)}})):(t.value=n,t.state=1,J(e,t,!1))}catch(a){oe(e,{done:!1},a,t)}}};q&&(R=function(e){N(this,R,M),b(e),o.call(this);var t=P(this);try{e(ne(re,this,t),ne(oe,this,t))}catch(n){oe(this,t,n)}},(o=function(e){F(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(R.prototype,{then:function(e,t){var n=D(this),o=H(k(this,R));return o.ok="function"!=typeof e||e,o.fail="function"==typeof t&&t,o.domain=G?z.domain:undefined,n.parent=!0,n.reactions.push(o),0!=n.state&&J(this,n,!1),o.promise},"catch":function(e){return this.then(undefined,e)}}),r=function(){var e=new o,t=P(e);this.promise=e,this.resolve=ne(re,e,t),this.reject=ne(oe,e,t)},w.f=H=function(e){return e===R||e===a?new r(e):K(e)},l||"function"!=typeof s||(i=s.prototype.then,m(s.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){i.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof U&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return L(R,U.apply(d,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:R}),f(R,M,!1,!0),h(M),a=u(M),c({target:M,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(undefined,e),t.promise}}),c({target:M,stat:!0,forced:l||q},{resolve:function(e){return L(l&&this===a?R:this,e)}}),c({target:M,stat:!0,forced:$},{all:function(e){var t=this,n=H(t),o=n.resolve,r=n.reject,a=S((function(){var n=b(t.resolve),a=[],i=0,c=1;v(e,(function(e){var l=i++,d=!1;a.push(undefined),c++,n.call(t,e).then((function(e){d||(d=!0,a[l]=e,--c||o(a))}),r)})),--c||o(a)}));return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=H(t),o=n.reject,r=S((function(){var r=b(t.resolve);v(e,(function(e){r.call(t,e).then(n.resolve,o)}))}));return r.error&&o(r.value),n.promise}})},function(e,t,n){"use strict";var o=n(7);e.exports=function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var o=n(4),r=n(41),a=n(160),i=n(6),c=n(40),l=n(50),d=n(163),u=n(26);o({target:"Promise",proto:!0,real:!0,forced:!!a&&i((function(){a.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=l(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return d(t,e()).then((function(){return n}))}:e,n?function(n){return d(t,e()).then((function(){throw n}))}:e)}}),r||"function"!=typeof a||a.prototype["finally"]||u(a.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(34),i=n(12),c=n(6),l=r("Reflect","apply"),d=Function.apply;o({target:"Reflect",stat:!0,forced:!c((function(){l((function(){}))}))},{apply:function(e,t,n){return a(e),i(n),l?l(e,t,n):d.call(e,t,n)}})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(34),i=n(12),c=n(10),l=n(47),d=n(153),u=n(6),s=r("Reflect","construct"),m=u((function(){function e(){}return!(s((function(){}),[],e)instanceof e)})),p=!u((function(){s((function(){}))})),f=m||p;o({target:"Reflect",stat:!0,forced:f,sham:f},{construct:function(e,t){a(e),i(t);var n=arguments.length<3?e:a(arguments[2]);if(p&&!m)return s(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(d.apply(e,o))}var r=n.prototype,u=l(c(r)?r:Object.prototype),f=Function.apply.call(e,u,t);return c(f)?f:u}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(12),i=n(36),c=n(16);o({target:"Reflect",stat:!0,forced:n(6)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){a(e);var o=i(t,!0);a(n);try{return c.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(23).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=a(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(12),i=n(20),c=n(23),l=n(38);o({target:"Reflect",stat:!0},{get:function d(e,t){var n,o,u=arguments.length<3?e:arguments[2];return a(e)===u?e[t]:(n=c.f(e,t))?i(n,"value")?n.value:n.get===undefined?undefined:n.get.call(u):r(o=l(e))?d(o,t,u):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(12),i=n(23);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return i.f(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(38);o({target:"Reflect",stat:!0,sham:!n(107)},{getPrototypeOf:function(e){return a(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=Object.isExtensible;o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),!a||a(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(97)})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(12);o({target:"Reflect",stat:!0,sham:!n(73)},{preventExtensions:function(e){a(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(10),i=n(20),c=n(6),l=n(16),d=n(23),u=n(38),s=n(51);o({target:"Reflect",stat:!0,forced:c((function(){var e=l.f({},"a",{configurable:!0});return!1!==Reflect.set(u(e),"a",1,e)}))},{set:function m(e,t,n){var o,c,p=arguments.length<4?e:arguments[3],f=d.f(r(e),t);if(!f){if(a(c=u(e)))return m(c,t,n,p);f=s(0)}if(i(f,"value")){if(!1===f.writable||!a(p))return!1;if(o=d.f(p,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,l.f(p,t,o)}else l.f(p,t,s(0,n));return!0}return f.set!==undefined&&(f.set.call(p,n),!0)}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(150),i=n(55);i&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),a(t);try{return i(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(11),r=n(7),a=n(67),i=n(84),c=n(16).f,l=n(52).f,d=n(113),u=n(88),s=n(114),m=n(26),p=n(6),f=n(37).set,h=n(58),C=n(15)("match"),b=r.RegExp,N=b.prototype,g=/a/g,V=/a/g,v=new b(g)!==g,y=s.UNSUPPORTED_Y;if(o&&a("RegExp",!v||y||p((function(){return V[C]=!1,b(g)!=g||b(V)==V||"/a/i"!=b(g,"i")})))){for(var k=function(e,t){var n,o=this instanceof k,r=d(e),a=t===undefined;if(!o&&r&&e.constructor===k&&a)return e;v?r&&!a&&(e=e.source):e instanceof k&&(a&&(t=u.call(e)),e=e.source),y&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=i(v?new b(e,t):b(e,t),o?this:N,k);return y&&n&&f(c,{sticky:n}),c},_=function(e){e in k||c(k,e,{configurable:!0,get:function(){return b[e]},set:function(t){b[e]=t}})},x=l(b),L=0;x.length>L;)_(x[L++]);N.constructor=k,k.prototype=N,m(r,"RegExp",k)}h("RegExp")},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(88),i=n(114).UNSUPPORTED_Y;o&&("g"!=/./g.flags||i)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:a})},function(e,t,n){"use strict";var o=n(26),r=n(12),a=n(6),i=n(88),c=RegExp.prototype,l=c.toString,d=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),u="toString"!=l.name;(d||u)&&o(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?i.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var o=n(83),r=n(154);e.exports=o("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(115).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),a=n(23).f,i=n(14),c=n(116),l=n(25),d=n(117),u=n(41),s="".endsWith,m=Math.min,p=d("endsWith");r({target:"String",proto:!0,forced:!!(u||p||(o=a(String.prototype,"endsWith"),!o||o.writable))&&!p},{endsWith:function(e){var t=String(l(this));c(e);var n=arguments.length>1?arguments[1]:undefined,o=i(t.length),r=n===undefined?o:m(i(n),o),a=String(e);return s?s.call(t,a,r):t.slice(r-a.length,r)===a}})},function(e,t,n){"use strict";var o=n(4),r=n(46),a=String.fromCharCode,i=String.fromCodePoint;o({target:"String",stat:!0,forced:!!i&&1!=i.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,i=0;o>i;){if(t=+arguments[i++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(4),r=n(116),a=n(25);o({target:"String",proto:!0,forced:!n(117)("includes")},{includes:function(e){return!!~String(a(this)).indexOf(r(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(115).charAt,r=n(37),a=n(106),i=r.set,c=r.getterFor("String Iterator");a(String,"String",(function(e){i(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(90),r=n(12),a=n(14),i=n(25),c=n(118),l=n(91);o("match",1,(function(e,t,n){return[function(t){var n=i(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),d=String(this);if(!i.global)return l(i,d);var u=i.unicode;i.lastIndex=0;for(var s,m=[],p=0;null!==(s=l(i,d));){var f=String(s[0]);m[p]=f,""===f&&(i.lastIndex=c(d,a(i.lastIndex),u)),p++}return 0===p?null:m}]}))},function(e,t,n){"use strict";var o=n(4),r=n(109).end;o({target:"String",proto:!0,forced:n(166)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(109).start;o({target:"String",proto:!0,forced:n(166)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(28),a=n(14);o({target:"String",stat:!0},{raw:function(e){for(var t=r(e.raw),n=a(t.length),o=arguments.length,i=[],c=0;n>c;)i.push(String(t[c++])),c]*>)/g,h=/\$([$&'`]|\d\d?)/g;o("replace",2,(function(e,t,n,o){var C=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=o.REPLACE_KEEPS_$0,N=C?"$":"$0";return[function(n,o){var r=l(this),a=n==undefined?undefined:n[e];return a!==undefined?a.call(n,r,o):t.call(String(r),n,o)},function(e,o){if(!C&&b||"string"==typeof o&&-1===o.indexOf(N)){var a=n(t,e,this,o);if(a.done)return a.value}var l=r(e),p=String(this),f="function"==typeof o;f||(o=String(o));var h=l.global;if(h){var V=l.unicode;l.lastIndex=0}for(var v=[];;){var y=u(l,p);if(null===y)break;if(v.push(y),!h)break;""===String(y[0])&&(l.lastIndex=d(p,i(l.lastIndex),V))}for(var k,_="",x=0,L=0;L=x&&(_+=p.slice(x,w)+A,x=w+B.length)}return _+p.slice(x)}];function g(e,n,o,r,i,c){var l=o+e.length,d=r.length,u=h;return i!==undefined&&(i=a(i),u=f),t.call(c,u,(function(t,a){var c;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(l);case"<":c=i[a.slice(1,-1)];break;default:var u=+a;if(0===u)return t;if(u>d){var s=p(u/10);return 0===s?t:s<=d?r[s-1]===undefined?a.charAt(1):r[s-1]+a.charAt(1):t}c=r[u-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var o=n(90),r=n(12),a=n(25),i=n(159),c=n(91);o("search",1,(function(e,t,n){return[function(t){var n=a(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var a=r(e),l=String(this),d=a.lastIndex;i(d,0)||(a.lastIndex=0);var u=c(a,l);return i(a.lastIndex,d)||(a.lastIndex=d),null===u?-1:u.index}]}))},function(e,t,n){"use strict";var o=n(90),r=n(113),a=n(12),i=n(25),c=n(50),l=n(118),d=n(14),u=n(91),s=n(89),m=n(6),p=[].push,f=Math.min,h=!m((function(){return!RegExp(4294967295,"y")}));o("split",2,(function(e,t,n){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var o=String(i(this)),a=n===undefined?4294967295:n>>>0;if(0===a)return[];if(e===undefined)return[o];if(!r(e))return t.call(o,e,a);for(var c,l,d,u=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=new RegExp(e.source,m+"g");(c=s.call(h,o))&&!((l=h.lastIndex)>f&&(u.push(o.slice(f,c.index)),c.length>1&&c.index=a));)h.lastIndex===c.index&&h.lastIndex++;return f===o.length?!d&&h.test("")||u.push(""):u.push(o.slice(f)),u.length>a?u.slice(0,a):u}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=i(this),a=t==undefined?undefined:t[e];return a!==undefined?a.call(t,r,n):o.call(String(r),t,n)},function(e,r){var i=n(o,e,this,r,o!==t);if(i.done)return i.value;var s=a(e),m=String(this),p=c(s,RegExp),C=s.unicode,b=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(h?"y":"g"),N=new p(h?s:"^(?:"+s.source+")",b),g=r===undefined?4294967295:r>>>0;if(0===g)return[];if(0===m.length)return null===u(N,m)?[m]:[];for(var V=0,v=0,y=[];v1?arguments[1]:undefined,t.length)),o=String(e);return s?s.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(60).trim;o({target:"String",proto:!0,forced:n(119)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(60).end,a=n(119)("trimEnd"),i=a?function(){return r(this)}:"".trimEnd;o({target:"String",proto:!0,forced:a},{trimEnd:i,trimRight:i})},function(e,t,n){"use strict";var o=n(4),r=n(60).start,a=n(119)("trimStart"),i=a?function(){return r(this)}:"".trimStart;o({target:"String",proto:!0,forced:a},{trimStart:i,trimLeft:i})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(43)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(33);e.exports=function(e){var t=o(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(43)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(43)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(13),r=n(145),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return r.call(a(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).every,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(102),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).filter,a=n(50),i=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("filter",(function(e){for(var t=r(i(this),e,arguments.length>1?arguments[1]:undefined),n=a(this,this.constructor),o=0,l=t.length,d=new(c(n))(l);l>o;)d[o]=t[o++];return d}))},function(e,t,n){"use strict";var o=n(13),r=n(22).find,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).findIndex,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).forEach,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(120);(0,n(13).exportTypedArrayStaticMethod)("from",n(168),o)},function(e,t,n){"use strict";var o=n(13),r=n(66).includes,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(66).indexOf,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(7),r=n(13),a=n(148),i=n(15)("iterator"),c=o.Uint8Array,l=a.values,d=a.keys,u=a.entries,s=r.aTypedArray,m=r.exportTypedArrayMethod,p=c&&c.prototype[i],f=!!p&&("values"==p.name||p.name==undefined),h=function(){return l.call(s(this))};m("entries",(function(){return u.call(s(this))})),m("keys",(function(){return d.call(s(this))})),m("values",h,!f),m(i,h,!f)},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=[].join;a("join",(function(e){return i.apply(r(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(151),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).map,a=n(50),i=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("map",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(a(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var o=n(13),r=n(120),a=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(a(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(13),r=n(81).left,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){return r(a(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(81).right,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){return r(a(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=Math.floor;a("reverse",(function(){for(var e,t=r(this).length,n=i(t/2),o=0;o1?arguments[1]:undefined,1),n=this.length,o=i(e),c=r(o.length),d=0;if(c+t>n)throw RangeError("Wrong length");for(;da;)u[a]=n[a++];return u}),a((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(13),r=n(22).some,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=[].sort;a("sort",(function(e){return i.call(r(this),e)}))},function(e,t,n){"use strict";var o=n(13),r=n(14),a=n(46),i=n(50),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),o=n.length,l=a(e,o);return new(i(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:a(t,o))-l))}))},function(e,t,n){"use strict";var o=n(7),r=n(13),a=n(6),i=o.Int8Array,c=r.aTypedArray,l=r.exportTypedArrayMethod,d=[].toLocaleString,u=[].slice,s=!!i&&a((function(){d.call(new i(1))}));l("toLocaleString",(function(){return d.apply(s?u.call(c(this)):c(this),arguments)}),a((function(){return[1,2].toLocaleString()!=new i([1,2]).toLocaleString()}))||!a((function(){i.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(13).exportTypedArrayMethod,r=n(6),a=n(7).Uint8Array,i=a&&a.prototype||{},c=[].toString,l=[].join;r((function(){c.call({})}))&&(c=function(){return l.call(this)});var d=i.toString!=c;o("toString",c,d)},function(e,t,n){"use strict";var o,r=n(7),a=n(72),i=n(56),c=n(83),l=n(169),d=n(10),u=n(37).enforce,s=n(136),m=!r.ActiveXObject&&"ActiveXObject"in r,p=Object.isExtensible,f=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},h=e.exports=c("WeakMap",f,l);if(s&&m){o=l.getConstructor(f,"WeakMap",!0),i.REQUIRED=!0;var C=h.prototype,b=C["delete"],N=C.has,g=C.get,V=C.set;a(C,{"delete":function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),b.call(this,e)||t.frozen["delete"](e)}return b.call(this,e)},has:function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),N.call(this,e)||t.frozen.has(e)}return N.call(this,e)},get:function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),N.call(this,e)?g.call(this,e):t.frozen.get(e)}return g.call(this,e)},set:function(e,t){if(d(e)&&!p(e)){var n=u(this);n.frozen||(n.frozen=new o),N.call(this,e)?V.call(this,e,t):n.frozen.set(e,t)}else V.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(83)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(169))},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(112);o({global:!0,bind:!0,enumerable:!0,forced:!r.setImmediate||!r.clearImmediate},{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(162),i=n(35),c=r.process,l="process"==i(c);o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=l&&c.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(78),i=[].slice,c=function(e){return function(t,n){var o=arguments.length>2,r=o?i.call(arguments,2):undefined;return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};o({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=we,t._HI=F,t._M=Se,t._MCCC=Ae,t._ME=Te,t._MFCC=Oe,t._MP=Le,t._MR=Ne,t.__render=Re,t.createComponentVNode=function(e,t,n,o,r){var i=new S(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(a(o))return n;if(a(n))return u(o,null);return B(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(a(o))return n;if(a(n))return o;return B(n,o)}(e,t,r),t);_.createVNode&&_.createVNode(i);return i},t.createFragment=E,t.createPortal=function(e,t){var n=F(e);return I(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),je(n,e,o,r)}},t.createTextVNode=T,t.createVNode=I,t.directClone=A,t.findDOMfromVNode=g,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&a(e.children)&&P(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?u(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=je,t.rerender=Ge,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function a(e){return null==e}function i(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function l(e){return"string"==typeof e}function d(e){return null===e}function u(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function s(e){return!d(e)&&"object"==typeof e}var m={};t.EMPTY_OBJ=m;function p(e){return e.substr(2).toLowerCase()}function f(e,t){e.appendChild(t)}function h(e,t,n){d(n)?f(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function b(e){for(var t=0;t0,f=d(m),h=l(m)&&"$"===m[0];p||f||h?(n=n||t.slice(0,u),(p||h)&&(s=A(s)),(f||h)&&(s.key="$"+u),n.push(s)):n&&n.push(s),s.flags|=65536}}a=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=A(t)),a=2;return e.children=n,e.childFlags=a,e}function F(e){return i(e)||r(e)?T(e,null):o(e)?E(e,0,null):16384&e.flags?A(e):e}var D="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":D,"xlink:arcrole":D,"xlink:href":D,"xlink:role":D,"xlink:show":D,"xlink:title":D,"xlink:type":D,"xml:base":R,"xml:lang":R,"xml:space":R};function W(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=W(0),U=W(null),H=W(!0);function K(e,t){var n=t.$EV;return n||(n=t.$EV=W(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?Y(t,!0,e,J(t)):t.stopPropagation()}}(e):function(e){return function(t){Y(t,!1,e,J(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function G(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function Y(e,t,n,o){var r=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var i=a[n];if(i&&(o.dom=r,i.event?i.event(i.data,e):i(e),e.cancelBubble))return}r=r.parentNode}while(!d(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function $(){return this.defaultPrevented}function X(){return this.cancelBubble}function J(e){var t={dom:document};return e.isDefaultPrevented=$,e.isPropagationStopped=X,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function Q(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Z(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||m,a=o.dom;if(l(e))Q(r,e,n);else for(var i=0;i-1&&t.options[i]&&(c=t.options[i].value),n&&a(c)&&(c=e.defaultValue),ie(o,c)}}var de,ue,se=Z("onInput",pe),me=Z("onChange");function pe(e,t,n){var o=e.value,r=t.value;if(a(o)){if(n){var i=e.defaultValue;a(i)||i===r||(t.defaultValue=i,t.value=i)}}else r!==o&&(t.defaultValue=o,t.value=o)}function fe(e,t,n,o,r,a){64&e?ae(o,n):256&e?le(o,n,r,t):128&e&&pe(o,n,r),a&&(n.$V=t)}function he(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",se),t.onChange&&ee(e,"change",me)}(t,n)}function Ce(e){return e.type&&te(e.type)?!a(e.checked):!a(e.value)}function be(e){e&&!w(e,null)&&e.current&&(e.current=null)}function Ne(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){w(e,t)||void 0===e.current||(e.current=t)}))}function ge(e,t){Ve(e),V(e,t)}function Ve(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;be(t);var i=e.childFlags;if(!d(r))for(var l=Object.keys(r),u=0,s=l.length;u0;for(var c in i&&(a=Ce(n))&&he(t,o,n),n)xe(c,null,n[c],o,r,a,null);i&&fe(t,e,o,n,!0,a)}function Be(e,t,n){var o=F(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function we(e,t,n,o,r,a){var i=new t(n,o),l=i.$N=Boolean(t.getDerivedStateFromProps||i.getSnapshotBeforeUpdate);if(i.$SVG=r,i.$L=a,e.children=i,i.$BS=!1,i.context=o,i.props===m&&(i.props=n),l)i.state=y(i,n,i.state);else if(c(i.componentWillMount)){i.$BR=!0,i.componentWillMount();var u=i.$PS;if(!d(u)){var s=i.state;if(d(s))i.state=u;else for(var p in u)s[p]=u[p];i.$PS=null}i.$BR=!1}return i.$LI=Be(i,n,o),i}function Se(e,t,n,o,r,a){var i=e.flags|=16384;481&i?Te(e,t,n,o,r,a):4&i?function(e,t,n,o,r,a){var i=we(e,e.type,e.props||m,n,o,a);Se(i.$LI,t,i.$CX,o,r,a),Ae(e.ref,i,a)}(e,t,n,o,r,a):8&i?(!function(e,t,n,o,r,a){Se(e.children=F(function(e,t){return 32768&e.flags?e.type.render(e.props||m,e.ref,t):e.type(e.props||m,t)}(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Oe(e,a)):512&i||16&i?Ie(e,t,r):8192&i?function(e,t,n,o,r,a){var i=e.children,c=e.childFlags;12&c&&0===i.length&&(c=e.childFlags=2,i=e.children=O());2===c?Se(i,n,r,o,r,a):Ee(i,n,t,o,r,a)}(e,n,t,o,r,a):1024&i&&function(e,t,n,o,r){Se(e.children,e.ref,t,!1,null,r);var a=O();Ie(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Ie(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||h(t,o,n)}function Te(e,t,n,o,r,i){var c=e.flags,l=e.props,u=e.className,s=e.children,m=e.childFlags,p=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(a(u)||""===u||(o?p.setAttribute("class",u):p.className=u),16===m)x(p,s);else if(1!==m){var f=o&&"foreignObject"!==e.type;2===m?(16384&s.flags&&(e.children=s=A(s)),Se(s,p,n,f,null,i)):8!==m&&4!==m||Ee(s,p,n,f,null,i)}d(t)||h(t,p,r),d(l)||Le(e,c,l,p,o),Ne(e.ref,p,i)}function Ee(e,t,n,o,r,a){for(var i=0;i0,d!==u){var f=d||m;if((c=u||m)!==m)for(var h in(s=(448&r)>0)&&(p=Ce(c)),c){var C=f[h],b=c[h];C!==b&&xe(h,C,b,l,o,p,e)}if(f!==m)for(var N in f)a(c[N])&&!a(f[N])&&xe(N,f[N],null,l,o,p,e)}var g=t.children,V=t.className;e.className!==V&&(a(V)?l.removeAttribute("class"):o?l.setAttribute("class",V):l.className=V);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,g):Pe(e.childFlags,t.childFlags,e.children,g,l,n,o&&"foreignObject"!==t.type,null,e,i);s&&fe(r,t,l,c,!1,p);var v=t.ref,y=e.ref;y!==v&&(be(y),Ne(v,l,i))}(e,t,o,r,p,s):4&p?function(e,t,n,o,r,a,i){var l=t.children=e.children;if(d(l))return;l.$L=i;var s=t.props||m,p=t.ref,f=e.ref,h=l.state;if(!l.$N){if(c(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(s,o),l.$UN)return;l.$BR=!1}d(l.$PS)||(h=u(h,l.$PS),l.$PS=null)}Fe(l,h,s,n,o,r,!1,a,i),f!==p&&(be(f),Ne(p,l,i))}(e,t,n,o,r,l,s):8&p?function(e,t,n,o,r,i,l){var d=!0,u=t.props||m,s=t.ref,p=e.props,f=!a(s),h=e.children;f&&c(s.onComponentShouldUpdate)&&(d=s.onComponentShouldUpdate(p,u));if(!1!==d){f&&c(s.onComponentWillUpdate)&&s.onComponentWillUpdate(p,u);var C=t.type,b=F(32768&t.flags?C.render(u,s,o):C(u,o));Me(h,b,n,o,r,i,l),t.children=b,f&&c(s.onComponentDidUpdate)&&s.onComponentDidUpdate(p,u)}else t.children=h}(e,t,n,o,r,l,s):16&p?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,o,r,a){var i=e.children,c=t.children,l=e.childFlags,d=t.childFlags,u=null;12&d&&0===c.length&&(d=t.childFlags=2,c=t.children=O());var s=0!=(2&d);if(12&l){var m=i.length;(8&l&&8&d||s||!s&&c.length>m)&&(u=g(i[m-1],!1).nextSibling)}Pe(l,d,i,c,n,o,r,u,e,a)}(e,t,n,o,r,s):function(e,t,n,o){var r=e.ref,a=t.ref,c=t.children;if(Pe(e.childFlags,t.childFlags,e.children,c,r,n,!1,null,e,o),t.dom=e.dom,r!==a&&!i(c)){var l=c.dom;C(r,l),f(a,l)}}(e,t,o,s)}function Pe(e,t,n,o,r,a,i,c,l,d){switch(e){case 2:switch(t){case 2:Me(n,o,r,a,i,c,d);break;case 1:ge(n,r);break;case 16:Ve(n),x(r,o);break;default:!function(e,t,n,o,r,a){Ve(e),Ee(t,n,o,r,g(e,!0),a),V(e,n)}(n,o,r,a,i,d)}break;case 1:switch(t){case 2:Se(o,r,a,i,c,d);break;case 1:break;case 16:x(r,o);break;default:Ee(o,r,a,i,c,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:x(n,t))}(n,o,r);break;case 2:ye(r),Se(o,r,a,i,c,d);break;case 1:ye(r);break;default:ye(r),Ee(o,r,a,i,c,d)}break;default:switch(t){case 16:ve(n),x(r,o);break;case 2:ke(r,l,n),Se(o,r,a,i,c,d);break;case 1:ke(r,l,n);break;default:var u=0|n.length,s=0|o.length;0===u?s>0&&Ee(o,r,a,i,c,d):0===s?ke(r,l,n):8===t&&8===e?function(e,t,n,o,r,a,i,c,l,d){var u,s,m=a-1,p=i-1,f=0,h=e[f],C=t[f];e:{for(;h.key===C.key;){if(16384&C.flags&&(t[f]=C=A(C)),Me(h,C,n,o,r,c,d),e[f]=C,++f>m||f>p)break e;h=e[f],C=t[f]}for(h=e[m],C=t[p];h.key===C.key;){if(16384&C.flags&&(t[p]=C=A(C)),Me(h,C,n,o,r,c,d),e[m]=C,m--,p--,f>m||f>p)break e;h=e[m],C=t[p]}}if(f>m){if(f<=p)for(s=(u=p+1)p)for(;f<=m;)ge(e[f++],n);else!function(e,t,n,o,r,a,i,c,l,d,u,s,m){var p,f,h,C=0,b=c,N=c,V=a-c+1,y=i-c+1,k=new Int32Array(y+1),_=V===o,x=!1,L=0,B=0;if(r<4||(V|y)<32)for(C=b;C<=a;++C)if(p=e[C],Bc?x=!0:L=c,16384&f.flags&&(t[c]=f=A(f)),Me(p,f,l,n,d,u,m),++B;break}!_&&c>i&&ge(p,l)}else _||ge(p,l);else{var w={};for(C=N;C<=i;++C)w[t[C].key]=C;for(C=b;C<=a;++C)if(p=e[C],Bb;)ge(e[b++],l);k[c-N]=C+1,L>c?x=!0:L=c,16384&(f=t[c]).flags&&(t[c]=f=A(f)),Me(p,f,l,n,d,u,m),++B}else _||ge(p,l);else _||ge(p,l)}if(_)ke(l,s,e),Ee(t,l,n,d,u,m);else if(x){var S=function(e){var t=0,n=0,o=0,r=0,a=0,i=0,c=0,l=e.length;l>De&&(De=l,de=new Int32Array(l),ue=new Int32Array(l));for(;n>1]]0&&(ue[n]=de[a-1]),de[a]=n)}a=r+1;var d=new Int32Array(a);i=de[a-1];for(;a-- >0;)d[a]=i,i=ue[i],de[a]=0;return d}(k);for(c=S.length-1,C=y-1;C>=0;C--)0===k[C]?(16384&(f=t[L=C+N]).flags&&(t[L]=f=A(f)),Se(f,l,n,d,(h=L+1)=0;C--)0===k[C]&&(16384&(f=t[L=C+N]).flags&&(t[L]=f=A(f)),Se(f,l,n,d,(h=L+1)i?i:a,m=0;mi)for(m=s;m=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),d}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;v(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=o}catch(r){Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";!function(t,n){var o,r,a=t.html5||{},i=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l=0,d={};function u(){var e=f.elements;return"string"==typeof e?e.split(" "):e}function s(e){var t=d[e._html5shiv];return t||(t={},l++,e._html5shiv=l,d[l]=t),t}function m(e,t,o){return t||(t=n),r?t.createElement(e):(o||(o=s(t)),!(a=o.cache[e]?o.cache[e].cloneNode():c.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren||i.test(e)||a.tagUrn?a:o.frag.appendChild(a));var a}function p(e){e||(e=n);var t=s(e);return!f.shivCSS||o||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),o=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",o.insertBefore(n.lastChild,o.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return f.shivMethods?m(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+u().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(f,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",o="hidden"in e,r=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){o=!0,r=!0}}();var f={elements:a.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==a.shivCSS,supportsUnknownElements:r,shivMethods:!1!==a.shivMethods,type:"default",shivDocument:p,createElement:m,createDocumentFragment:function(e,t){if(e||(e=n),r)return e.createDocumentFragment();for(var o=(t=t||s(e)).frag.cloneNode(),a=0,i=u(),c=i.length;aa;)r.push(arguments[a++]);if(o=t,(p(t)||e!==undefined)&&!ae(e))return m(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!ae(t))return t}),r[1]=t,H.apply(null,r)}});G.prototype[j]||w(G.prototype,j,G.prototype.valueOf),O(G,"Symbol"),T[R]=!0},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(8),i=n(20),c=n(10),l=n(16).f,d=n(138),u=a.Symbol;if(r&&"function"==typeof u&&(!("description"in u.prototype)||u().description!==undefined)){var s={},m=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof m?new u(e):e===undefined?u():u(e);return""===e&&(s[t]=!0),t};d(m,u);var p=m.prototype=u.prototype;p.constructor=m;var h=p.toString,f="Symbol(test)"==String(u("test")),C=/^Symbol\((.*)\)[^)]+$/;l(p,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=h.call(e);if(i(s,e))return"";var n=f?t.slice(7,-1):t.replace(C,"$1");return""===n?undefined:n}}),o({global:!0,forced:!0},{Symbol:m})}},function(e,t,n){"use strict";n(29)("asyncIterator")},function(e,t,n){"use strict";n(29)("hasInstance")},function(e,t,n){"use strict";n(29)("isConcatSpreadable")},function(e,t,n){"use strict";n(29)("iterator")},function(e,t,n){"use strict";n(29)("match")},function(e,t,n){"use strict";n(29)("replace")},function(e,t,n){"use strict";n(29)("search")},function(e,t,n){"use strict";n(29)("species")},function(e,t,n){"use strict";n(29)("split")},function(e,t,n){"use strict";n(29)("toPrimitive")},function(e,t,n){"use strict";n(29)("toStringTag")},function(e,t,n){"use strict";n(29)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(57),i=n(10),c=n(18),l=n(14),d=n(54),u=n(69),s=n(70),m=n(15),p=n(102),h=m("isConcatSpreadable"),f=p>=51||!r((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),C=s("concat"),N=function(e){if(!i(e))return!1;var t=e[h];return t!==undefined?!!t:a(e)};o({target:"Array",proto:!0,forced:!f||!C},{concat:function(e){var t,n,o,r,a,i=c(this),s=u(i,0),m=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");d(s,m++,a)}return s.length=m,s}})},function(e,t,n){"use strict";var o=n(4),r=n(146),a=n(49);o({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(22).every,a=n(42),i=n(27),c=a("every"),l=i("every");o({target:"Array",proto:!0,forced:!c||!l},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(103),a=n(49);o({target:"Array",proto:!0},{fill:r}),a("fill")},function(e,t,n){"use strict";var o=n(4),r=n(22).filter,a=n(70),i=n(27),c=a("filter"),l=i("filter");o({target:"Array",proto:!0,forced:!c||!l},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(22).find,a=n(49),i=n(27),c=!0,l=i("find");"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("find")},function(e,t,n){"use strict";var o=n(4),r=n(22).findIndex,a=n(49),i=n(27),c=!0,l=i("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(147),a=n(18),i=n(14),c=n(34),l=n(69);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=a(this),n=i(t.length),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:c(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(147),a=n(18),i=n(14),c=n(35),l=n(69);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),o=i(n.length);return c(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(225);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(22).forEach,r=n(42),a=n(27),i=r("forEach"),c=a("forEach");e.exports=i&&c?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(227);o({target:"Array",stat:!0,forced:!n(81)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(53),r=n(18),a=n(148),i=n(104),c=n(14),l=n(54),d=n(105);e.exports=function(e){var t,n,u,s,m,p,h=r(e),f="function"==typeof this?this:Array,C=arguments.length,N=C>1?arguments[1]:undefined,b=N!==undefined,g=d(h),V=0;if(b&&(N=o(N,C>2?arguments[2]:undefined,2)),g==undefined||f==Array&&i(g))for(n=new f(t=c(h.length));t>V;V++)p=b?N(h[V],V):h[V],l(n,V,p);else for(m=(s=g.call(h)).next,n=new f;!(u=m.call(s)).done;V++)p=b?a(s,N,[u.value,V],!0):u.value,l(n,V,p);return n.length=V,n}},function(e,t,n){"use strict";var o=n(4),r=n(66).includes,a=n(49);o({target:"Array",proto:!0,forced:!n(27)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("includes")},function(e,t,n){"use strict";var o=n(4),r=n(66).indexOf,a=n(42),i=n(27),c=[].indexOf,l=!!c&&1/[1].indexOf(1,-0)<0,d=a("indexOf"),u=i("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:l||!d||!u},{indexOf:function(e){return l?c.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(57)})},function(e,t,n){"use strict";var o=n(150).IteratorPrototype,r=n(47),a=n(51),i=n(48),c=n(71),l=function(){return this};e.exports=function(e,t,n){var d=t+" Iterator";return e.prototype=r(o,{next:a(1,n)}),i(e,d,!1,!0),c[d]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(63),a=n(28),i=n(42),c=[].join,l=r!=Object,d=i("join",",");o({target:"Array",proto:!0,forced:l||!d},{join:function(e){return c.call(a(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(152);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(22).map,a=n(70),i=n(27),c=a("map"),l=i("map");o({target:"Array",proto:!0,forced:!c||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(54);o({target:"Array",stat:!0,forced:r((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(82).left,a=n(42),i=n(27),c=a("reduce"),l=i("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(82).right,a=n(42),i=n(27),c=a("reduceRight"),l=i("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(57),i=n(46),c=n(14),l=n(28),d=n(54),u=n(15),s=n(70),m=n(27),p=s("slice"),h=m("slice",{ACCESSORS:!0,0:0,1:2}),f=u("species"),C=[].slice,N=Math.max;o({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,o,u,s=l(this),m=c(s.length),p=i(e,m),h=i(t===undefined?m:t,m);if(a(s)&&("function"!=typeof(n=s.constructor)||n!==Array&&!a(n.prototype)?r(n)&&null===(n=n[f])&&(n=undefined):n=undefined,n===Array||n===undefined))return C.call(s,p,h);for(o=new(n===undefined?Array:n)(N(h-p,0)),u=0;p1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(35),a=n(18),i=n(6),c=n(42),l=[],d=l.sort,u=i((function(){l.sort(undefined)})),s=i((function(){l.sort(null)})),m=c("sort");o({target:"Array",proto:!0,forced:u||!s||!m},{sort:function(e){return e===undefined?d.call(a(this)):d.call(a(this),r(e))}})},function(e,t,n){"use strict";n(58)("Array")},function(e,t,n){"use strict";var o=n(4),r=n(46),a=n(34),i=n(14),c=n(18),l=n(69),d=n(54),u=n(70),s=n(27),m=u("splice"),p=s("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,f=Math.min;o({target:"Array",proto:!0,forced:!m||!p},{splice:function(e,t){var n,o,u,s,m,p,C=c(this),N=i(C.length),b=r(e,N),g=arguments.length;if(0===g?n=o=0:1===g?(n=0,o=N-b):(n=g-2,o=f(h(a(t),0),N-b)),N+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(C,o),s=0;sN-o+n;s--)delete C[s-1]}else if(n>o)for(s=N-o;s>b;s--)p=s+n-1,(m=s+o-1)in C?C[p]=C[m]:delete C[p];for(s=0;s>1,f=23===t?r(2,-24)-r(2,-77):0,C=e<0||0===e&&1/e<0?1:0,N=0;for((e=o(e))!=e||e===1/0?(d=e!=e?1:0,l=p):(l=a(i(e)/c),e*(u=r(2,-l))<1&&(l--,u*=2),(e+=l+h>=1?f/u:f*r(2,1-h))*u>=2&&(l++,u/=2),l+h>=p?(d=0,l=p):l+h>=1?(d=(e*u-1)*r(2,t),l+=h):(d=e*r(2,h-1)*r(2,t),l=0));t>=8;s[N++]=255&d,d/=256,t-=8);for(l=l<0;s[N++]=255&l,l/=256,m-=8);return s[--N]|=128*C,s},unpack:function(e,t){var n,o=e.length,a=8*o-t-1,i=(1<>1,l=a-7,d=o-1,u=e[d--],s=127&u;for(u>>=7;l>0;s=256*s+e[d],d--,l-=8);for(n=s&(1<<-l)-1,s>>=-l,l+=t;l>0;n=256*n+e[d],d--,l-=8);if(0===s)s=1-c;else{if(s===i)return n?NaN:u?-1/0:1/0;n+=r(2,t),s-=c}return(u?-1:1)*n*r(2,s-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(13);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(83),i=n(12),c=n(46),l=n(14),d=n(50),u=a.ArrayBuffer,s=a.DataView,m=u.prototype.slice;o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r((function(){return!new u(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(m!==undefined&&t===undefined)return m.call(i(this),e);for(var n=i(this).byteLength,o=c(e,n),r=c(t===undefined?n:t,n),a=new(d(this,u))(l(r-o)),p=new s(this),h=new s(a),f=0;o9999?"+":"";return n+r(a(e),n?6:4,0)+"-"+r(this.getUTCMonth()+1,2,0)+"-"+r(this.getUTCDate(),2,0)+"T"+r(this.getUTCHours(),2,0)+":"+r(this.getUTCMinutes(),2,0)+":"+r(this.getUTCSeconds(),2,0)+"."+r(t,3,0)+"Z"}:l},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(18),i=n(37);o({target:"Date",proto:!0,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(33),r=n(255),a=n(15)("toPrimitive"),i=Date.prototype;a in i||o(i,a,r)},function(e,t,n){"use strict";var o=n(12),r=n(37);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!==e)}},function(e,t,n){"use strict";var o=n(26),r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&o(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(4)({target:"Function",proto:!0},{bind:n(154)})},function(e,t,n){"use strict";var o=n(10),r=n(16),a=n(39),i=n(15)("hasInstance"),c=Function.prototype;i in c||r.f(c,i,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var o=n(11),r=n(16).f,a=Function.prototype,i=a.toString,c=/^\s*function ([^ (]*)/;o&&!("name"in a)&&r(a,"name",{configurable:!0,get:function(){try{return i.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(8);n(48)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(84),r=n(155);e.exports=o("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(156),a=Math.acosh,i=Math.log,c=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?i(e)+l:r(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,a=Math.log,i=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):a(e+i(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,a=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:a((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(112),a=Math.abs,i=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*i(a(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,a=Math.log,i=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(a(e+.5)*i):32}})},function(e,t,n){"use strict";var o=n(4),r=n(86),a=Math.cosh,i=Math.abs,c=Math.E;o({target:"Math",stat:!0,forced:!a||a(710)===Infinity},{cosh:function(e){var t=r(i(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(86);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(270)})},function(e,t,n){"use strict";var o=n(112),r=Math.abs,a=Math.pow,i=a(2,-52),c=a(2,-23),l=a(2,127)*(2-c),d=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=r(e),u=o(e);return al||n!=n?u*Infinity:u*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,a=Math.abs,i=Math.sqrt;o({target:"Math",stat:!0,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,c=0,l=arguments.length,d=0;c0?(o=n/d)*o:n;return d===Infinity?Infinity:d*i(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o;return 0|r*a+((65535&n>>>16)*a+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LOG10E;o({target:"Math",stat:!0},{log10:function(e){return r(e)*a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(156)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(112)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(86),i=Math.abs,c=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return i(e=+e)<1?(a(e)-a(-e))/2:(c(e-1)-c(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(86),a=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){"use strict";n(48)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,a=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?a:r)(e)}})},function(e,t,n){"use strict";var o=n(11),r=n(8),a=n(67),i=n(26),c=n(20),l=n(36),d=n(85),u=n(37),s=n(6),m=n(47),p=n(52).f,h=n(23).f,f=n(16).f,C=n(60).trim,N=r.Number,b=N.prototype,g="Number"==l(m(b)),V=function(e){var t,n,o,r,a,i,c,l,d=u(e,!1);if("string"==typeof d&&d.length>2)if(43===(t=(d=C(d)).charCodeAt(0))||45===t){if(88===(n=d.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(d.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+d}for(i=(a=d.slice(2)).length,c=0;cr)return NaN;return parseInt(a,o)}return+d};if(a("Number",!N(" 0o1")||!N("0b1")||N("+0x1"))){for(var v,k=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof k&&(g?s((function(){b.valueOf.call(n)})):"Number"!=l(n))?d(new N(V(t)),n,k):V(t)},y=o?p(N):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;y.length>_;_++)c(N,v=y[_])&&!c(k,v)&&f(k,v,h(N,v));k.prototype=b,b.constructor=k,i(r,"Number",k)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(284)})},function(e,t,n){"use strict";var o=n(8).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(157)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(157),a=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&a(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(291);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(8),r=n(60).trim,a=n(87),i=o.parseFloat,c=1/i(a+"-0")!=-Infinity;e.exports=c?function(e){var t=r(String(e)),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){"use strict";var o=n(4),r=n(158);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(294),i=n(111),c=n(6),l=1..toFixed,d=Math.floor,u=function s(e,t,n){return 0===t?n:t%2==1?s(e,t-1,n*e):s(e*e,t/2,n)};o({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){l.call({})}))},{toFixed:function(e){var t,n,o,c,l=a(this),s=r(e),m=[0,0,0,0,0,0],p="",h="0",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*m[n],m[n]=o%1e7,o=d(o/1e7)},C=function(e){for(var t=6,n=0;--t>=0;)n+=m[t],m[t]=d(n/e),n=n%e*1e7},N=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==m[e]){var n=String(m[e]);t=""===t?n:t+i.call("0",7-n.length)+n}return t};if(s<0||s>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(p="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*u(2,69,1))-69)<0?l*u(2,-t,1):l/u(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=s;o>=7;)f(1e7,0),o-=7;for(f(u(10,o,1),0),o=t-1;o>=23;)C(1<<23),o-=23;C(1<0?p+((c=h.length)<=s?"0."+i.call("0",s-c)+h:h.slice(0,c-s)+"."+h.slice(c-s)):p+h}})},function(e,t,n){"use strict";var o=n(36);e.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var o=n(4),r=n(296);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(11),r=n(6),a=n(68),i=n(100),c=n(77),l=n(18),d=n(63),u=Object.assign,s=Object.defineProperty;e.exports=!u||r((function(){if(o&&1!==u({b:1},u(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=a(u({},t)).join("")}))?function(e,t){for(var n=l(e),r=arguments.length,u=1,s=i.f,m=c.f;r>u;)for(var p,h=d(arguments[u++]),f=s?a(h).concat(s(h)):a(h),C=f.length,N=0;C>N;)p=f[N++],o&&!m.call(h,p)||(n[p]=h[p]);return n}:u},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(11)},{create:n(47)})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(88),i=n(18),c=n(35),l=n(16);r&&o({target:"Object",proto:!0,forced:a},{__defineGetter__:function(e,t){l.f(i(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(142)})},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(16).f})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(88),i=n(18),c=n(35),l=n(16);r&&o({target:"Object",proto:!0,forced:a},{__defineSetter__:function(e,t){l.f(i(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(159).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(73),a=n(6),i=n(10),c=n(56).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!r},{freeze:function(e){return l&&i(e)?l(c(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(74),a=n(54);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){a(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(28),i=n(23).f,c=n(11),l=r((function(){i(1)}));o({target:"Object",stat:!0,forced:!c||l,sham:!c},{getOwnPropertyDescriptor:function(e,t){return i(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(98),i=n(28),c=n(23),l=n(54);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),r=c.f,d=a(o),u={},s=0;d.length>s;)(n=r(o,t=d[s++]))!==undefined&&l(u,t,n);return u}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(144).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(18),i=n(39),c=n(108);o({target:"Object",stat:!0,forced:r((function(){i(1)})),sham:!c},{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(160)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isExtensible;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isExtensible:function(e){return!!a(e)&&(!i||i(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isFrozen:function(e){return!a(e)||!!i&&i(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(10),i=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){i(1)}))},{isSealed:function(e){return!a(e)||!!i&&i(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(18),a=n(68);o({target:"Object",stat:!0,forced:n(6)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(88),i=n(18),c=n(37),l=n(39),d=n(23).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(e){var t,n=i(this),o=c(e,!0);do{if(t=d(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(88),i=n(18),c=n(37),l=n(39),d=n(23).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(e){var t,n=i(this),o=c(e,!0);do{if(t=d(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(56).onFreeze,i=n(73),c=n(6),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!i},{preventExtensions:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(56).onFreeze,i=n(73),c=n(6),l=Object.seal;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!i},{seal:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(55)})},function(e,t,n){"use strict";var o=n(106),r=n(26),a=n(320);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(106),r=n(80);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(159).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(158);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,a,i,c=n(4),l=n(41),d=n(8),u=n(40),s=n(161),m=n(26),p=n(72),h=n(48),f=n(58),C=n(10),N=n(35),b=n(59),g=n(36),V=n(96),v=n(74),k=n(81),y=n(50),_=n(113).set,B=n(163),L=n(164),w=n(324),x=n(165),S=n(325),I=n(38),T=n(67),E=n(15),A=n(102),P=E("species"),M="Promise",O=I.get,F=I.set,D=I.getterFor(M),R=s,j=d.TypeError,W=d.document,z=d.process,U=u("fetch"),G=x.f,H=G,K="process"==g(z),Y=!!(W&&W.createEvent&&d.dispatchEvent),q=T(M,(function(){if(!(V(R)!==String(R))){if(66===A)return!0;if(!K&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!R.prototype["finally"])return!0;if(A>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[P]=t,!(e.then((function(){}))instanceof t)})),$=q||!k((function(e){R.all(e)["catch"]((function(){}))})),X=function(e){var t;return!(!C(e)||"function"!=typeof(t=e.then))&&t},Q=function(e,t,n){if(!t.notified){t.notified=!0;var o=t.reactions;B((function(){for(var r=t.value,a=1==t.state,i=0;o.length>i;){var c,l,d,u=o[i++],s=a?u.ok:u.fail,m=u.resolve,p=u.reject,h=u.domain;try{s?(a||(2===t.rejection&&te(e,t),t.rejection=1),!0===s?c=r:(h&&h.enter(),c=s(r),h&&(h.exit(),d=!0)),c===u.promise?p(j("Promise-chain cycle")):(l=X(c))?l.call(c,m,p):m(c)):p(r)}catch(f){h&&!d&&h.exit(),p(f)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Z(e,t)}))}},J=function(e,t,n){var o,r;Y?((o=W.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),d.dispatchEvent(o)):o={promise:t,reason:n},(r=d["on"+e])?r(o):"unhandledrejection"===e&&w("Unhandled promise rejection",n)},Z=function(e,t){_.call(d,(function(){var n,o=t.value;if(ee(t)&&(n=S((function(){K?z.emit("unhandledRejection",o,e):J("unhandledrejection",e,o)})),t.rejection=K||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){_.call(d,(function(){K?z.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},ne=function(e,t,n,o){return function(r){e(t,n,r,o)}},oe=function(e,t,n,o){t.done||(t.done=!0,o&&(t=o),t.value=n,t.state=2,Q(e,t,!0))},re=function ae(e,t,n,o){if(!t.done){t.done=!0,o&&(t=o);try{if(e===n)throw j("Promise can't be resolved itself");var r=X(n);r?B((function(){var o={done:!1};try{r.call(n,ne(ae,e,o,t),ne(oe,e,o,t))}catch(a){oe(e,o,a,t)}})):(t.value=n,t.state=1,Q(e,t,!1))}catch(a){oe(e,{done:!1},a,t)}}};q&&(R=function(e){b(this,R,M),N(e),o.call(this);var t=O(this);try{e(ne(re,this,t),ne(oe,this,t))}catch(n){oe(this,t,n)}},(o=function(e){F(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(R.prototype,{then:function(e,t){var n=D(this),o=G(y(this,R));return o.ok="function"!=typeof e||e,o.fail="function"==typeof t&&t,o.domain=K?z.domain:undefined,n.parent=!0,n.reactions.push(o),0!=n.state&&Q(this,n,!1),o.promise},"catch":function(e){return this.then(undefined,e)}}),r=function(){var e=new o,t=O(e);this.promise=e,this.resolve=ne(re,e,t),this.reject=ne(oe,e,t)},x.f=G=function(e){return e===R||e===a?new r(e):H(e)},l||"function"!=typeof s||(i=s.prototype.then,m(s.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){i.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof U&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return L(R,U.apply(d,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:R}),h(R,M,!1,!0),f(M),a=u(M),c({target:M,stat:!0,forced:q},{reject:function(e){var t=G(this);return t.reject.call(undefined,e),t.promise}}),c({target:M,stat:!0,forced:l||q},{resolve:function(e){return L(l&&this===a?R:this,e)}}),c({target:M,stat:!0,forced:$},{all:function(e){var t=this,n=G(t),o=n.resolve,r=n.reject,a=S((function(){var n=N(t.resolve),a=[],i=0,c=1;v(e,(function(e){var l=i++,d=!1;a.push(undefined),c++,n.call(t,e).then((function(e){d||(d=!0,a[l]=e,--c||o(a))}),r)})),--c||o(a)}));return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=G(t),o=n.reject,r=S((function(){var r=N(t.resolve);v(e,(function(e){r.call(t,e).then(n.resolve,o)}))}));return r.error&&o(r.value),n.promise}})},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var o=n(4),r=n(41),a=n(161),i=n(6),c=n(40),l=n(50),d=n(164),u=n(26);o({target:"Promise",proto:!0,real:!0,forced:!!a&&i((function(){a.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=l(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return d(t,e()).then((function(){return n}))}:e,n?function(n){return d(t,e()).then((function(){throw n}))}:e)}}),r||"function"!=typeof a||a.prototype["finally"]||u(a.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(35),i=n(12),c=n(6),l=r("Reflect","apply"),d=Function.apply;o({target:"Reflect",stat:!0,forced:!c((function(){l((function(){}))}))},{apply:function(e,t,n){return a(e),i(n),l?l(e,t,n):d.call(e,t,n)}})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(35),i=n(12),c=n(10),l=n(47),d=n(154),u=n(6),s=r("Reflect","construct"),m=u((function(){function e(){}return!(s((function(){}),[],e)instanceof e)})),p=!u((function(){s((function(){}))})),h=m||p;o({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){a(e),i(t);var n=arguments.length<3?e:a(arguments[2]);if(p&&!m)return s(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(d.apply(e,o))}var r=n.prototype,u=l(c(r)?r:Object.prototype),h=Function.apply.call(e,u,t);return c(h)?h:u}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(12),i=n(37),c=n(16);o({target:"Reflect",stat:!0,forced:n(6)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){a(e);var o=i(t,!0);a(n);try{return c.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(23).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=a(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(10),a=n(12),i=n(20),c=n(23),l=n(39);o({target:"Reflect",stat:!0},{get:function d(e,t){var n,o,u=arguments.length<3?e:arguments[2];return a(e)===u?e[t]:(n=c.f(e,t))?i(n,"value")?n.value:n.get===undefined?undefined:n.get.call(u):r(o=l(e))?d(o,t,u):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(12),i=n(23);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return i.f(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(39);o({target:"Reflect",stat:!0,sham:!n(108)},{getPrototypeOf:function(e){return a(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=Object.isExtensible;o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),!a||a(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(98)})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(12);o({target:"Reflect",stat:!0,sham:!n(73)},{preventExtensions:function(e){a(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(10),i=n(20),c=n(6),l=n(16),d=n(23),u=n(39),s=n(51);o({target:"Reflect",stat:!0,forced:c((function(){var e=l.f({},"a",{configurable:!0});return!1!==Reflect.set(u(e),"a",1,e)}))},{set:function m(e,t,n){var o,c,p=arguments.length<4?e:arguments[3],h=d.f(r(e),t);if(!h){if(a(c=u(e)))return m(c,t,n,p);h=s(0)}if(i(h,"value")){if(!1===h.writable||!a(p))return!1;if(o=d.f(p,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,l.f(p,t,o)}else l.f(p,t,s(0,n));return!0}return h.set!==undefined&&(h.set.call(p,n),!0)}})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(151),i=n(55);i&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),a(t);try{return i(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(11),r=n(8),a=n(67),i=n(85),c=n(16).f,l=n(52).f,d=n(114),u=n(89),s=n(115),m=n(26),p=n(6),h=n(38).set,f=n(58),C=n(15)("match"),N=r.RegExp,b=N.prototype,g=/a/g,V=/a/g,v=new N(g)!==g,k=s.UNSUPPORTED_Y;if(o&&a("RegExp",!v||k||p((function(){return V[C]=!1,N(g)!=g||N(V)==V||"/a/i"!=N(g,"i")})))){for(var y=function(e,t){var n,o=this instanceof y,r=d(e),a=t===undefined;if(!o&&r&&e.constructor===y&&a)return e;v?r&&!a&&(e=e.source):e instanceof y&&(a&&(t=u.call(e)),e=e.source),k&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=i(v?new N(e,t):N(e,t),o?this:b,y);return k&&n&&h(c,{sticky:n}),c},_=function(e){e in y||c(y,e,{configurable:!0,get:function(){return N[e]},set:function(t){N[e]=t}})},B=l(N),L=0;B.length>L;)_(B[L++]);b.constructor=y,y.prototype=b,m(r,"RegExp",y)}f("RegExp")},function(e,t,n){"use strict";var o=n(11),r=n(16),a=n(89),i=n(115).UNSUPPORTED_Y;o&&("g"!=/./g.flags||i)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:a})},function(e,t,n){"use strict";var o=n(26),r=n(12),a=n(6),i=n(89),c=RegExp.prototype,l=c.toString,d=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),u="toString"!=l.name;(d||u)&&o(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?i.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var o=n(84),r=n(155);e.exports=o("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(116).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),a=n(23).f,i=n(14),c=n(117),l=n(25),d=n(118),u=n(41),s="".endsWith,m=Math.min,p=d("endsWith");r({target:"String",proto:!0,forced:!!(u||p||(o=a(String.prototype,"endsWith"),!o||o.writable))&&!p},{endsWith:function(e){var t=String(l(this));c(e);var n=arguments.length>1?arguments[1]:undefined,o=i(t.length),r=n===undefined?o:m(i(n),o),a=String(e);return s?s.call(t,a,r):t.slice(r-a.length,r)===a}})},function(e,t,n){"use strict";var o=n(4),r=n(46),a=String.fromCharCode,i=String.fromCodePoint;o({target:"String",stat:!0,forced:!!i&&1!=i.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,i=0;o>i;){if(t=+arguments[i++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(4),r=n(117),a=n(25);o({target:"String",proto:!0,forced:!n(118)("includes")},{includes:function(e){return!!~String(a(this)).indexOf(r(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(116).charAt,r=n(38),a=n(107),i=r.set,c=r.getterFor("String Iterator");a(String,"String",(function(e){i(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(91),r=n(12),a=n(14),i=n(25),c=n(119),l=n(92);o("match",1,(function(e,t,n){return[function(t){var n=i(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),d=String(this);if(!i.global)return l(i,d);var u=i.unicode;i.lastIndex=0;for(var s,m=[],p=0;null!==(s=l(i,d));){var h=String(s[0]);m[p]=h,""===h&&(i.lastIndex=c(d,a(i.lastIndex),u)),p++}return 0===p?null:m}]}))},function(e,t,n){"use strict";var o=n(4),r=n(110).end;o({target:"String",proto:!0,forced:n(167)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(110).start;o({target:"String",proto:!0,forced:n(167)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(28),a=n(14);o({target:"String",stat:!0},{raw:function(e){for(var t=r(e.raw),n=a(t.length),o=arguments.length,i=[],c=0;n>c;)i.push(String(t[c++])),c]*>)/g,f=/\$([$&'`]|\d\d?)/g;o("replace",2,(function(e,t,n,o){var C=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,N=o.REPLACE_KEEPS_$0,b=C?"$":"$0";return[function(n,o){var r=l(this),a=n==undefined?undefined:n[e];return a!==undefined?a.call(n,r,o):t.call(String(r),n,o)},function(e,o){if(!C&&N||"string"==typeof o&&-1===o.indexOf(b)){var a=n(t,e,this,o);if(a.done)return a.value}var l=r(e),p=String(this),h="function"==typeof o;h||(o=String(o));var f=l.global;if(f){var V=l.unicode;l.lastIndex=0}for(var v=[];;){var k=u(l,p);if(null===k)break;if(v.push(k),!f)break;""===String(k[0])&&(l.lastIndex=d(p,i(l.lastIndex),V))}for(var y,_="",B=0,L=0;L=B&&(_+=p.slice(B,x)+A,B=x+w.length)}return _+p.slice(B)}];function g(e,n,o,r,i,c){var l=o+e.length,d=r.length,u=f;return i!==undefined&&(i=a(i),u=h),t.call(c,u,(function(t,a){var c;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(l);case"<":c=i[a.slice(1,-1)];break;default:var u=+a;if(0===u)return t;if(u>d){var s=p(u/10);return 0===s?t:s<=d?r[s-1]===undefined?a.charAt(1):r[s-1]+a.charAt(1):t}c=r[u-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var o=n(91),r=n(12),a=n(25),i=n(160),c=n(92);o("search",1,(function(e,t,n){return[function(t){var n=a(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var a=r(e),l=String(this),d=a.lastIndex;i(d,0)||(a.lastIndex=0);var u=c(a,l);return i(a.lastIndex,d)||(a.lastIndex=d),null===u?-1:u.index}]}))},function(e,t,n){"use strict";var o=n(91),r=n(114),a=n(12),i=n(25),c=n(50),l=n(119),d=n(14),u=n(92),s=n(90),m=n(6),p=[].push,h=Math.min,f=!m((function(){return!RegExp(4294967295,"y")}));o("split",2,(function(e,t,n){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var o=String(i(this)),a=n===undefined?4294967295:n>>>0;if(0===a)return[];if(e===undefined)return[o];if(!r(e))return t.call(o,e,a);for(var c,l,d,u=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,f=new RegExp(e.source,m+"g");(c=s.call(f,o))&&!((l=f.lastIndex)>h&&(u.push(o.slice(h,c.index)),c.length>1&&c.index=a));)f.lastIndex===c.index&&f.lastIndex++;return h===o.length?!d&&f.test("")||u.push(""):u.push(o.slice(h)),u.length>a?u.slice(0,a):u}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=i(this),a=t==undefined?undefined:t[e];return a!==undefined?a.call(t,r,n):o.call(String(r),t,n)},function(e,r){var i=n(o,e,this,r,o!==t);if(i.done)return i.value;var s=a(e),m=String(this),p=c(s,RegExp),C=s.unicode,N=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(f?"y":"g"),b=new p(f?s:"^(?:"+s.source+")",N),g=r===undefined?4294967295:r>>>0;if(0===g)return[];if(0===m.length)return null===u(b,m)?[m]:[];for(var V=0,v=0,k=[];v1?arguments[1]:undefined,t.length)),o=String(e);return s?s.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(60).trim;o({target:"String",proto:!0,forced:n(120)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(60).end,a=n(120)("trimEnd"),i=a?function(){return r(this)}:"".trimEnd;o({target:"String",proto:!0,forced:a},{trimEnd:i,trimRight:i})},function(e,t,n){"use strict";var o=n(4),r=n(60).start,a=n(120)("trimStart"),i=a?function(){return r(this)}:"".trimStart;o({target:"String",proto:!0,forced:a},{trimStart:i,trimLeft:i})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(43)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(34);e.exports=function(e){var t=o(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(43)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(43)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(43)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(13),r=n(146),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return r.call(a(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).every,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(103),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).filter,a=n(50),i=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("filter",(function(e){for(var t=r(i(this),e,arguments.length>1?arguments[1]:undefined),n=a(this,this.constructor),o=0,l=t.length,d=new(c(n))(l);l>o;)d[o]=t[o++];return d}))},function(e,t,n){"use strict";var o=n(13),r=n(22).find,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).findIndex,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).forEach,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(121);(0,n(13).exportTypedArrayStaticMethod)("from",n(169),o)},function(e,t,n){"use strict";var o=n(13),r=n(66).includes,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(66).indexOf,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(8),r=n(13),a=n(149),i=n(15)("iterator"),c=o.Uint8Array,l=a.values,d=a.keys,u=a.entries,s=r.aTypedArray,m=r.exportTypedArrayMethod,p=c&&c.prototype[i],h=!!p&&("values"==p.name||p.name==undefined),f=function(){return l.call(s(this))};m("entries",(function(){return u.call(s(this))})),m("keys",(function(){return d.call(s(this))})),m("values",f,!h),m(i,f,!h)},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=[].join;a("join",(function(e){return i.apply(r(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(152),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(13),r=n(22).map,a=n(50),i=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("map",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(a(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var o=n(13),r=n(121),a=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(a(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(13),r=n(82).left,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){return r(a(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=n(82).right,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){return r(a(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=Math.floor;a("reverse",(function(){for(var e,t=r(this).length,n=i(t/2),o=0;o1?arguments[1]:undefined,1),n=this.length,o=i(e),c=r(o.length),d=0;if(c+t>n)throw RangeError("Wrong length");for(;da;)u[a]=n[a++];return u}),a((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(13),r=n(22).some,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(13),r=o.aTypedArray,a=o.exportTypedArrayMethod,i=[].sort;a("sort",(function(e){return i.call(r(this),e)}))},function(e,t,n){"use strict";var o=n(13),r=n(14),a=n(46),i=n(50),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),o=n.length,l=a(e,o);return new(i(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:a(t,o))-l))}))},function(e,t,n){"use strict";var o=n(8),r=n(13),a=n(6),i=o.Int8Array,c=r.aTypedArray,l=r.exportTypedArrayMethod,d=[].toLocaleString,u=[].slice,s=!!i&&a((function(){d.call(new i(1))}));l("toLocaleString",(function(){return d.apply(s?u.call(c(this)):c(this),arguments)}),a((function(){return[1,2].toLocaleString()!=new i([1,2]).toLocaleString()}))||!a((function(){i.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(13).exportTypedArrayMethod,r=n(6),a=n(8).Uint8Array,i=a&&a.prototype||{},c=[].toString,l=[].join;r((function(){c.call({})}))&&(c=function(){return l.call(this)});var d=i.toString!=c;o("toString",c,d)},function(e,t,n){"use strict";var o,r=n(8),a=n(72),i=n(56),c=n(84),l=n(170),d=n(10),u=n(38).enforce,s=n(137),m=!r.ActiveXObject&&"ActiveXObject"in r,p=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},f=e.exports=c("WeakMap",h,l);if(s&&m){o=l.getConstructor(h,"WeakMap",!0),i.REQUIRED=!0;var C=f.prototype,N=C["delete"],b=C.has,g=C.get,V=C.set;a(C,{"delete":function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),N.call(this,e)||t.frozen["delete"](e)}return N.call(this,e)},has:function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),b.call(this,e)||t.frozen.has(e)}return b.call(this,e)},get:function(e){if(d(e)&&!p(e)){var t=u(this);return t.frozen||(t.frozen=new o),b.call(this,e)?g.call(this,e):t.frozen.get(e)}return g.call(this,e)},set:function(e,t){if(d(e)&&!p(e)){var n=u(this);n.frozen||(n.frozen=new o),b.call(this,e)?V.call(this,e,t):n.frozen.set(e,t)}else V.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(84)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(170))},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(113);o({global:!0,bind:!0,enumerable:!0,forced:!r.setImmediate||!r.clearImmediate},{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(163),i=n(36),c=r.process,l="process"==i(c);o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=l&&c.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(79),i=[].slice,c=function(e){return function(t,n){var o=arguments.length>2,r=o?i.call(arguments,2):undefined;return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};o({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=xe,t._HI=F,t._M=Se,t._MCCC=Ae,t._ME=Te,t._MFCC=Pe,t._MP=Le,t._MR=be,t.__render=Re,t.createComponentVNode=function(e,t,n,o,r){var i=new S(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(a(o))return n;if(a(n))return u(o,null);return w(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(a(o))return n;if(a(n))return o;return w(n,o)}(e,t,r),t);_.createVNode&&_.createVNode(i);return i},t.createFragment=E,t.createPortal=function(e,t){var n=F(e);return I(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),je(n,e,o,r)}},t.createTextVNode=T,t.createVNode=I,t.directClone=A,t.findDOMfromVNode=g,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&a(e.children)&&O(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?u(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=je,t.rerender=Ke,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function a(e){return null==e}function i(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function l(e){return"string"==typeof e}function d(e){return null===e}function u(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function s(e){return!d(e)&&"object"==typeof e}var m={};t.EMPTY_OBJ=m;function p(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function f(e,t,n){d(n)?h(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function N(e){for(var t=0;t0,h=d(m),f=l(m)&&"$"===m[0];p||h||f?(n=n||t.slice(0,u),(p||f)&&(s=A(s)),(h||f)&&(s.key="$"+u),n.push(s)):n&&n.push(s),s.flags|=65536}}a=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=A(t)),a=2;return e.children=n,e.childFlags=a,e}function F(e){return i(e)||r(e)?T(e,null):o(e)?E(e,0,null):16384&e.flags?A(e):e}var D="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":D,"xlink:arcrole":D,"xlink:href":D,"xlink:role":D,"xlink:show":D,"xlink:title":D,"xlink:type":D,"xml:base":R,"xml:lang":R,"xml:space":R};function W(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=W(0),U=W(null),G=W(!0);function H(e,t){var n=t.$EV;return n||(n=t.$EV=W(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?Y(t,!0,e,Q(t)):t.stopPropagation()}}(e):function(e){return function(t){Y(t,!1,e,Q(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function K(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function Y(e,t,n,o){var r=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var i=a[n];if(i&&(o.dom=r,i.event?i.event(i.data,e):i(e),e.cancelBubble))return}r=r.parentNode}while(!d(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function $(){return this.defaultPrevented}function X(){return this.cancelBubble}function Q(e){var t={dom:document};return e.isDefaultPrevented=$,e.isPropagationStopped=X,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function J(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Z(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||m,a=o.dom;if(l(e))J(r,e,n);else for(var i=0;i-1&&t.options[i]&&(c=t.options[i].value),n&&a(c)&&(c=e.defaultValue),ie(o,c)}}var de,ue,se=Z("onInput",pe),me=Z("onChange");function pe(e,t,n){var o=e.value,r=t.value;if(a(o)){if(n){var i=e.defaultValue;a(i)||i===r||(t.defaultValue=i,t.value=i)}}else r!==o&&(t.defaultValue=o,t.value=o)}function he(e,t,n,o,r,a){64&e?ae(o,n):256&e?le(o,n,r,t):128&e&&pe(o,n,r),a&&(n.$V=t)}function fe(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",se),t.onChange&&ee(e,"change",me)}(t,n)}function Ce(e){return e.type&&te(e.type)?!a(e.checked):!a(e.value)}function Ne(e){e&&!x(e,null)&&e.current&&(e.current=null)}function be(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){x(e,t)||void 0===e.current||(e.current=t)}))}function ge(e,t){Ve(e),V(e,t)}function Ve(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;Ne(t);var i=e.childFlags;if(!d(r))for(var l=Object.keys(r),u=0,s=l.length;u0;for(var c in i&&(a=Ce(n))&&fe(t,o,n),n)Be(c,null,n[c],o,r,a,null);i&&he(t,e,o,n,!0,a)}function we(e,t,n){var o=F(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function xe(e,t,n,o,r,a){var i=new t(n,o),l=i.$N=Boolean(t.getDerivedStateFromProps||i.getSnapshotBeforeUpdate);if(i.$SVG=r,i.$L=a,e.children=i,i.$BS=!1,i.context=o,i.props===m&&(i.props=n),l)i.state=k(i,n,i.state);else if(c(i.componentWillMount)){i.$BR=!0,i.componentWillMount();var u=i.$PS;if(!d(u)){var s=i.state;if(d(s))i.state=u;else for(var p in u)s[p]=u[p];i.$PS=null}i.$BR=!1}return i.$LI=we(i,n,o),i}function Se(e,t,n,o,r,a){var i=e.flags|=16384;481&i?Te(e,t,n,o,r,a):4&i?function(e,t,n,o,r,a){var i=xe(e,e.type,e.props||m,n,o,a);Se(i.$LI,t,i.$CX,o,r,a),Ae(e.ref,i,a)}(e,t,n,o,r,a):8&i?(!function(e,t,n,o,r,a){Se(e.children=F(function(e,t){return 32768&e.flags?e.type.render(e.props||m,e.ref,t):e.type(e.props||m,t)}(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Pe(e,a)):512&i||16&i?Ie(e,t,r):8192&i?function(e,t,n,o,r,a){var i=e.children,c=e.childFlags;12&c&&0===i.length&&(c=e.childFlags=2,i=e.children=P());2===c?Se(i,n,r,o,r,a):Ee(i,n,t,o,r,a)}(e,n,t,o,r,a):1024&i&&function(e,t,n,o,r){Se(e.children,e.ref,t,!1,null,r);var a=P();Ie(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Ie(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||f(t,o,n)}function Te(e,t,n,o,r,i){var c=e.flags,l=e.props,u=e.className,s=e.children,m=e.childFlags,p=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(a(u)||""===u||(o?p.setAttribute("class",u):p.className=u),16===m)B(p,s);else if(1!==m){var h=o&&"foreignObject"!==e.type;2===m?(16384&s.flags&&(e.children=s=A(s)),Se(s,p,n,h,null,i)):8!==m&&4!==m||Ee(s,p,n,h,null,i)}d(t)||f(t,p,r),d(l)||Le(e,c,l,p,o),be(e.ref,p,i)}function Ee(e,t,n,o,r,a){for(var i=0;i0,d!==u){var h=d||m;if((c=u||m)!==m)for(var f in(s=(448&r)>0)&&(p=Ce(c)),c){var C=h[f],N=c[f];C!==N&&Be(f,C,N,l,o,p,e)}if(h!==m)for(var b in h)a(c[b])&&!a(h[b])&&Be(b,h[b],null,l,o,p,e)}var g=t.children,V=t.className;e.className!==V&&(a(V)?l.removeAttribute("class"):o?l.setAttribute("class",V):l.className=V);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,g):Oe(e.childFlags,t.childFlags,e.children,g,l,n,o&&"foreignObject"!==t.type,null,e,i);s&&he(r,t,l,c,!1,p);var v=t.ref,k=e.ref;k!==v&&(Ne(k),be(v,l,i))}(e,t,o,r,p,s):4&p?function(e,t,n,o,r,a,i){var l=t.children=e.children;if(d(l))return;l.$L=i;var s=t.props||m,p=t.ref,h=e.ref,f=l.state;if(!l.$N){if(c(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(s,o),l.$UN)return;l.$BR=!1}d(l.$PS)||(f=u(f,l.$PS),l.$PS=null)}Fe(l,f,s,n,o,r,!1,a,i),h!==p&&(Ne(h),be(p,l,i))}(e,t,n,o,r,l,s):8&p?function(e,t,n,o,r,i,l){var d=!0,u=t.props||m,s=t.ref,p=e.props,h=!a(s),f=e.children;h&&c(s.onComponentShouldUpdate)&&(d=s.onComponentShouldUpdate(p,u));if(!1!==d){h&&c(s.onComponentWillUpdate)&&s.onComponentWillUpdate(p,u);var C=t.type,N=F(32768&t.flags?C.render(u,s,o):C(u,o));Me(f,N,n,o,r,i,l),t.children=N,h&&c(s.onComponentDidUpdate)&&s.onComponentDidUpdate(p,u)}else t.children=f}(e,t,n,o,r,l,s):16&p?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,o,r,a){var i=e.children,c=t.children,l=e.childFlags,d=t.childFlags,u=null;12&d&&0===c.length&&(d=t.childFlags=2,c=t.children=P());var s=0!=(2&d);if(12&l){var m=i.length;(8&l&&8&d||s||!s&&c.length>m)&&(u=g(i[m-1],!1).nextSibling)}Oe(l,d,i,c,n,o,r,u,e,a)}(e,t,n,o,r,s):function(e,t,n,o){var r=e.ref,a=t.ref,c=t.children;if(Oe(e.childFlags,t.childFlags,e.children,c,r,n,!1,null,e,o),t.dom=e.dom,r!==a&&!i(c)){var l=c.dom;C(r,l),h(a,l)}}(e,t,o,s)}function Oe(e,t,n,o,r,a,i,c,l,d){switch(e){case 2:switch(t){case 2:Me(n,o,r,a,i,c,d);break;case 1:ge(n,r);break;case 16:Ve(n),B(r,o);break;default:!function(e,t,n,o,r,a){Ve(e),Ee(t,n,o,r,g(e,!0),a),V(e,n)}(n,o,r,a,i,d)}break;case 1:switch(t){case 2:Se(o,r,a,i,c,d);break;case 1:break;case 16:B(r,o);break;default:Ee(o,r,a,i,c,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:B(n,t))}(n,o,r);break;case 2:ke(r),Se(o,r,a,i,c,d);break;case 1:ke(r);break;default:ke(r),Ee(o,r,a,i,c,d)}break;default:switch(t){case 16:ve(n),B(r,o);break;case 2:ye(r,l,n),Se(o,r,a,i,c,d);break;case 1:ye(r,l,n);break;default:var u=0|n.length,s=0|o.length;0===u?s>0&&Ee(o,r,a,i,c,d):0===s?ye(r,l,n):8===t&&8===e?function(e,t,n,o,r,a,i,c,l,d){var u,s,m=a-1,p=i-1,h=0,f=e[h],C=t[h];e:{for(;f.key===C.key;){if(16384&C.flags&&(t[h]=C=A(C)),Me(f,C,n,o,r,c,d),e[h]=C,++h>m||h>p)break e;f=e[h],C=t[h]}for(f=e[m],C=t[p];f.key===C.key;){if(16384&C.flags&&(t[p]=C=A(C)),Me(f,C,n,o,r,c,d),e[m]=C,m--,p--,h>m||h>p)break e;f=e[m],C=t[p]}}if(h>m){if(h<=p)for(s=(u=p+1)p)for(;h<=m;)ge(e[h++],n);else!function(e,t,n,o,r,a,i,c,l,d,u,s,m){var p,h,f,C=0,N=c,b=c,V=a-c+1,k=i-c+1,y=new Int32Array(k+1),_=V===o,B=!1,L=0,w=0;if(r<4||(V|k)<32)for(C=N;C<=a;++C)if(p=e[C],wc?B=!0:L=c,16384&h.flags&&(t[c]=h=A(h)),Me(p,h,l,n,d,u,m),++w;break}!_&&c>i&&ge(p,l)}else _||ge(p,l);else{var x={};for(C=b;C<=i;++C)x[t[C].key]=C;for(C=N;C<=a;++C)if(p=e[C],wN;)ge(e[N++],l);y[c-b]=C+1,L>c?B=!0:L=c,16384&(h=t[c]).flags&&(t[c]=h=A(h)),Me(p,h,l,n,d,u,m),++w}else _||ge(p,l);else _||ge(p,l)}if(_)ye(l,s,e),Ee(t,l,n,d,u,m);else if(B){var S=function(e){var t=0,n=0,o=0,r=0,a=0,i=0,c=0,l=e.length;l>De&&(De=l,de=new Int32Array(l),ue=new Int32Array(l));for(;n>1]]0&&(ue[n]=de[a-1]),de[a]=n)}a=r+1;var d=new Int32Array(a);i=de[a-1];for(;a-- >0;)d[a]=i,i=ue[i],de[a]=0;return d}(y);for(c=S.length-1,C=k-1;C>=0;C--)0===y[C]?(16384&(h=t[L=C+b]).flags&&(t[L]=h=A(h)),Se(h,l,n,d,(f=L+1)=0;C--)0===y[C]&&(16384&(h=t[L=C+b]).flags&&(t[L]=h=A(h)),Se(h,l,n,d,(f=L+1)i?i:a,m=0;mi)for(m=s;m=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),d}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;v(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=o}catch(r){Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";!function(t,n){var o,r,a=t.html5||{},i=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l=0,d={};function u(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function s(e){var t=d[e._html5shiv];return t||(t={},l++,e._html5shiv=l,d[l]=t),t}function m(e,t,o){return t||(t=n),r?t.createElement(e):(o||(o=s(t)),!(a=o.cache[e]?o.cache[e].cloneNode():c.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren||i.test(e)||a.tagUrn?a:o.frag.appendChild(a));var a}function p(e){e||(e=n);var t=s(e);return!h.shivCSS||o||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),o=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",o.insertBefore(n.lastChild,o.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?m(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+u().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",o="hidden"in e,r=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){o=!0,r=!0}}();var h={elements:a.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==a.shivCSS,supportsUnknownElements:r,shivMethods:!1!==a.shivMethods,type:"default",shivDocument:p,createElement:m,createDocumentFragment:function(e,t){if(e||(e=n),r)return e.createDocumentFragment();for(var o=(t=t||s(e)).frag.cloneNode(),a=0,i=u(),c=i.length;a3?c(i):null,g=String(i.key),V=String(i.char),v=i.location,y=i.keyCode||(i.keyCode=g)&&g.charCodeAt(0)||0,k=i.charCode||(i.charCode=V)&&V.charCodeAt(0)||0,_=i.bubbles,x=i.cancelable,L=i.repeat,B=i.locale,w=i.view||e;if(i.which||(i.which=i.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,_,x,w,p,h,f,C,y,k);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,a){o=a,n=!1,e=undefined,t.dispatchEvent(r)}function a(e){this.value=e}function c(){t++,this.__ce__=new i("@DOMMap:"+t+Math.random())}return a.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new a(t),!1),this}},c}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,a,i=e.CustomEvent,c=e.dispatchEvent,l=e.addEventListener,d=e.removeEventListener,u=0,s=function(){u++},m=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",s,{once:!0}),c(new i("_")),c(new i("_")),d("_",s,{once:!0})}catch(f){}1!==u&&(a=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,i){if(i&&"boolean"!=typeof i){var c,l,d,u=a.get(this),s=p(i);u||a.set(this,u=new n),t in u||(u[t]={handler:[],wrap:[]}),l=u[t],(c=m.call(l.handler,r))<0?(c=l.handler.push(r)-1,l.wrap[c]=d=new n):d=l.wrap[c],s in d||(d[s]=o(t,r,i),e.call(this,t,d[s],d[s].capture))}else e.call(this,t,r,i)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,i,c,l,d=a.get(this);if(d&&t in d&&(c=d[t],-1<(i=m.call(c.handler,n))&&(r=p(o))in(l=c.wrap[i]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;c.handler.splice(i,1),c.wrap.splice(i,1),0===c.handler.length&&delete d[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(e){if("undefined"!=typeof e.setAttribute){var t=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))};e.setProperty=function(e,n){var o=t(e);if(!n)return this.removeAttribute(o);var r=String(n);return this.setAttribute(o,r)},e.getPropertyValue=function(e){var n=t(e);return this.getAttribute(n)||null},e.removeProperty=function(e){var n=t(e),o=this.getAttribute(n);return this.removeAttribute(n),o}}}(CSSStyleDeclaration.prototype)},function(e,t,n){"use strict";window.Int32Array||(window.Int32Array=Array)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new a(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(428),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,n(75))},function(e,t,n){"use strict";(function(e,t){!function(e,n){if(!e.setImmediate){var o,r,a,i,c,l=1,d={},u=!1,s=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){f(e.data)},o=function(e){a.port2.postMessage(e)}):s&&"onreadystatechange"in s.createElement("script")?(r=s.documentElement,o=function(e){var t=s.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),o=function(t){e.postMessage(i+t,"*")}),m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1?r-1:0),i=1;i1?t-1:0),o=1;o3?c(i):null,g=String(i.key),V=String(i.char),v=i.location,k=i.keyCode||(i.keyCode=g)&&g.charCodeAt(0)||0,y=i.charCode||(i.charCode=V)&&V.charCodeAt(0)||0,_=i.bubbles,B=i.cancelable,L=i.repeat,w=i.locale,x=i.view||e;if(i.which||(i.which=i.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,_,B,x,p,f,h,C,k,y);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,a){o=a,n=!1,e=undefined,t.dispatchEvent(r)}function a(e){this.value=e}function c(){t++,this.__ce__=new i("@DOMMap:"+t+Math.random())}return a.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new a(t),!1),this}},c}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,a,i=e.CustomEvent,c=e.dispatchEvent,l=e.addEventListener,d=e.removeEventListener,u=0,s=function(){u++},m=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",s,{once:!0}),c(new i("_")),c(new i("_")),d("_",s,{once:!0})}catch(h){}1!==u&&(a=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,i){if(i&&"boolean"!=typeof i){var c,l,d,u=a.get(this),s=p(i);u||a.set(this,u=new n),t in u||(u[t]={handler:[],wrap:[]}),l=u[t],(c=m.call(l.handler,r))<0?(c=l.handler.push(r)-1,l.wrap[c]=d=new n):d=l.wrap[c],s in d||(d[s]=o(t,r,i),e.call(this,t,d[s],d[s].capture))}else e.call(this,t,r,i)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,i,c,l,d=a.get(this);if(d&&t in d&&(c=d[t],-1<(i=m.call(c.handler,n))&&(r=p(o))in(l=c.wrap[i]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;c.handler.splice(i,1),c.wrap.splice(i,1),0===c.handler.length&&delete d[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(e){if("undefined"!=typeof e.setAttribute){var t=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))};e.setProperty=function(e,n){var o=t(e);if(!n)return this.removeAttribute(o);var r=String(n);return this.setAttribute(o,r)},e.getPropertyValue=function(e){var n=t(e);return this.getAttribute(n)||null},e.removeProperty=function(e){var n=t(e),o=this.getAttribute(n);return this.removeAttribute(n),o}}}(CSSStyleDeclaration.prototype)},function(e,t,n){"use strict";window.Int32Array||(window.Int32Array=Array)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(r.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new a(r.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(431),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,n(76))},function(e,t,n){"use strict";(function(e,t){!function(e,n){if(!e.setImmediate){var o,r,a,i,c,l=1,d={},u=!1,s=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){h(e.data)},o=function(e){a.port2.postMessage(e)}):s&&"onreadystatechange"in s.createElement("script")?(r=s.documentElement,o=function(e){var t=s.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):o=function(e){setTimeout(h,0,e)}:(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),o=function(t){e.postMessage(i+t,"*")}),m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n=e.length?{done:!0}:{done:!1,value:e[t++]}};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(t=e[Symbol.iterator]()).next.bind(t)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1?r-1:0),i=1;i1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(9),a=n(438),i=n(24),c=n(18);function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var d=(0,i.createLogger)("ByondUi"),u=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),C=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),i=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],i[0]=n[1]),o!==undefined&&(a[1]=o[0],i[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,i,t)}))(e)}(a,C,c,l);if(b.length>0){var N=b[0],g=b[b.length-1];b.push([C[0]+f,g[1]]),b.push([C[0]+f,-f]),b.push([-f,-f]),b.push([-f,N[1]])}var V=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,["children","color","title","buttons"]);return(0,o.createComponentVNode)(2,r.Box,{mb:1,children:[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:l,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},s,{children:d}))),2),u&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",u,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})]})},i}(o.Component);t.Collapsible=i},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(9),a=n(18);var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,c=e.backgroundColor,l=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return l.color=t?null:"transparent",l.backgroundColor=i||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(l)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(l))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(9),a=n(18),i=n(126);function c(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t,n;function l(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=l.prototype;return d.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},d.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},d.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},d.buildMenu=function(){var e=this,t=this.props,n=t.options,r=void 0===n?[]:n,a=t.placeholder,i=r.map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return a&&i.unshift((0,o.createVNode)(1,"div","Dropdown__menuentry",[(0,o.createTextVNode)("-- "),a,(0,o.createTextVNode)(" --")],0,{onClick:function(){e.setSelected(null)}},a)),i},d.render=function(){var e=this,t=this.props,n=t.color,l=void 0===n?"default":n,d=t.over,u=t.noscroll,s=t.nochevron,m=t.width,p=t.maxHeight,f=(t.onClick,t.selected,t.disabled),h=t.placeholder,C=c(t,["color","over","noscroll","nochevron","width","maxHeight","onClick","selected","disabled","placeholder"]),b=C.className,N=c(C,["className"]),g=d?!this.state.open:this.state.open,V=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([u?"Dropdown__menu-noscroll":"Dropdown__menu",d&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:m,"max-height":p}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:m,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+l,f&&"Button--disabled",b])},N,{onClick:function(){f&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",this.state.selected||h,0),!!s||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,i.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),V],0)},l}(o.Component);t.Dropdown=l},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(0),r=n(128),a=n(9);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.children,n=i(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=a.pureComponentHooks;var l=function(e){var t=e.size,n=void 0===t?1:t,a=e.style,c=i(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},a)},c)))};t.GridColumn=l,c.defaultHooks=a.pureComponentHooks,c.Column=l},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(9),a=n(18);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){return(0,r.isFalsy)(e)?"":e},l=function(e){var t,n;function l(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=l.prototype;return d.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},d.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=c(r))},d.setEditing=function(e){this.setState({editing:e})},d.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,i(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus"])),l=c.className,d=c.fluid,u=i(c,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",d&&"Input--fluid",l])},u,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},l}(o.Component);t.Input=l},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(5),a=n(9),i=n(18),c=n(127),l=n(129);t.Knob=function(e){if(Byond.IS_LTE_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.forcedInputWidth,d=e.format,u=e.maxValue,s=e.minValue,m=e.onChange,p=e.onDrag,f=e.step,h=e.stepPixelSize,C=e.suppressFlicker,b=e.unit,N=e.value,g=e.className,V=e.style,v=e.fillValue,y=e.color,k=e.ranges,_=void 0===k?{}:k,x=e.size,L=e.bipolar,B=(e.children,e.popUpPosition),w=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","forcedInputWidth","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,forcedInputWidth:n,format:d,maxValue:u,minValue:s,onChange:m,onDrag:p,step:f,stepPixelSize:h,suppressFlicker:C,unit:b,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,m=e.handleDragStart,p=(0,r.scale)(null!=v?v:c,s,u),f=(0,r.scale)(c,s,u),h=y||(0,r.keyOfMatchingRange)(null!=v?v:n,_)||"default",C=270*(f-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+h,L&&"Knob--bipolar",g,(0,i.computeBoxClassName)(w)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((L?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":x+"rem"},V)},w)),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(178);function a(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var i=function(e){var t=e.children,n=a(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=i;i.Item=function(e){var t=e.label,n=e.children,i=a(e,["label","children"]);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},i,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var o=n(0),r=n(9),a=n(18),i=n(177),c=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.label,i=e.labelColor,c=void 0===i?"label":i,l=e.color,d=e.textAlign,u=e.verticalAlign,s=e.buttons,m=e.content,p=e.children;return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,a.Box,{as:"td",color:c,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,o.createComponentVNode)(2,a.Box,{as:"td",color:l,textAlign:d,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:s?undefined:2,children:[m,p]}),s&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",s,0)],0)};t.LabeledListItem=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.size?(0,a.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=d,d.defaultHooks=r.pureComponentHooks,c.Item=l,c.Divider=d},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1);n(122),n(24);var i=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={offsetX:0,offsetY:0,transform:"none",dragging:!1,originX:null,originY:null},n.handleDragStart=function(e){document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd)},n.handleDragMove=function(e){n.setState((function(t){var o=Object.assign({},t),r=e.screenX-o.originX,a=e.screenY-o.originY;return t.dragging?(o.offsetX+=r/n.props.zoom,o.offsetY+=a/n.props.zoom,o.originX=e.screenX,o.originY=e.screenY):o.dragging=!0,o}))},n.handleDragEnd=function(e){document.body.style["pointer-events"]="auto",clearTimeout(n.timer),n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd)},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.offsetX,i=t.offsetY,c=this.props,l=c.children,d=c.zoom,u=(c.reset,"matrix("+d+", 0, 0, "+d+", "+n*d+", "+i*d+")"),s={width:"560px",height:"560px",overflow:"hidden",position:"relative",padding:"0px","background-image":"url("+e.map+"_nanomap_z"+e.mapZLevel+".png)","background-size":"cover","text-align":"center",transform:u};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:(0,o.createComponentVNode)(2,r.Box,{style:s,textAlign:"center",onMouseDown:this.handleDragStart,children:(0,o.createComponentVNode)(2,r.Box,{children:l})})})},i}(o.Component);t.NanoMap=i;i.Marker=function(e,t){var n=e.x,a=e.y,i=e.zoom,c=e.icon,l=e.tooltip,d=e.color,u=e.onClick,s=4*n-5,m=4*a-4;return(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",onMouseDown:u,children:[(0,o.createComponentVNode)(2,r.Icon,{name:c,color:d,fontSize:"4px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l,scale:i})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(9),a=n(18),i=n(176);t.Modal=function(e){var t,n=e.className,c=e.children,l=e.onEnter,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children","onEnter"]);return l&&(t=function(e){13===(e.which||e.keyCode)&&l(e)}),(0,o.createComponentVNode)(2,i.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(d)]),c,0,Object.assign({},(0,a.computeBoxProps)(d))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(9),a=n(18);var i=function(e){var t=e.className,n=e.color,i=e.info,c=(e.warning,e.success),l=e.danger,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","color","info","warning","success","danger"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",c&&"NoticeBox--type--success",l&&"NoticeBox--type--danger",t])},d)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var o=n(0),r=n(5),a=n(9),i=n(18);var c=function(e){var t=e.className,n=e.value,c=e.minValue,l=void 0===c?0:c,d=e.maxValue,u=void 0===d?1:d,s=e.color,m=e.ranges,p=void 0===m?{}:m,f=e.children,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","value","minValue","maxValue","color","ranges","children"]),C=(0,r.scale)(n,l,u),b=f!==undefined,N=s||(0,r.keyOfMatchingRange)(n,p)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+N,t,(0,i.computeBoxClassName)(h)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(C)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",b?f:(0,r.toFixed)(100*C)+"%",0)],4,Object.assign({},(0,i.computeBoxProps)(h))))};t.ProgressBar=c,c.defaultHooks=a.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(9),a=n(18);var i=function(e){var t=e.className,n=e.title,i=e.level,c=void 0===i?1:i,l=e.buttons,d=e.fill,u=e.stretchContents,s=e.noTopPadding,m=e.children,p=e.scrollable,f=e.flexGrow,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","fill","stretchContents","noTopPadding","children","scrollable","flexGrow"]),C=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(l),b=!(0,r.isFalsy)(m);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Section","Section--level--"+c,d&&"Section--fill",p&&"Section--scrollable",f&&"Section--flex",t].concat((0,a.computeBoxClassName)(h))),[C&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",l,0)],4),b&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__content",!!u&&"Section__content--stretchContents",!!s&&"Section__content--noTopPadding"]),m,0)],0,Object.assign({},(0,a.computeBoxProps)(h))))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(5),a=n(9),i=n(18),c=n(127),l=n(129);t.Slider=function(e){if(Byond.IS_LTE_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,s=e.onChange,m=e.onDrag,p=e.step,f=e.stepPixelSize,h=e.suppressFlicker,C=e.unit,b=e.value,N=e.className,g=e.fillValue,V=e.color,v=e.ranges,y=void 0===v?{}:v,k=e.children,_=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),x=k!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:d,minValue:u,onChange:s,onDrag:m,step:p,stepPixelSize:f,suppressFlicker:h,unit:C,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,s=e.inputElement,m=e.handleDragStart,p=g!==undefined&&null!==g,f=((0,r.scale)(n,u,d),(0,r.scale)(null!=g?g:c,u,d)),h=(0,r.scale)(c,u,d),C=V||(0,r.keyOfMatchingRange)(null!=g?g:n,y)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Slider","ProgressBar","ProgressBar--color--"+C,N,(0,i.computeBoxClassName)(_)]),[(0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(f)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(f,h))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(h)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",x?k:l,0),s],0,Object.assign({},(0,i.computeBoxProps)(_),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(9),a=n(18),i=n(125);function c(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.className,n=e.vertical,i=e.children,l=c(e,["className","vertical","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",i,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=l;l.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,l=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},l)))}},function(e,t,n){var o={"./AICard.js":456,"./APC.js":457,"./AiAirlock.js":458,"./AiRestorer.js":459,"./AiSupermatter.js":460,"./AirAlarm.js":461,"./AlgaeFarm.js":463,"./AppearanceChanger.js":464,"./AreaScrubberControl.js":465,"./AssemblyInfrared.js":466,"./AssemblyProx.js":467,"./AssemblyTimer.js":468,"./AtmosAlertConsole.js":469,"./AtmosControl.js":181,"./AtmosFilter.js":470,"./AtmosMixer.js":471,"./Autolathe.js":472,"./BeaconLocator.js":473,"./Biogenerator.js":474,"./BodyDesigner.js":475,"./BodyScanner.js":476,"./BombTester.js":477,"./BotanyEditor.js":478,"./BotanyIsolator.js":479,"./BrigTimer.js":480,"./CameraConsole.js":182,"./Canister.js":481,"./ChemDispenser.js":482,"./ChemMaster.js":486,"./Cleanbot.js":487,"./CloningConsole.js":488,"./ColorMate.js":489,"./CookingAppliance.js":490,"./CrewMonitor.js":184,"./Cryo.js":491,"./CryoStorage.js":185,"./CryoStorageVr.js":492,"./DNAForensics.js":493,"./DNAModifier.js":494,"./DestinationTagger.js":495,"./DiseaseSplicer.js":496,"./DishIncubator.js":497,"./DisposalBin.js":498,"./DroneConsole.js":499,"./EmbeddedController.js":500,"./ExonetNode.js":501,"./ExosuitFabricator.js":130,"./Farmbot.js":502,"./FileCabinet.js":503,"./Floorbot.js":504,"./GasPump.js":505,"./GasTemperatureSystem.js":506,"./GeneralAtmoControl.js":507,"./GeneralRecords.js":508,"./Gps.js":509,"./GravityGenerator.js":510,"./Holodeck.js":511,"./ICAssembly.js":512,"./ICCircuit.js":513,"./ICDetailer.js":514,"./ICPrinter.js":515,"./IDCard.js":516,"./InventoryPanel.js":517,"./InventoryPanelHuman.js":518,"./IsolationCentrifuge.js":519,"./Jukebox.js":520,"./LawManager.js":521,"./LookingGlass.js":522,"./MechaControlConsole.js":523,"./Medbot.js":524,"./MedicalRecords.js":525,"./MessageMonitor.js":526,"./Microwave.js":527,"./MiningOreProcessingConsole.js":528,"./MiningStackingConsole.js":529,"./MiningVendor.js":530,"./MuleBot.js":531,"./NTNetRelay.js":532,"./Newscaster.js":533,"./NoticeBoard.js":534,"./NtosAtmosControl.js":535,"./NtosCameraConsole.js":536,"./NtosCrewMonitor.js":537,"./NtosOvermapNavigation.js":538,"./NtosPowerMonitor.js":539,"./NtosRCON.js":540,"./NtosShutoffMonitor.js":541,"./NtosStationAlertConsole.js":542,"./NtosSupermatterMonitor.js":543,"./OmniFilter.js":544,"./OmniMixer.js":545,"./OperatingComputer.js":546,"./OvermapDisperser.js":547,"./OvermapEngines.js":548,"./OvermapHelm.js":549,"./OvermapNavigation.js":188,"./OvermapShieldGenerator.js":550,"./OvermapShipSensors.js":551,"./ParticleAccelerator.js":552,"./PartsLathe.js":553,"./PathogenicIsolator.js":554,"./PipeDispenser.js":555,"./PlantAnalyzer.js":556,"./PointDefenseControl.js":557,"./PortableGenerator.js":558,"./PortablePump.js":559,"./PortableScrubber.js":560,"./PowerMonitor.js":189,"./PressureRegulator.js":561,"./PrisonerManagement.js":562,"./RCON.js":190,"./RIGSuit.js":563,"./Radio.js":564,"./RapidPipeDispenser.js":194,"./RequestConsole.js":565,"./ResearchConsole.js":566,"./ResearchServerController.js":567,"./ResleevingConsole.js":568,"./ResleevingPod.js":569,"./RoboticsControlConsole.js":570,"./RogueZones.js":571,"./Secbot.js":572,"./SecurityRecords.js":573,"./SeedStorage.js":574,"./ShieldCapacitor.js":575,"./ShieldGenerator.js":576,"./ShutoffMonitor.js":191,"./ShuttleControl.js":577,"./Signaler.js":578,"./Sleeper.js":579,"./SmartVend.js":580,"./Smes.js":581,"./SolarControl.js":582,"./SpaceHeater.js":583,"./StationAlertConsole.js":192,"./SuitCycler.js":584,"./SuitStorageUnit.js":585,"./SupermatterMonitor.js":193,"./SupplyConsole.js":586,"./TEGenerator.js":587,"./Tank.js":588,"./TankDispenser.js":589,"./TelecommsLogBrowser.js":590,"./TelecommsMachineBrowser.js":591,"./TelecommsMultitoolMenu.js":592,"./TimeClock.js":593,"./TransferValve.js":594,"./Turbolift.js":595,"./Vending.js":596,"./VolumePanel.js":597,"./VorePanel.js":598,"./Wires.js":599,"./XenoarchArtifactAnalyzer.js":600,"./XenoarchArtifactHarvester.js":601,"./XenoarchDepthScanner.js":602,"./XenoarchHandheldPowerUtilizer.js":603,"./XenoarchReplicator.js":604,"./XenoarchSpectrometer.js":605,"./XenoarchSuspension.js":606};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=455},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.has_ai,u=l.integrity,s=l.backup_capacitor,m=l.flushing,p=l.has_laws,f=l.laws,h=l.wireless,C=l.radio;if(0===d)return(0,o.createComponentVNode)(2,i.Window,{width:600,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var b=null;b=u>=75?"green":u>=25?"yellow":"red";var N=null;return s>=75&&(N="green"),N=s>=25?"yellow":"red",(0,o.createComponentVNode)(2,i.Window,{width:600,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:b,value:u/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:N,value:s/100})})]})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===m?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!p&&(0,o.createComponentVNode)(2,a.Box,{children:f.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"check":"times",content:h?"Enabled":"Disabled",color:h?"green":"red",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"check":"times",content:C?"Enabled":"Disabled",color:C?"green":"red",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Power",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"radiation",confirmIcon:"radiation",disabled:m||0===u,confirmColor:"red",content:"Shutdown",onClick:function(){return c("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(180),l=n(61);t.APC=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=(0,o.createComponentVNode)(2,u);return a.gridCheck?c=(0,o.createComponentVNode)(2,s):a.failTime&&(c=(0,o.createComponentVNode)(2,m)),(0,o.createComponentVNode)(2,i.Window,{width:450,height:475,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:c})})};var d={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.locked&&!l.siliconUser,s=(l.normallyLocked,d[l.externalPower]||d[0]),m=d[l.chargingStatus]||d[0],p=l.powerChannels||[],f=l.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox,{deny:l.emagged,denialMessage:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"bad",fontSize:"1.5rem",children:"Fault in ID authenticator."}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Please contact maintenance for service."})],4)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!u,color:l.isOperating?"":"bad",disabled:u,onClick:function(){return i("breaker")}}),children:["[ ",s.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:u,onClick:function(){return i("charge")}}),children:["[ ",m.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[p.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!u&&(1===e.status||3===e.status),disabled:u,onClick:function(){return i("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!u&&2===e.status,disabled:u,onClick:function(){return i("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!u&&0===e.status,disabled:u,onClick:function(){return i("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:l.totalCharging?(0,o.createVNode)(1,"b",null,[l.totalLoad,(0,o.createTextVNode)(" W (+ "),l.totalCharging,(0,o.createTextVNode)(" W charging)")],0):(0,o.createVNode)(1,"b",null,[l.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!l.siliconUser&&(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return i("overload")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",selected:l.coverLocked,disabled:u,onClick:function(){return i("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Disabled",selected:2===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Automatic",selected:1===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Enabled",selected:3===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:3})}})],4)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",selected:l.emergencyLights,onClick:function(){return i("emergency_lighting")}})})]})})],4)},s=function(e,t){return(0,o.createComponentVNode)(2,l.FullscreenNotice,{title:"System Failure",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"})}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:"Power surge detected, grid check in effect..."})]})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act,l=(0,o.createComponentVNode)(2,a.Button,{icon:"repeat",content:"Restart Now",color:"good",onClick:function(){return c("reboot")}});return i.locked&&!i.siliconUser&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Swipe an ID card for manual reboot."})),(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:(0,o.createVNode)(1,"h1",null,"SYSTEM FAILURE",16)}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h2",null,"I/O regulators malfunction detected! Waiting for system reboot...",16)}),(0,o.createComponentVNode)(2,a.Box,{color:"good",children:["Automatic reboot in ",i.failTime," seconds..."]}),(0,o.createComponentVNode)(2,a.Box,{mt:4,children:l})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c={2:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Offline"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=c[d.power.main]||c[0],s=c[d.power.backup]||c[0],m=c[d.shock]||c[0];return(0,o.createComponentVNode)(2,i.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_1&&d.wires.main_2?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_1&&d.wires.backup_2?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&0===d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiRestorerContent=t.AiRestorer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AiRestorer=function(){return(0,o.createComponentVNode)(2,i.Window,{width:370,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.AI_present,d=c.error,u=c.name,s=c.laws,m=c.isDead,p=c.restoring,f=c.health,h=c.ejectable;return(0,o.createFragment)([d&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:d}),!!h&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:l?u:"----------",disabled:!l,onClick:function(){return i("PRG_eject")}}),!!l&&(0,o.createComponentVNode)(2,a.Section,{title:h?"System Status":u,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m?"bad":"good",children:m?"Nonfunctional":"Functional"}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:f,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})})}),!!p&&(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",color:"good",mt:1,children:"RECONSTRUCTION IN PROGRESS"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",content:"Begin Reconstruction",disabled:p,mt:1,onClick:function(){return i("PRG_beginReconstruction")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{className:"candystripe",children:e},e)}))})]})],0)};t.AiRestorerContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.AiSupermatter=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=(n(21),n(61));t.AiSupermatter=function(e,t){var n=(0,r.useBackend)(t).data,a=(n.integrity_percentage,n.ambient_temp,n.ambient_pressure,n.detonating),c=(0,o.createComponentVNode)(2,d);return a&&(c=(0,o.createComponentVNode)(2,l)),(0,o.createComponentVNode)(2,i.Window,{width:500,height:300,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:c})})};var l=function(e,t){return(0,o.createComponentVNode)(2,c.FullscreenNotice,{title:"DETONATION IMMINENT",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{color:"bad",name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"CRYSTAL DELAMINATING"}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Evacuate area immediately"})]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,i=n.integrity_percentage,c=n.ambient_temp,l=n.ambient_pressure;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Crystal Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i,maxValue:100,ranges:{good:[90,Infinity],average:[25,90],bad:[-Infinity,25]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Environment Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c,maxValue:1e4,ranges:{bad:[5e3,Infinity],average:[4e3,5e3],good:[-Infinity,4e3]},children:[c," K"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Environment Pressure",children:[l," kPa"]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(5),a=(n(8),n(1)),i=n(2),c=n(39),l=n(3),d=n(180),u=n(462);t.AirAlarm=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.locked&&!r.siliconUser&&!r.remoteUser;return(0,o.createComponentVNode)(2,l.Window,{width:440,height:650,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),!i&&(0,o.createComponentVNode)(2,f)]})})};var s=function(e,t){var n=(0,a.useBackend)(t).data,l=(n.environment_data||[]).filter((function(e){return e.value>=.01})),d={0:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},2:{color:"bad",localStatusText:"Danger (Internals Required)"}},u=d[n.danger_level]||d[0];return(0,o.createComponentVNode)(2,i.Section,{title:"Air Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[l.length>0&&(0,o.createFragment)([l.map((function(e){var t=d[e.danger_level]||d[0];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,c.getGasLabel)(e.name),color:t.color,children:[(0,r.toFixed)(e.value,2),e.unit]},e.name)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Local status",color:u.color,children:u.localStatusText}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Area status",color:n.atmos_alarm||n.fire_alarm?"bad":"good",children:(n.atmos_alarm?"Atmosphere Alarm":n.fire_alarm&&"Fire Alarm")||"Nominal"})],0)||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Warning",color:"bad",children:"Cannot obtain air sample for analysis."}),!!n.emagged&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Warning",color:"bad",children:"Safety measures offline. Device may exhibit abnormal behavior."})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.target_temperature,d=c.rcon;return(0,o.createComponentVNode)(2,i.Section,{title:"Comfort Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Control",children:[(0,o.createComponentVNode)(2,i.Button,{selected:1===d,content:"Off",onClick:function(){return r("rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,i.Button,{selected:2===d,content:"Auto",onClick:function(){return r("rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,i.Button,{selected:3===d,content:"On",onClick:function(){return r("rcon",{rcon:3})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermostat",children:(0,o.createComponentVNode)(2,i.Button,{content:l,onClick:function(){return r("temperature")}})})]})})},p={home:{title:"Air Controls",component:function(){return h}},vents:{title:"Vent Controls",component:function(){return C}},scrubbers:{title:"Scrubber Controls",component:function(){return b}},modes:{title:"Operating Mode",component:function(){return N}},thresholds:{title:"Alarm Thresholds",component:function(){return g}}},f=function(e,t){var n=(0,a.useLocalState)(t,"screen"),r=n[0],c=n[1],l=p[r]||p.home,d=l.component();return(0,o.createComponentVNode)(2,i.Section,{title:l.title,buttons:r&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c()}}),children:(0,o.createComponentVNode)(2,d)})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=(0,a.useLocalState)(t,"screen"),d=(l[0],l[1]),u=c.mode,s=c.atmos_alarm;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:s?"exclamation-triangle":"exclamation",color:s&&"caution",content:"Area Atmosphere Alarm",onClick:function(){return r(s?"reset":"alarm")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:3===u?"exclamation-triangle":"exclamation",color:3===u&&"danger",content:"Panic Siphon",onClick:function(){return r("mode",{mode:3===u?1:3})}}),(0,o.createComponentVNode)(2,i.Box,{mt:2}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Vent Controls",onClick:function(){return d("vents")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"filter",content:"Scrubber Controls",onClick:function(){return d("scrubbers")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Operating Mode",onClick:function(){return d("modes")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"chart-bar",content:"Alarm Thresholds",onClick:function(){return d("thresholds")}})],4)},C=function(e,t){var n=(0,a.useBackend)(t).data.vents;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,u.Vent,{vent:e},e.id_tag)})):"Nothing to show"},b=function(e,t){var n=(0,a.useBackend)(t).data.scrubbers;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,u.Scrubber,{scrubber:e},e.id_tag)})):"Nothing to show"},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.modes;return c&&0!==c.length?c.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:e.selected?"check-square-o":"square-o",selected:e.selected,color:e.selected&&e.danger&&"danger",content:e.name,onClick:function(){return r("mode",{mode:e.mode})}}),(0,o.createComponentVNode)(2,i.Box,{mt:1})],4,e.mode)})):"Nothing to show"},g=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.thresholds;return(0,o.createVNode)(1,"table","LabeledList",[(0,o.createVNode)(1,"thead",null,(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","color-bad","min2",16),(0,o.createVNode)(1,"td","color-average","min1",16),(0,o.createVNode)(1,"td","color-average","max1",16),(0,o.createVNode)(1,"td","color-bad","max2",16)],4),2),(0,o.createVNode)(1,"tbody",null,d.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","LabeledList__label",(0,o.createVNode)(1,"span","color-"+(0,c.getGasColor)(e.name),(0,c.getGasLabel)(e.name),0),2),e.settings.map((function(e){return(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button,{content:(0,r.toFixed)(e.selected,2),onClick:function(){return l("threshold",{env:e.env,"var":e.val})}}),2,null,e.val)}))],0,null,e.name)})),0)],4,{style:{width:"100%"}})}},function(e,t,n){"use strict";t.__esModule=!0,t.Scrubber=t.Vent=void 0;var o=n(0),r=n(8),a=n(1),i=n(2);n(39);t.Vent=function(e,t){var n=e.vent,c=(0,a.useBackend)(t).act,l=n.id_tag,d=n.long_name,u=n.power,s=n.checks,m=n.excheck,p=n.incheck,f=n.direction,h=n.external,C=n.internal,b=n.extdefault,N=n.intdefault;return(0,o.createComponentVNode)(2,i.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return c("power",{id_tag:l,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"siphon"!==f?"Pressurizing":"Siphoning",color:"siphon"===f&&"danger",onClick:function(){return c("direction",{id_tag:l,val:Number("siphon"===f)})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Internal",selected:p,onClick:function(){return c("incheck",{id_tag:l,val:s})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"External",selected:m,onClick:function(){return c("excheck",{id_tag:l,val:s})}})]}),!!p&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Target",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(C),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return c("set_internal_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:N,content:"Reset",onClick:function(){return c("reset_internal_pressure",{id_tag:l})}})]}),!!m&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Target",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(h),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return c("set_external_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:b,content:"Reset",onClick:function(){return c("reset_external_pressure",{id_tag:l})}})]})]})})};t.Scrubber=function(e,t){var n=e.scrubber,c=(0,a.useBackend)(t).act,l=n.long_name,d=n.power,u=n.scrubbing,s=n.id_tag,m=(n.widenet,n.filters);return(0,o.createComponentVNode)(2,i.Section,{level:2,title:(0,r.decodeHtmlEntities)(l),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return c("power",{id_tag:s,val:Number(!d)})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:u?"filter":"sign-in-alt",color:u||"danger",content:u?"Scrubbing":"Siphoning",onClick:function(){return c("scrubbing",{id_tag:s,val:Number(!u)})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filters",children:u&&m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.val?"check-square-o":"square-o",content:e.name,title:e.name,selected:e.val,onClick:function(){return c(e.command,{id_tag:s,val:!e.val})}},e.name)}))||"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AlgaeFarm=void 0;var o=n(0),r=n(1),a=n(2),i=(n(21),n(3)),c=(n(5),n(8));t.AlgaeFarm=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.usePower,s=d.materials,m=d.last_flow_rate,p=d.last_power_draw,f=d.inputDir,h=d.outputDir,C=d.input,b=d.output,N=d.errorText;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[N&&(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:N})}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Processing",selected:2===u,onClick:function(){return l("toggle")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[m," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw",children:[p," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider,{size:1}),s.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.capitalize)(e.display),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{width:"80%",value:e.qty,maxValue:e.max,children:[e.qty,"/",e.max]}),(0,o.createComponentVNode)(2,a.Button,{ml:1,content:"Eject",onClick:function(){return l("ejectMaterial",{mat:e.name})}})]},e.name)}))]}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Gas Input ("+f+")",children:C?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Pressure",children:[C.pressure," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:C.name,children:[C.percent,"% (",C.moles," moles)"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No connection detected."})})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Gas Output ("+h+")",children:b?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Pressure",children:[b.pressure," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:b.name,children:[b.percent,"% (",b.moles," moles)"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No connection detected."})})})]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(19),a=n(8),i=n(1),c=n(2),l=n(3);t.AppearanceChanger=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.config),f=n.data,h=f.name,C=f.specimen,b=f.gender,N=f.gender_id,g=f.hair_style,V=f.facial_hair_style,v=f.change_race,y=f.change_gender,k=f.change_eye_color,_=f.change_skin_tone,x=f.change_skin_color,L=f.change_hair_color,B=f.change_facial_hair_color,w=f.change_hair,S=f.change_facial_hair,I=f.mapRef,T=r.title,E=k||_||x||L||B,A=-1;v?A=0:y?A=1:E?A=2:w?A=4:S&&(A=5);var O=(0,i.useLocalState)(t,"tabIndex",A),M=O[0],P=O[1];return(0,o.createComponentVNode)(2,l.Window,{width:700,height:650,title:(0,a.decodeHtmlEntities)(T),children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Reflection",children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Species",color:v?null:"grey",children:C}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Biological Sex",color:y?null:"grey",children:(0,a.capitalize)(b)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Gender Identity",color:E?null:"grey",children:(0,a.capitalize)(N)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Hair Style",color:w?null:"grey",children:(0,a.capitalize)(g)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Facial Hair Style",color:S?null:"grey",children:(0,a.capitalize)(V)})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.ByondUi,{style:{width:"256px",height:"256px"},params:{id:I,type:"map"}})})]})}),(0,o.createComponentVNode)(2,c.Tabs,{children:[v?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===M,onClick:function(){return P(0)},children:"Race"}):null,y?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===M,onClick:function(){return P(1)},children:"Gender & Sex"}):null,E?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===M,onClick:function(){return P(2)},children:"Colors"}):null,w?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===M,onClick:function(){return P(3)},children:"Hair"}):null,S?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===M,onClick:function(){return P(4)},children:"Facial Hair"}):null]}),(0,o.createComponentVNode)(2,c.Box,{height:"43%",children:[v&&0===M?(0,o.createComponentVNode)(2,d):null,y&&1===M?(0,o.createComponentVNode)(2,u):null,E&&2===M?(0,o.createComponentVNode)(2,s):null,w&&3===M?(0,o.createComponentVNode)(2,m):null,S&&4===M?(0,o.createComponentVNode)(2,p):null]})]})})};var d=function(e,t){var n=(0,i.useBackend)(t),a=n.act,l=n.data,d=l.species,u=l.specimen,s=(0,r.sortBy)((function(e){return e.specimen}))(d||[]);return(0,o.createComponentVNode)(2,c.Section,{title:"Species",fill:!0,scrollable:!0,children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{content:e.specimen,selected:u===e.specimen,onClick:function(){return a("race",{race:e.specimen})}},e.specimen)}))})},u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.gender,d=a.gender_id,u=a.genders,s=a.id_genders;return(0,o.createComponentVNode)(2,c.Section,{title:"Gender & Sex",fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Biological Sex",children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{selected:e.gender_key===l,content:e.gender_name,onClick:function(){return r("gender",{gender:e.gender_key})}},e.gender_key)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Gender Identity",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{selected:e.gender_key===d,content:e.gender_name,onClick:function(){return r("gender_id",{gender_id:e.gender_key})}},e.gender_key)}))})]})})},s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.change_eye_color,d=a.change_skin_tone,u=a.change_skin_color,s=a.change_hair_color,m=a.change_facial_hair_color,p=a.eye_color,f=a.skin_color,h=a.hair_color,C=a.facial_hair_color;return(0,o.createComponentVNode)(2,c.Section,{title:"Colors",fill:!0,scrollable:!0,children:[l?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:p,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Eye Color",onClick:function(){return r("eye_color")}})]}):null,d?(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Change Skin Tone",onClick:function(){return r("skin_tone")}})}):null,u?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:f,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Skin Color",onClick:function(){return r("skin_color")}})]}):null,s?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:h,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Hair Color",onClick:function(){return r("hair_color")}})]}):null,m?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:C,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Facial Hair Color",onClick:function(){return r("facial_hair_color")}})]}):null]})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.hair_style,d=a.hair_styles;return(0,o.createComponentVNode)(2,c.Section,{title:"Hair",fill:!0,scrollable:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return r("hair",{hair:e.hairstyle})},selected:e.hairstyle===l,content:e.hairstyle},e.hairstyle)}))})},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.facial_hair_style,d=a.facial_hair_styles;return(0,o.createComponentVNode)(2,c.Section,{title:"Facial Hair",fill:!0,scrollable:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return r("facial_hair",{facial_hair:e.facialhairstyle})},selected:e.facialhairstyle===l,content:e.facialhairstyle},e.facialhairstyle)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AreaScrubberControl=void 0;var o=n(0),r=n(2),a=n(1),i=n(3),c=n(8);t.AreaScrubberControl=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=(0,a.useLocalState)(t,"showArea",!1),s=u[0],m=u[1],p=d.scrubbers;return p?(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Flex,{wrap:"wrap",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"search",content:"Scan",onClick:function(){return c("scan")}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"layer-group",content:"Show Areas",selected:s,onClick:function(){return m(!s)}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"toggle-on",content:"All On",onClick:function(){return c("allon")}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"toggle-off",content:"All Off",onClick:function(){return c("alloff")}})})]}),(0,o.createComponentVNode)(2,r.Flex,{wrap:"wrap",children:p.map((function(e){return(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"32%",children:(0,o.createComponentVNode)(2,l,{scrubber:e,showArea:s})},e.id)}))})]})})}):(0,o.createComponentVNode)(2,r.Section,{title:"Error",children:[(0,o.createComponentVNode)(2,r.Box,{color:"bad",children:"No Scrubbers Detected."}),(0,o.createComponentVNode)(2,r.Button,{fluid:!0,icon:"search",content:"Scan",onClick:function(){return c("scan")}})]})};var l=function(e,t){var n=(0,a.useBackend)(t).act,i=e.scrubber,l=e.showArea;return(0,o.createComponentVNode)(2,r.Section,{title:i.name,children:[(0,o.createComponentVNode)(2,r.Button,{fluid:!0,icon:"power-off",content:i.on?"Enabled":"Disabled",selected:i.on,onClick:function(){return n("toggle",{id:i.id})}}),(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Pressure",children:[i.pressure," kPa"]}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Flow Rate",children:[i.flow_rate," L/s"]}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Load",children:[i.load," W"]}),l&&(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Area",children:(0,c.toTitleCase)(i.area)})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyInfrared=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.AssemblyInfrared=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Infrared Unit",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",fluid:!0,selected:d,onClick:function(){return c("state")},children:d?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",fluid:!0,selected:u,onClick:function(){return c("visible")},children:u?"Able to be seen":"Invisible"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyProx=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.AssemblyProx=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.timing,m=u.time,p=u.range,f=u.maxRange,h=u.scanning;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Timing Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",selected:s,onClick:function(){return d("timing")},children:s?"Counting Down":"Disabled"}),children:(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:m/10,minValue:0,maxValue:600,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("set_time",{time:t})}})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Prox Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,i.NumberInput,{minValue:1,value:p,maxValue:f,onDrag:function(e,t){return d("range",{range:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Armed",children:[(0,o.createComponentVNode)(2,i.Button,{mr:1,icon:h?"lock":"lock-open",selected:h,onClick:function(){return d("scanning")},children:h?"ARMED":"Unarmed"}),"Movement sensor is active when armed!"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyTimer=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.AssemblyTimer=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.timing,m=u.time;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Timing Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",selected:s,onClick:function(){return d("timing")},children:s?"Counting Down":"Disabled"}),children:(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:m/10,minValue:0,maxValue:600,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("set_time",{time:t})}})})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.priority_alarms||[],u=l.minor_alarms||[];return(0,o.createComponentVNode)(2,i.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===d.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e.name,color:"bad",onClick:function(){return c("clear",{ref:e.ref})}}),2,null,e.name)})),0===u.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),u.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e.name,color:"average",onClick:function(){return c("clear",{ref:e.ref})}}),2,null,e.name)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),i=(n(39),n(3));t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:390,height:187,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:1,children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l.last_flow_rate,format:function(e){return e+" L/s"}})}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onDrag:function(e,t){return c("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.rate===l.max_rate,onClick:function(){return c("rate",{rate:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.selected,content:e.name,onClick:function(){return c("filter",{filterset:e.f_type})}},e.name)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:370,height:195,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.set_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure,step:10,onChange:function(e,t){return c("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.set_pressure===l.max_pressure,onClick:function(){return c("pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider,{size:1}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"label",children:(0,o.createVNode)(1,"u",null,"Concentrations",16)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 1 ("+l.node1_dir+")",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node1_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return c("node1",{concentration:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 2 ("+l.node2_dir+")",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node2_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return c("node2",{concentration:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=(n(5),n(44)),a=n(19),i=n(1),c=n(2),l=n(3),d=n(130),u=n(8),s=function(e,t){if(null===e.requirements)return!0;for(var n=Object.keys(e.requirements),o=function(){var n=a[r],o=t.find((function(e){return e.name===n}));return o?o.amount=e[1].price/d.build_eff,e[1]})).sort(l[C]);if(0!==n.length)return N&&(n=n.reverse()),V=!0,(0,o.createComponentVNode)(2,m,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,i.Section,{onClick:function(e){return(0,c.refocusLayout)()},children:V?v:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,a.useLocalState)(t,"sort",""),d=(c[0],c[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,i.Dropdown,{selected:"Alphabetical",options:Object.keys(l),width:"100%",lineHeight:"19px",onSelected:function(e){return d(e)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},s=function(e,t){return!!e.affordable&&!(e.reagent&&!t.beaker)},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.title,d=e.items,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Collapsible,Object.assign({open:!0,title:l},u,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s(e,c),content:(e.price/c.build_eff).toLocaleString("en-US"),width:"15%",textAlign:"center",style:{float:"right"},onClick:function(){return r("purchase",{cat:l,name:e.name})}}),(0,o.createComponentVNode)(2,i.Box,{style:{clear:"both"}})]},e.name)}))})))}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyDesigner=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3);t.BodyDesigner=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.menu,s=d.disk,m=d.diskStored,p=d.activeBodyRecord,f=l[u];return(0,o.createComponentVNode)(2,c.Window,{width:400,height:650,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",content:"Save To Disk",onClick:function(){return r("savetodisk")},disabled:!p}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",content:"Load From Disk",onClick:function(){return r("loadfromdisk")},disabled:!m}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return r("ejectdisk")}})]}):null,f]})})};var l={Main:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Database Functions",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View Individual Body Records",onClick:function(){return r("menu",{menu:"Body Records"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View Stock Body Records",onClick:function(){return r("menu",{menu:"Stock Records"})}})]})})),"Body Records":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.bodyrecords;return(0,o.createComponentVNode)(2,i.Section,{title:"Body Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Main"})}}),children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:e.name,onClick:function(){return r("view_brec",{view_brec:e.recref})}},e.name)}))})})),"Stock Records":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.stock_bodyrecords;return(0,o.createComponentVNode)(2,i.Section,{title:"Stock Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Main"})}}),children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:e,onClick:function(){return r("view_stock_brec",{view_stock_brec:e})}},e)}))})})),"Specific Record":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.activeBodyRecord,u=l.mapRef;return d?(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"165px",children:(0,o.createComponentVNode)(2,i.Section,{title:"Specific Record",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c("menu",{menu:"Main"})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d.real_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:d.speciesname}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bio. Sex",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:(0,r.capitalize)(d.gender),onClick:function(){return c("href_conversion",{target_href:"bio_gender",target_value:1})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Synthetic",children:d.synthetic}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Compat",children:[d.locked,(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eye",content:"View OOC Notes",disabled:!d.booc,onClick:function(){return c("boocnotes")}})]})]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"130px",children:(0,o.createComponentVNode)(2,i.ByondUi,{style:{width:"100%",height:"128px"},params:{id:u,type:"map"}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"300px",children:(0,o.createComponentVNode)(2,i.Section,{title:"Customize",height:"300px",style:{overflow:"auto"},children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scale",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:d.scale,onClick:function(){return c("href_conversion",{target_href:"size_multiplier",target_value:1})}})}),Object.keys(d.styles).map((function(e){var t=d.styles[e];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[t.styleHref?(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.style,onClick:function(){return c("href_conversion",{target_href:t.styleHref,target_value:1})}}):null,t.colorHref?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.color,onClick:function(){return c("href_conversion",{target_href:t.colorHref,target_value:1})}}),(0,o.createComponentVNode)(2,i.ColorBox,{verticalAlign:"top",width:"32px",height:"20px",color:t.color,style:{border:"1px solid #fff"}})]}):null,t.colorHref2?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.color2,onClick:function(){return c("href_conversion",{target_href:t.colorHref2,target_value:1})}}),(0,o.createComponentVNode)(2,i.ColorBox,{verticalAlign:"top",width:"32px",height:"20px",color:t.color2,style:{border:"1px solid #fff"}})]}):null]},e)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body Markings",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Add Marking",onClick:function(){return c("href_conversion",{target_href:"marking_style",target_value:1})}}),(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",justify:"center",align:"center",children:Object.keys(d.markings).map((function(e){var t=d.markings[e];return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{mr:.2,fluid:!0,icon:"times",color:"red",onClick:function(){return c("href_conversion",{target_href:"marking_remove",target_value:e})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,backgroundColor:t,content:e,onClick:function(){return c("href_conversion",{target_href:"marking_color",target_value:e})}})})]})},e)}))})]})]})})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR: Record Not Found!"})})),"OOC Notes":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.activeBodyRecord;return(0,o.createComponentVNode)(2,i.Section,{title:"Body OOC Notes (This is OOC!)",height:"100%",scrollable:!0,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Specific Record"})}}),style:{"word-break":"break-all"},children:c&&c.booc||"ERROR: Body record not found!"})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["hasBorer","bad",function(e){return"Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."}],["hasVirus","bad",function(e){return"Viral pathogen detected in blood stream."}],["blind","average",function(e){return"Cataracts detected."}],["colourblind","average",function(e){return"Photoreceptor abnormalities detected."}],["nearsighted","average",function(e){return"Retinal misalignment detected."}],["humanPrey","average",function(e){return"Foreign Humanoid(s) detected: "+e.humanPrey}],["livingPrey","average",function(e){return"Foreign Creature(s) detected: "+e.livingPrey}],["objectPrey","average",function(e){return"Foreign Object(s) detected: "+e.objectPrey}]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.reduce((function(e,t){return null===e?t:(0,o.createFragment)([e,!!t&&(0,o.createComponentVNode)(2,i.Box,{children:t})],0)})):null},f=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,i=n.occupant,l=void 0===i?{}:i,d=r?(0,o.createComponentVNode)(2,h,{occupant:l}):(0,o.createComponentVNode)(2,k);return(0,o.createComponentVNode)(2,c.Window,{width:690,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var h=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,g,{occupant:t}),(0,o.createComponentVNode)(2,v,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,y,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"}),(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Volume",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.blood.volume,0)})," units\xa0(",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.blood.percent,0)}),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Weight",children:(0,r.round)(d.occupant.weight)+"lbs, "+(0,r.round)(d.occupant.weight/2.20463)+"kgs"})]})})},b=function(e){var t=e.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Blood Reagents",children:t.reagents?(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reagent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Amount"})]}),t.reagents.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:[e.amount," Units ",e.overdose?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"OVERDOSING"}):null]})]},e.name)}))]}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"No Blood Reagents Detected"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Stomach Reagents",children:t.ingested?(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reagent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Amount"})]}),t.ingested.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:[e.amount," Units ",e.overdose?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"OVERDOSING"}):null]})]},e.name)}))]}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"No Stomach Reagents Detected"})})],4)},N=function(e){var t=e.occupant,n=t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus;return(n=n||t.humanPrey||t.livingPrey||t.objectPrey)?(0,o.createComponentVNode)(2,i.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,i.Box,{color:e[1],bold:"bad"===e[1],children:e[2](t)})}))}):(0,o.createComponentVNode)(2,i.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No abnormalities found."})})},g=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,i.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r0&&"0.5rem",value:e.totalLoss/100,ranges:s,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,i.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,i.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,i.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,i.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:"33%",children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",display:"inline",children:p([e.internalBleeding&&"Internal bleeding",!!e.status.bleeding&&"External bleeding",e.lungRuptured&&"Ruptured lung",e.destroyed&&"Destroyed",!!e.status.broken&&e.status.broken,f(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:[p([!!e.status.splinted&&"Splinted",!!e.status.robotic&&"Robotic",!!e.status.dead&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"})]),p(e.implants.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},y=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,i.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,i.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"33%",children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/100,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:"33%",children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",display:"inline",children:p([f(e.germ_level)])}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:p([1===e.robotic&&"Robotic",2===e.robotic&&"Assisted",!!e.dead&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"})])})]})]},t)}))]})})},k=function(){return(0,o.createComponentVNode)(2,i.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BombTester=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);n(24);t.BombTester=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.simulating,s=d.mode,m=d.tank1,p=d.tank1ref,f=d.tank2,h=d.tank2ref,C=d.canister,b=d.sim_canister_output;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:400,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:u&&(0,o.createComponentVNode)(2,c)||(0,o.createComponentVNode)(2,a.Section,{title:"Virtual Explosive Simulator v2.01",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:1})},selected:1===s,children:"Single Tank"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:2})},selected:2===s,children:"Transfer Valve"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:3})},selected:3===s,children:"Canister"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Slot",children:m&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("remove_tank",{ref:p})},icon:"eject",children:m})||(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("add_tank",{slot:1})},icon:"upload",children:"Insert Tank"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Slot",children:f&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("remove_tank",{ref:h})},icon:"eject",children:f})||(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("add_tank",{slot:2})},icon:"upload",children:"Insert Tank"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connected Canister",buttons:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("canister_scan")},icon:"search",children:"Scan"}),children:C&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:C})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No tank connected."})}),C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Canister Release Pressure",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,value:b,maxValue:1013.25,onDrag:function(e,t){return l("set_can_pressure",{pressure:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:2,color:"red",icon:"bomb",fontSize:2,onClick:function(){return l("start_sim")},fluid:!0,children:"Begin Simulation"})]})})})};var c=function(e){var t,n;function r(t){var n;n=e.call(this,t)||this;var o=Math.random()>.5,r=Math.random()>.5;return n.state={x:o?340:0,y:r?205:0,reverseX:!1,reverseY:!1},n.process=setInterval((function(){n.setState((function(e){var t=Object.assign({},e);return t.reverseX?t.x-2<-5?(t.reverseX=!1,t.x+=2):t.x-=2:t.x+2>340?(t.reverseX=!0,t.x-=2):t.x+=2,t.reverseY?t.y-2<-20?(t.reverseY=!1,t.y+=2):t.y-=2:t.y+2>205?(t.reverseY=!0,t.y-=2):t.y+=2,t}))}),1),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){clearInterval(this.process)},i.render=function(){var e=this.state,t={position:"relative",left:e.x+"px",top:e.y+"px"};return(0,o.createComponentVNode)(2,a.Section,{title:"Simulation in progress!",fill:!0,children:(0,o.createComponentVNode)(2,a.Box,{position:"absolute",style:{overflow:"hidden",width:"100%",height:"100%"},children:(0,o.createComponentVNode)(2,a.Icon,{style:t,name:"bomb",size:10,color:"red"})})})},r}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.BotanyEditor=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.BotanyEditor=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.activity,u=l.degradation,s=l.disk,m=l.sourceName,p=l.locus,f=l.loaded;return d?(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Scanning..."})})}):(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Buffered Genetic Data",children:s&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Source",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gene Decay",children:[u,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Locus",children:p})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No disk loaded."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Loaded Material",children:f&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:f})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"cog",onClick:function(){return c("apply_gene")},children:"Apply Gene Mods"}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"eject",onClick:function(){return c("eject_packet")},children:"Eject Target"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No target seed packet loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotanyIsolator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.BotanyIsolator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.geneMasks,u=l.activity,s=l.degradation,m=l.disk,p=l.loaded,f=l.hasGenetics,h=l.sourceName;return u?(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Scanning..."})})}):(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Buffered Genetic Data",children:f&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Source",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gene decay",children:[s,"%"]}),m&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.mask,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:"download",onClick:function(){return c("get_gene",{get_gene:e.tag})},children:"Extract"})},e.mask)}))||null]}),m&&(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",onClick:function(){return c("clear_buffer")},children:"Clear Genetic Buffer"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{mt:1,warning:!0,children:"No disk inserted."})]})||(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No Data Buffered."}),m&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"})||(0,o.createComponentVNode)(2,a.NoticeBox,{mt:1,warning:!0,children:"No disk inserted."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Loaded Material",children:p&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Packet Loaded",children:p})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"cog",onClick:function(){return c("scan_genome")},children:"Process Genome"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_packet")},children:"Eject Packet"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No packet loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.BrigTimer=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:138,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Cell Timer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"clock-o",content:u.timing?"Stop":"Start",selected:u.timing,onClick:function(){return d(u.timing?"stop":"start")}}),u.flash_found&&(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:u.flash_charging?"Recharging":"Flash",disabled:u.flash_charging,onClick:function(){return d("flash")}})||null],0),children:[(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:u.time_left/10,minValue:0,maxValue:u.max_time_left/10,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("time",{time:t})}}),(0,o.createComponentVNode)(2,i.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_short/10),onClick:function(){return d("preset",{preset:"short"})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_medium/10),onClick:function(){return d("preset",{preset:"medium"})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_long/10),onClick:function(){return d("preset",{preset:"long"})}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Canister=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(21),l=n(3);t.Canister=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.connected,m=u.can_relabel,p=u.pressure,f=u.releasePressure,h=u.defaultReleasePressure,C=u.minReleasePressure,b=u.maxReleasePressure,N=u.valveOpen,g=u.holding;return(0,o.createComponentVNode)(2,l.Window,{width:360,height:242,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Canister",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",disabled:!m,content:"Relabel",onClick:function(){return d("relabel")}}),children:(0,o.createComponentVNode)(2,i.LabeledControls,{children:[(0,o.createComponentVNode)(2,i.LabeledControls.Item,{minWidth:"66px",label:"Tank Pressure",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:p,format:function(e){return e<1e4?(0,r.toFixed)(e)+" kPa":(0,c.formatSiUnit)(1e3*e,1,"Pa")}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Regulator",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",left:"-8px",children:[(0,o.createComponentVNode)(2,i.Knob,{forcedInputWidth:"60px",size:1.25,color:!!N&&"yellow",value:f,unit:"kPa",minValue:C,maxValue:b,stepPixelSize:1,onDrag:function(e,t){return d("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-20px",color:"transparent",icon:"fast-forward",onClick:function(){return d("pressure",{pressure:b})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-20px",color:"transparent",icon:"undo",onClick:function(){return d("pressure",{pressure:h})}})]})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Valve",children:(0,o.createComponentVNode)(2,i.Button,{my:.5,width:"50px",lineHeight:2,fontSize:"11px",color:N?g?"caution":"danger":null,content:N?"Open":"Closed",onClick:function(){return d("valve")}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{mr:1,label:"Port",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{size:1.25,name:s?"plug":"times",color:s?"good":"bad"}),(0,o.createComponentVNode)(2,i.Tooltip,{content:s?"Connected":"Disconnected",position:"top"})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Holding Tank",buttons:!!g&&(0,o.createComponentVNode)(2,i.Button,{icon:"eject",color:N&&"danger",content:"Eject",onClick:function(){return d("eject")}}),children:[!!g&&(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:g.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:g.pressure})," kPa"]})]}),!g&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No Holding Tank"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(183),c=n(3),l=[5,10,20,30,40,60],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:390,height:655,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.amount;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",selected:c===e,content:e+"u",m:"0",fluid:!0,onClick:function(){return i("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Custom Amount",children:(0,o.createComponentVNode)(2,a.Slider,{step:1,stepPixelSize:5,value:c,minValue:1,maxValue:120,onDrag:function(e,t){return i("amount",{amount:t})}})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:c.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"40%",height:"20px",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",width:"100%",height:"100%",align:"flex-start",content:e.title+" ("+e.amount+")",onClick:function(){return i("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,f=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flex:"content",minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return c("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:u,beakerContents:f,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return c("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return c("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return c("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";e.exports=n(484)()},function(e,t,n){"use strict";var o=n(485);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(183),l=n(45),d=[1,5,10,30,60];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,c=n.beaker,d=n.beaker_reagents,p=void 0===d?[]:d,f=n.buffer_reagents,h=void 0===f?[]:f,C=n.mode;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:500,resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u,{beaker:c,beakerReagents:p,bufferNonEmpty:h.length>0}),(0,o.createComponentVNode)(2,s,{mode:C,bufferReagents:h}),(0,o.createComponentVNode)(2,m,{isCondiment:a,bufferNonEmpty:h.length>0})]})]})};var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=(n.data,e.beaker),s=e.beakerReagents,m=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:m?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!u,content:"Eject and Clear Buffer",onClick:function(){return i("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,content:"Eject and Clear Buffer",onClick:function(){return i("eject")}}),children:u?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,n){return(0,o.createComponentVNode)(2,a.Box,{mb:n0?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!c.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return i("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.Cleanbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Cleanbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.version,p=l.blood,f=(l.patrol,l.wet_floors),h=l.spray_blood,C=l.rgbpanel,b=l.red_switch,N=l.green_switch,g=l.blue_switch;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:400,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Station Cleaner "+m,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("start")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",selected:p,onClick:function(){return c("blood")},children:p?"Cleans Blood":"Ignores Blood"})})||null,!s&&u&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Panel",children:C&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:b?"toggle-on":"toggle-off",backgroundColor:b?"red":"maroon",onClick:function(){return c("red_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:N?"toggle-on":"toggle-off",backgroundColor:N?"green":"darkgreen",onClick:function(){return c("green_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:g?"toggle-on":"toggle-off",backgroundColor:g?"blue":"darkblue",onClick:function(){return c("blue_switch")}})]})||(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Odd Looking Screw Twiddled",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,selected:f,onClick:function(){return c("wet_floors")},icon:"screwdriver",children:f?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Weird Button Pressed",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"brown",selected:h,onClick:function(){return c("spray_blood")},icon:"screwdriver",children:h?"Yes":"No"})})]})})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(39),l=n(45),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,f=d.strucenzymes,h=m.split(" - ");return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Damage",children:h.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:h[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:h[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.brute,display:"inline",children:h[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.burn,display:"inline",children:h[1]})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:f}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disk",children:[(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!l.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return r("disk",{option:"load"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return r("disk",{option:"save",savetype:"ui"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return r("disk",{option:"save",savetype:"ue"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return r("disk",{option:"save",savetype:"se"})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,f)),n},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,f=l.scan_mode,h=l.numberofpods,C=l.pods,b=l.selected_pod,N=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s,selected:N,icon:N?"toggle-on":"toggle-off",content:N?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:N||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,i.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:f?"brain":"male",content:f?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Pods",level:"2",children:h?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:b===e.pod,icon:b===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.records;return c.length?(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},h=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.scanner,d=c.numberofpods,u=c.autoallowed,s=c.autoprocess,m=c.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createFragment)([!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),(0,o.createComponentVNode)(2,i.Button,{disabled:!m,icon:"eject",content:"Eject Disk",onClick:function(){return r("disk",{option:"eject"})}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColorMate=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ColorMate=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.items,u=l.activecolor,s=Math.min(270+15*d.length,600);return(0,o.createComponentVNode)(2,i.Window,{width:300,height:s,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:d.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Paint",children:(0,o.createComponentVNode)(2,a.Flex,{justify:"center",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:u,width:"120px",height:"120px"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50% ",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eye-dropper",onClick:function(){return c("select")},children:"Select Color"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"fill-drip",onClick:function(){return c("paint")},children:"Paint Items"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"tint-slash",onClick:function(){return c("clear")},children:"Remove Paintjob"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",onClick:function(){return c("eject")},children:"Eject Items"})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Items",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:["#",t+1,": ",e]},t)}))})],4)||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No items inserted."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CookingAppliance=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.CookingAppliance=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.temperature,u=l.optimalTemp,s=l.temperatureEnough,m=l.efficiency,p=l.containersRemovable,f=l.our_contents;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:s?"good":"blue",value:d,maxValue:u+100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d}),"\xb0C / ",u,"\xb0C"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Efficiency",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m}),"%"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Containers",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:f.map((function(e,t){return e.empty?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot #"+(t+1),children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("slot",{slot:t+1})},children:"Empty"})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot #"+(t+1),verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,onClick:function(){return c("slot",{slot:t+1})},children:e.container||"No Container"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.progressText[0],value:e.progress,maxValue:1,children:e.progressText[1]})})]})},t)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:520,height:470,resizeable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,f=void 0===p?[]:p,h=d.cellTemperature,C=d.cellTemperatureStatus,b=d.isBeakerLoaded;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return i("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:f.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:f.health,max:f.maxHealth,value:f.health/f.maxHealth,color:f.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(f.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[f.stat][0],children:l[f.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(f.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:f[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(f[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return i("ejectBeaker")},disabled:!b,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:h})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=i.isBeakerLoaded,l=i.beakerLabel,d=i.beakerVolume;return c?(0,o.createFragment)([l||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No label"}),(0,o.createComponentVNode)(2,a.Box,{color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryoStorageItemsVr=t.CryoStorageVr=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(185);t.CryoStorageVr=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.real_name,s=d.allow_items,m=(0,r.useLocalState)(t,"tab",0),p=m[0],f=m[1];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return f(0)},children:"Crew"}),!!s&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return f(1)},children:"Items"})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Welcome, ",u,"."]}),0===p&&(0,o.createComponentVNode)(2,c.CryoStorageCrew),!!s&&1===p&&(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.items);return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:i.length&&i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e},e)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No items stored."})})};t.CryoStorageItemsVr=l},function(e,t,n){"use strict";t.__esModule=!0,t.DNAForensics=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.DNAForensics=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.scan_progress,u=l.scanning,s=l.bloodsamp,m=l.bloodsamp_desc;return(0,o.createComponentVNode)(2,i.Window,{width:540,height:326,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{selected:u,disabled:!s,icon:"power-off",onClick:function(){return c("scanItem")},children:u?"Halt Scan":"Begin Scan"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",onClick:function(){return c("ejectItem")},children:"Eject Bloodsample"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[99,Infinity],violet:[-Infinity,99]},value:d,maxValue:100})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Blood Sample",children:s&&(0,o.createComponentVNode)(2,a.Box,{children:[s,(0,o.createComponentVNode)(2,a.Box,{color:"label",children:m})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No blood sample inserted."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(45),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,V,{duration:d})),(0,o.createComponentVNode)(2,i.Window,{width:660,height:700,resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal),n,(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,d=c.locked,u=c.hasOccupant,s=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return i("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return i("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,i=(0,r.useBackend)(t),c=i.act,l=i.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,h)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,g)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.selectedUIBlock,d=c.selectedUISubBlock,u=c.selectedUITarget,s=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return i("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return i("pulseUIRadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.selectedSEBlock,d=c.selectedSESubBlock,u=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return i("pulseSERadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.radiationIntensity,d=c.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return i("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return i("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return i("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,b,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:i}),(0,o.createComponentVNode)(2,N)],4)},b=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.id,d=e.name,u=e.buffer,s=c.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return i("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return i("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return i("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return i("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return i("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return i("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return i("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return i("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return i("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return i("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},N=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.hasDisk,d=c.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return i("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return i("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},g=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isBeakerLoaded,d=c.beakerVolume,s=c.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return i("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return i("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return i("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},V=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=c.split(""),p=[],f=function(e){for(var t=e/u+1,n=[],r=function(r){var c=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===c,content:m[e+r],mb:"0",onClick:function(){return i(s,{block:t,subblock:c})}}))},c=0;c1?"Dangerous!":null]},e.stage)}))||(0,o.createComponentVNode)(2,a.Box,{children:"No virus sample loaded."})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Affected Species",color:"label",children:[m&&m.length?null:"None",m.sort().join(", ")]}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Reverse Engineering",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",mb:1,children:(0,o.createVNode)(1,"i",null,"CAUTION: Reverse engineering will destroy the viral sample.",16)}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.stage,icon:"exchange-alt",onClick:function(){return i("grab",{grab:e.reference})}},e.stage)})),(0,o.createComponentVNode)(2,a.Button,{content:"Species",icon:"exchange-alt",onClick:function(){return i("affected_species")}})]})],4)]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.dish_inserted,c.buffer),d=c.species_buffer,u=(c.effects,c.info);c.growth,c.affected_species,c.busy;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Memory Buffer",children:l?(0,o.createComponentVNode)(2,a.Box,{children:[l.name," (",l.stage,")"]}):d?(0,o.createComponentVNode)(2,a.Box,{children:d}):"Empty"})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"save",content:"Save To Disk",disabled:!l&&!d,onClick:function(){return i("disk")}}),l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #1",disabled:l.stage>1,onClick:function(){return i("splice",{splice:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #2",disabled:l.stage>2,onClick:function(){return i("splice",{splice:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #3",disabled:l.stage>3,onClick:function(){return i("splice",{splice:3})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #4",disabled:l.stage>4,onClick:function(){return i("splice",{splice:4})}})]}):d?(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice Species",disabled:!d||u,onClick:function(){return i("splice",{splice:5})}})}):null]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DishIncubator=void 0;var o=n(0),r=(n(5),n(21)),a=n(1),i=n(2),c=n(3);t.DishIncubator=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.system_in_use,m=d.food_supply,p=d.radiation,f=d.growth,h=d.toxins,C=d.chemicals_inserted,b=d.can_breed_virus,N=d.chemical_volume,g=d.max_chemical_volume,V=d.dish_inserted,v=d.blood_already_infected,y=d.virus,k=d.analysed,_=d.infection_rate;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Environmental Conditions",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:u,content:u?"On":"Off",onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,i.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"radiation",content:"Add Radiation",onClick:function(){return l("rad")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{fluid:!0,color:"red",icon:"trash",confirmIcon:"trash",content:"Flush System",disabled:!s,onClick:function(){return l("flush")}})})]}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Virus Food",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{good:[40,Infinity],average:[20,40],bad:[-Infinity,20]},value:m})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,color:p>=50?"bad":f>=25?"average":"good",value:p,children:[(0,r.formatCommaNumber)(1e4*p)," \xb5Sv"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxicity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{bad:[50,Infinity],average:[25,50],good:[-Infinity,25]},value:h})})]})]}),(0,o.createComponentVNode)(2,i.Section,{title:b?"Vial":"Chemicals",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject "+(b?"Vial":"Chemicals"),disabled:!C,onClick:function(){return l("ejectchem")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"virus",content:"Breed Virus",disabled:!b,onClick:function(){return l("virus")}})],4),children:C&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:g,value:N,children:[N,"/",g]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Breeding Environment",color:b?"good":"average",children:[V?b?"Suitable":"No hemolytic samples detected":"N/A",v?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"CAUTION: Viral infection detected in blood sample."}):null]})]})})||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No chemicals inserted."})}),(0,o.createComponentVNode)(2,i.Section,{title:"Virus Dish",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Dish",disabled:!V,onClick:function(){return l("ejectdish")}}),children:V?y?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Growth Density",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{good:[50,Infinity],average:[25,50],bad:[-Infinity,25]},value:f})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Infection Rate",children:k?_:"Unknown."})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No virus detected."}):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No dish loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalBin=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.DisposalBin=function(e,t){var n,c,l=(0,r.useBackend)(t),d=l.act,u=l.data;return 2===u.mode?(n="good",c="Ready"):u.mode<=0?(n="bad",c="N/A"):1===u.mode?(n="average",c="Pressurizing"):(n="average",c="Idle"),(0,o.createComponentVNode)(2,i.Window,{width:300,height:250,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,m:1,children:"Status"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:n,children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[-Infinity,0],average:[0,99],good:[99,Infinity]},value:u.pressure,minValue:0,maxValue:100})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,m:1,children:"Controls"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Handle",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-off",disabled:u.isAI||u.panel_open,content:"Disengaged",selected:u.flushing?null:"selected",onClick:function(){return d("disengageHandle")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-on",disabled:u.isAI||u.panel_open,content:"Engaged",selected:u.flushing?"selected":null,onClick:function(){return d("engageHandle")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-off",disabled:-1===u.mode,content:"Off",selected:u.mode?null:"selected",onClick:function(){return d("pumpOff")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-on",disabled:-1===u.mode,content:"On",selected:u.mode?"selected":null,onClick:function(){return d("pumpOn")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Eject",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",disabled:u.isAI,content:"Eject Contents",onClick:function(){return d("eject")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DroneConsole=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.DroneConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.drones,u=l.areas,s=l.selected_area,m=l.fabricator,p=l.fabPower;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Drone Fabricator",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!m,selected:p,icon:"power-off",content:p?"Enabled":"Disabled",onClick:function(){return c("toggle_fab")}}),children:m?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Linked."}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Fabricator not detected.",(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Search for Fabricator",onClick:function(){return c("search_fab")}})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Request Drone",children:[(0,o.createComponentVNode)(2,a.Dropdown,{options:u?u.sort():null,selected:s,width:"100%",onSelected:function(e){return c("set_dcall_area",{area:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"share-square",content:"Send Ping",onClick:function(){return c("ping")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Units",children:d&&d.length?(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Resync",onClick:function(){return c("resync",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",color:"red",content:"Shutdown",onClick:function(){return c("shutdown",{ref:e.ref})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:e.loc}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:[e.charge," / ",e.maxCharge]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active",children:e.active?"Yes":"No"})]})},e.name)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No drones detected."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmbeddedController=void 0;var o=n(0),r=(n(8),n(5),n(1)),a=n(2),i=n(3),c=((0,n(24).createLogger)("fuck"),{});t.EmbeddedController=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.internalTemplateName),l=c[a];if(!l)throw Error("Unable to find Component for template name: "+a);return(0,o.createComponentVNode)(2,i.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=e.bars;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.color(e.value),minValue:e.minValue,maxValue:e.maxValue,value:e.value,children:e.textValue})},e.label)}))})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act,l=!0;i.interior_status&&"open"===i.interior_status.state?l=!1:i.external_pressure&&i.chamber_pressure&&(l=!(Math.abs(i.external_pressure-i.chamber_pressure)>5));var d=!0;return i.exterior_status&&"open"===i.exterior_status.state?d=!1:i.internal_pressure&&i.chamber_pressure&&(d=!(Math.abs(i.internal_pressure-i.chamber_pressure)>5)),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i.airlock_disabled,icon:"arrow-left",content:"Cycle to Exterior",onClick:function(){return c("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:i.airlock_disabled,icon:"arrow-right",content:"Cycle to Interior",onClick:function(){return c("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:i.airlock_disabled,color:l?"":"bad",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Force Exterior Door",onClick:function(){return c("force_ext")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:i.airlock_disabled,color:d?"":"bad",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Force Interior Door",onClick:function(){return c("force_int")}})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=(n.act,{docked:(0,o.createComponentVNode)(2,s),undocking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"EJECTING-STAND CLEAR!"}),undocked:(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"POD EJECTED"}),docking:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"INITIALIZING..."})}),l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"ERROR"});return"open"===i.exterior_status.state?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"OPEN"}):"unlocked"===i.exterior_status.lock?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNSECURED"}):"locked"===i.exterior_status.lock&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SECURED"})),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Escape Pod Status",children:c[i.docking_status]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Docking Hatch",children:l})]})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.data;n.act;return i.armed?(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"ARMED"}):(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SYSTEMS OK"})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!i.override_enabled,icon:"exclamation-triangle",content:"Force Exterior Door",color:"docked"!==i.docking_status?"bad":"",onClick:function(){return c("force_door")}}),(0,o.createComponentVNode)(2,a.Button,{selected:i.override_enabled,color:"docked"!==i.docking_status?"bad":"average",icon:"exclamation-triangle",content:"Override",onClick:function(){return c("toggle_override")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=(n.act,{docked:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"DOCKED"}),docking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"DOCKING"}),undocking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNDOCKING"}),undocked:(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"NOT IN USE"})}[i.docking_status]);return i.override_enabled&&(c=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[i.docking_status.toUpperCase(),"-OVERRIDE ENABLED"]})),c};c.AirlockConsoleAdvanced=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"},s=[{minValue:0,maxValue:202,value:c.external_pressure,label:"External Pressure",textValue:c.external_pressure+" kPa",color:u},{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:u},{minValue:0,maxValue:202,value:c.internal_pressure,label:"Internal Pressure",textValue:c.internal_pressure+" kPa",color:u}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:s}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Purge",onClick:function(){return i("purge")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock-open",content:"Secure",onClick:function(){return i("secure")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsoleSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsolePhoron=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}},{minValue:0,maxValue:100,value:c.chamber_phoron,label:"Chamber Phoron",textValue:c.chamber_phoron+" mol",color:function(e){return e>5?"bad":e>.5?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsoleDocking=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Dock",buttons:c.airlock_disabled||c.override_enabled?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:c.override_enabled?"red":"",content:"Override",onClick:function(){return i("toggle_override")}}):null,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.DockingConsoleSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"ERROR"});return"open"===c.exterior_status.state?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"OPEN"}):"unlocked"===c.exterior_status.lock?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNSECURED"}):"locked"===c.exterior_status.lock&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SECURED"})),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!c.override_enabled,content:"Force exterior door",onClick:function(){return i("force_door")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:c.override_enabled?"red":"",content:"Override",onClick:function(){return i("toggle_override")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dock Status",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Docking Hatch",children:l})]})})};c.DockingConsoleMulti=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Docking Status",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Section,{title:"Airlocks",children:n.airlocks.length?(0,o.createComponentVNode)(2,a.LabeledList,{children:n.airlocks.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:e.override_enabled?"bad":"good",label:e.name,children:e.override_enabled?"OVERRIDE ENABLED":"STATUS OK"},e.name)}))}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",mt:"0.5em",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"door-closed",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No airlocks found."]})})})],4)};c.DoorAccessConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l="open"===c.interior_status.state||"closed"===c.exterior_status.state,d="open"===c.exterior_status.state||"closed"===c.interior_status.state;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:l?"arrow-left":"exclamation-triangle",content:l?"Cycle To Exterior":"Lock Exterior Door",onClick:function(){i(l?"cycle_ext_door":"force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"arrow-right":"exclamation-triangle",content:d?"Cycle To Interior":"Lock Interior Door",onClick:function(){i(d?"cycle_int_door":"force_int")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Exterior Door Status",children:"closed"===c.exterior_status.state?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interior Door Status",children:"closed"===c.interior_status.state?"Locked":"Open"})]})})};c.EscapePodConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:c.armed,color:c.armed?"bad":"average",content:"ARM",onClick:function(){return i("manual_arm")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!c.can_force,color:"bad",content:"MANUAL EJECT",onClick:function(){return i("force_launch")}})]})]})],4)};c.EscapePodBerthConsole=function(e,t){(0,r.useBackend)(t).data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,m)})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ExonetNode=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ExonetNode=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.allowPDAs,s=l.allowCommunicators,m=l.allowNewscasters,p=l.logs;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,content:"Power "+(d?"On":"Off"),onClick:function(){return c("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming PDA Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:u,content:u?"Open":"Closed",onClick:function(){return c("toggle_PDA_port")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Communicators",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:s,content:s?"Open":"Closed",onClick:function(){return c("toggle_communicator_port")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Newscaster Content",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:m,content:m?"Open":"Closed",onClick:function(){return c("toggle_newscaster_port")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Logging",children:(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:[p.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{m:"2px",basis:"49%",grow:t%2,children:e},t)})),p&&0!==p.length?null:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No logs found."})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Farmbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Farmbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.locked,s=l.tank,m=l.tankVolume,p=l.tankMaxVolume,f=l.waters_trays,h=l.refills_water,C=l.uproots_weeds,b=l.replaces_nutriment;l.collects_produce,l.removes_dead;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:540,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Hyrdoponic Assisting Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Water Tank",children:s&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,maxValue:p,children:[m," / ",p]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No water tank detected."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:u?"good":"bad",children:u?"Locked":"Unlocked"})]})}),!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:[(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Watering Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Water plants",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("water")},children:f?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Refill watertank",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("refill")},children:h?"Yes":"No"})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Weeding controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Weed plants",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("weed")},children:C?"Yes":"No"})})})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Nutriment controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Replace fertilizer",children:(0,o.createComponentVNode)(2,a.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return c("replacenutri")},children:b?"Yes":"No"})})})})]})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FileCabinet=void 0;var o=n(0),r=n(19),a=n(1),i=n(2),c=n(3);t.FileCabinet=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.contents,u=(0,r.sortBy)((function(e){return e.name}))(d||[]);return(0,o.createComponentVNode)(2,c.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"file",content:e.name,onClick:function(){return l("retrieve",{ref:e.ref})}},e.ref)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Floorbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Floorbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.amount,p=l.possible_bmode,f=l.improvefloors,h=l.eattiles,C=l.maketiles,b=l.bmode;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:310,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Station Floor Repairer v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("start")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Improves Floors",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("improve")},children:f?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Finds Tiles",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("tiles")},children:h?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Makes Metal Sheets into Tiles",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("make")},children:C?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bridge Mode",children:(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,width:"100%",placeholder:"Disabled",selected:b,options:p,onSelected:function(e){return c("bridgemode",{dir:e})}})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasPump=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.GasPump=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.pressure_set,s=l.last_flow_rate,m=l.last_power_draw,p=l.max_power_draw;return(0,o.createComponentVNode)(2,i.Window,{width:470,height:290,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s/10})," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:p,color:m=100?s="Running":!d&&u>0&&(s="DISCHARGING"),(0,o.createComponentVNode)(2,i.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",color:"red",content:"Toggle Breaker",confirmContent:d?"This will disable gravity!":"This will enable gravity!",onClick:function(){return c("gentoggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Breaker Setting",children:d?"Generator Enabled":"Generator Disabled"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:["Generator ",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Status",children:[u,"%"]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.supportedPrograms,u=l.restrictedPrograms,s=l.currentProgram,m=l.isSilicon,p=l.safetyDisabled,f=l.emagged,h=l.gravity,C=d;return p&&(C=C.concat(u)),(0,o.createComponentVNode)(2,i.Window,{width:400,height:610,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{color:-1!==u.indexOf(e)?"bad":null,icon:"eye",content:e,selected:s===e,fluid:!0,onClick:function(){return c("program",{program:e})}},e)}))}),!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Override",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,disabled:f,color:p?"good":"bad",onClick:function(){return c("AIoverride")},children:[!!f&&"Error, unable to control. ",p?"Enable Safeties":"Disable Safeties"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:p?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"}):(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"ENABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity",children:(0,o.createComponentVNode)(2,a.Button,{icon:"user-astronaut",selected:h,onClick:function(){return c("gravity")},children:h?"Enabled":"Disabled"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICAssembly=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=(n(8),n(21));t.ICAssembly=function(e,t){var n=(0,a.useBackend)(t),u=(n.act,n.data),s=u.total_parts,m=u.max_components,p=u.total_complexity,f=u.max_complexity,h=u.battery_charge,C=u.battery_max,b=u.net_power,N=u.unremovable_circuits,g=u.removable_circuits;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:380,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Space in Assembly",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[0,.25],average:[.5,.75],bad:[.75,1]},value:s/m,maxValue:1,children:[s," / ",m," (",(0,r.round)(s/m*100,1),"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Complexity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[0,.25],average:[.5,.75],bad:[.75,1]},value:p/f,maxValue:1,children:[p," / ",f," (",(0,r.round)(p/f*100,1),"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:h&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[0,.25],average:[.5,.75],good:[.75,1]},value:h/C,maxValue:1,children:[h," / ",C," (",(0,r.round)(h/C*100,1),"%)"]})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No cell detected."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Net Energy",children:0===b?"0 W/s":(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:b,format:function(e){return"-"+(0,l.formatPower)(Math.abs(e))+"/s"}})})]})}),N.length&&(0,o.createComponentVNode)(2,d,{title:"Built-in Components",circuits:N})||null,g.length&&(0,o.createComponentVNode)(2,d,{title:"Removable Components",circuits:g})||null]})})};var d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.title,c=e.circuits;return(0,o.createComponentVNode)(2,i.Section,{title:r,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("open_circuit",{ref:e.ref})},children:"View"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("rename_circuit",{ref:e.ref})},children:"Rename"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("scan_circuit",{ref:e.ref})},children:"Debugger Scan"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("remove_circuit",{ref:e.ref})},children:"Remove"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("bottom_circuit",{ref:e.ref})},children:"Move to Bottom"})]},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICCircuit=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8),l=n(21);t.ICCircuit=function(e,t){var n=(0,r.useBackend)(t),c=n.act,s=n.data,m=(s.name,s.desc),p=s.displayed_name,f=(s.removable,s.complexity),h=s.power_draw_idle,C=s.power_draw_per_use,b=s.extended_desc,N=s.inputs,g=s.outputs,V=s.activators;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,title:p,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stats",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("rename")},children:"Rename"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("scan")},children:"Scan with Device"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("remove")},children:"Remove"})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:f}),h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw (Idle)",children:(0,l.formatPower)(h)})||null,C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw (Active)",children:(0,l.formatPower)(C)})||null]}),b]}),(0,o.createComponentVNode)(2,a.Section,{title:"Circuit",children:[(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",spacing:1,children:[N.length&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Inputs",children:(0,o.createComponentVNode)(2,d,{list:N})})})||null,(0,o.createComponentVNode)(2,a.Flex.Item,{basis:N.length&&g.length?"33%":N.length||g.length?"45%":"100%",children:(0,o.createComponentVNode)(2,a.Section,{title:p,mb:1,children:(0,o.createComponentVNode)(2,a.Box,{children:m})})}),g.length&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Outputs",children:(0,o.createComponentVNode)(2,d,{list:g})})})||null]}),(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin_name",{pin:e.ref})},children:e.pulse_out?"":""}),(0,o.createComponentVNode)(2,u,{pin:e})]},e.name)}))})]})]})})};var d=function(e,t){var n=(0,r.useBackend)(t).act;return e.list.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_name",{pin:e.ref})},children:[(0,c.decodeHtmlEntities)(e.type),": ",e.name]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_data",{pin:e.ref})},children:e.data}),(0,o.createComponentVNode)(2,u,{pin:e})]},e.ref)}))},u=function(e,t){var n=(0,r.useBackend)(t).act,i=e.pin;return i.linked.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_unwire",{pin:i.ref,link:e.ref})},children:e.name}),"@\xa0",(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("examine",{ref:e.holder_ref})},children:e.holder_name})]},e.ref)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.ICDetailer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(8);t.ICDetailer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.detail_color,s=d.color_list;return(0,o.createComponentVNode)(2,i.Window,{width:420,height:254,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:Object.keys(s).map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{ml:0,mr:0,mb:-.4,mt:0,tooltip:(0,c.toTitleCase)(e),tooltipPosition:t%6==5?"left":"right",height:"64px",width:"64px",onClick:function(){return l("change_color",{color:e})},style:s[e]===u?{border:"4px solid black","border-radius":0}:{"border-radius":0},backgroundColor:s[e]},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICPrinter=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(19);n(24);t.ICPrinter=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=c.metal,u=c.max_metal,s=c.metal_per_sheet,m=(c.debug,c.upgraded),p=c.can_clone;c.assembly_to_clone,c.categories;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:630,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Metal",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l,maxValue:u,children:[l/s," / ",u/s," sheets"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Circuits Available",children:m?"Advanced":"Regular"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Assembly Cloning",children:p?"Available":"Unavailable"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Note: A red component name means that the printer must be upgraded to create that component."})]}),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){return!!e.can_build&&!(e.cost>t.metal)},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.categories,s=(d.debug,(0,r.useSharedState)(t,"categoryTarget",null)),m=s[0],p=s[1],f=(0,c.filter)((function(e){return e.name===m}))(u)[0];return(0,o.createComponentVNode)(2,a.Section,{title:"Circuits",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:(0,c.sortBy)((function(e){return e.name}))(u).map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:m===e.name,onClick:function(){return p(e.name)},children:e.name},e.name)}))}),f&&(0,o.createComponentVNode)(2,a.Section,{title:f.name,level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,c.sortBy)((function(e){return e.name}))(f.items).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,labelColor:e.can_build?"good":"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l(e,d),icon:"print",onClick:function(){return i("build",{build:e.path})},children:"Print"}),children:e.desc},e.name)}))})})||"No category selected."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.IDCard=void 0;var o=n(0),r=n(2),a=n(1),i=n(3),c=n(186);t.IDCard=function(e,t){var n=(0,a.useBackend)(t).data,l=n.registered_name,d=n.sex,u=n.age,s=n.assignment,m=n.fingerprint_hash,p=n.blood_type,f=n.dna_hash,h=n.photo_front,C=[{name:"Sex",val:d},{name:"Age",val:u},{name:"Blood Type",val:p},{name:"Fingerprint",val:m},{name:"DNA Hash",val:f}];return(0,o.createComponentVNode)(2,i.Window,{width:470,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Flex,{children:[(0,o.createComponentVNode)(2,r.Flex.Item,{basis:"25%",textAlign:"left",children:(0,o.createComponentVNode)(2,r.Box,{inline:!0,style:{width:"101px",height:"120px",overflow:"hidden",outline:"2px solid #4972a1"},children:h&&(0,o.createVNode)(1,"img",null,null,1,{src:h.substr(1,h.length-1),style:{width:"300px","margin-left":"-94px","-ms-interpolation-mode":"nearest-neighbor"}})||(0,o.createComponentVNode)(2,r.Icon,{name:"user",size:8,ml:1.5,mt:2.5})})}),(0,o.createComponentVNode)(2,r.Flex.Item,{basis:0,grow:1,children:(0,o.createComponentVNode)(2,r.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:e.name,children:e.val},e.name)}))})})]}),(0,o.createComponentVNode)(2,r.Flex,{className:"IDCard__NamePlate",align:"center",justify:"space-around",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:l})}),(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.RankIcon,{rank:s})})}),(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:s})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InventoryPanel=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.InventoryPanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.slots,u=l.internalsValid;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:200,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act)},children:e.item||"Nothing"})},e.name)}))})}),u&&(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:u&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"lungs",onClick:function(){return c("internals")},children:"Set Internals"})||null})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InventoryPanelHuman=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.InventoryPanelHuman=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.slots,u=l.specialSlots,s=(l.internals,l.internalsValid),m=l.sensors,p=l.handcuffed,f=l.handcuffedParams,h=l.legcuffed,C=l.legcuffedParams,b=l.accessory;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act,e.params)},children:e.item||"Nothing"})},e.name)})),(0,o.createComponentVNode)(2,a.LabeledList.Divider),u&&u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act,e.params)},children:e.item||"Nothing"})},e.name)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"running",onClick:function(){return c("targetSlot",{slot:"splints"})},children:"Remove Splints"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"hand-paper",onClick:function(){return c("targetSlot",{slot:"pockets"})},children:"Empty Pockets"}),s&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"lungs",onClick:function(){return c("targetSlot",{slot:"internals"})},children:"Set Internals"})||null,m&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"book-medical",onClick:function(){return c("targetSlot",{slot:"sensors"})},children:"Set Sensors"})||null,p&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",f)},children:"Handcuffed"})||null,h&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",C)},children:"Legcuffed"})||null,b&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",{slot:"tie"})},children:"Remove Accessory"})||null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.IsolationCentrifuge=void 0;var o=n(0),r=(n(5),n(21),n(1)),a=n(2),i=n(3);t.IsolationCentrifuge=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.busy,u=l.antibodies,s=l.pathogens,m=l.is_antibody_sample,p=l.sample_inserted,f=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No vial detected."});return p&&(f=u||s?(0,o.createFragment)([u?(0,o.createComponentVNode)(2,a.Section,{title:"Antibodies",children:u}):null,s.length?(0,o.createComponentVNode)(2,a.Section,{title:"Pathogens",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.spread_type},e.name)}))})}):null],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No antibodies or viral strains detected."})),(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:d?(0,o.createComponentVNode)(2,a.Section,{title:"The Centrifuge is currently busy.",color:"bad",children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:d}),2)}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:m?"Antibody Sample":"Blood Sample",children:[(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"print",content:"Print",disabled:!u&&!s.length,onClick:function(){return c("print")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Vial",disabled:!p,onClick:function(){return c("sample")}})})]}),f]}),u&&!m||s.length?(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&!m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Isolate Antibodies",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:u,onClick:function(){return c("antibody")}})}):null,s.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Isolate Strain",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:e.name,onClick:function(){return c("isolate",{isolate:e.reference})}},e.name)}))}):null]})}):null],0)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(5),a=n(19),i=n(1),c=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.playing,m=u.loop_mode,p=u.volume,f=u.current_track_ref,h=u.current_track,C=u.percent,b=u.tracks;return(0,o.createComponentVNode)(2,l.Window,{width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Currently Playing",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:s&&h&&(0,o.createComponentVNode)(2,c.Box,{children:[h.title," by ",h.artist||"Unkown"]})||(0,o.createComponentVNode)(2,c.Box,{children:"Stopped"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"play",disabled:s,onClick:function(){return d("play")},children:"Play"}),(0,o.createComponentVNode)(2,c.Button,{icon:"stop",disabled:!s,onClick:function(){return d("stop")},children:"Stop"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loop Mode",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"play",onClick:function(){return d("loopmode",{loopmode:1})},selected:1===m,children:"Next"}),(0,o.createComponentVNode)(2,c.Button,{icon:"random",onClick:function(){return d("loopmode",{loopmode:2})},selected:2===m,children:"Shuffle"}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",onClick:function(){return d("loopmode",{loopmode:3})},selected:3===m,children:"Repeat"}),(0,o.createComponentVNode)(2,c.Button,{icon:"step-forward",onClick:function(){return d("loopmode",{loopmode:4})},selected:4===m,children:"Once"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:C,maxValue:1,color:"good"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:0,step:.01,value:p,maxValue:1,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[0,.25]},format:function(e){return(0,r.round)(100*e,1)+"%"},onChange:function(e,t){return d("volume",{val:(0,r.round)(t,2)})}})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Available Tracks",children:b.length&&(0,a.sortBy)((function(e){return e.title}))(b).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"play",selected:f===e.ref,onClick:function(){return d("change_track",{change_track:e.ref})},children:e.title},e.ref)}))||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Error: No songs loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.isSlaved);return(0,o.createComponentVNode)(2,i.Window,{width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[l&&(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Law-synced to ",l]})||null,(0,o.createComponentVNode)(2,c)]})})};var c=function(e,t){var n=(0,r.useSharedState)(t,"lawsTabIndex",0),i=n[0],c=n[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return c(0)},children:"Law Management"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return c(1)},children:"Law Sets"})]}),0===i&&(0,o.createComponentVNode)(2,l)||null,1===i&&(0,o.createComponentVNode)(2,u)||null],0)},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.ion_law_nr,u=c.ion_law,s=c.zeroth_law,m=c.inherent_law,p=c.supplied_law,f=c.supplied_law_position,h=c.zeroth_laws,C=c.has_zeroth_laws,b=c.ion_laws,N=c.has_ion_laws,g=c.inherent_laws,V=c.has_inherent_laws,v=c.supplied_laws,y=c.has_supplied_laws,k=c.isAI,_=c.isMalf,x=c.isAdmin,L=c.channel,B=c.channels,w=h.map((function(e){return e.zero=!0,e})).concat(g);return(0,o.createComponentVNode)(2,a.Section,{children:[N&&(0,o.createComponentVNode)(2,d,{laws:b,title:l+" Laws:",mt:-2})||null,(C||V)&&(0,o.createComponentVNode)(2,d,{laws:w,title:"Inherent Laws",mt:-2})||null,y&&(0,o.createComponentVNode)(2,d,{laws:v,title:"Supplied Laws",mt:-2})||null,(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Controls",mt:-2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:B.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:L===e.channel,onClick:function(){return i("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",onClick:function(){return i("state_laws")},children:"State Laws"})}),k&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",onClick:function(){return i("notify_laws")},children:"Notify"})})||null]})}),_&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Add Laws",mt:-2,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Add"})]}),x&&!C&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:s,fluid:!0,onChange:function(e,t){return i("change_zeroth_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_zeroth_law")},children:"Add"})})]})||null,(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:u,fluid:!0,onChange:function(e,t){return i("change_ion_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_ion_law")},children:"Add"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:m,fluid:!0,onChange:function(e,t){return i("change_inherent_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_inherent_law")},children:"Add"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:p,fluid:!0,onChange:function(e,t){return i("change_supplied_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("change_supplied_law_position")},children:f})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_supplied_law")},children:"Add"})})]})]})})||null]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isMalf,d=c.isAdmin,u=e.laws,s=e.title,m=e.noButtons,p=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["laws","title","noButtons"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({level:2,title:s},p,{children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Law"}),!m&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"State"})||null,l&&!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Edit"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Delete"})],4)||null]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[e.index,"."]}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.zero?"bad":null,children:e.law}),!m&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"volume-up",selected:e.state,onClick:function(){return i("state_law",{ref:e.ref,state_law:!e.state})},children:e.state?"Yes":"No"})})||null,l&&!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.zero&&!d,icon:"pen",onClick:function(){return i("edit_law",{edit_law:e.ref})},children:"Edit"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.zero&&!d,color:"bad",icon:"trash",onClick:function(){return i("delete_law",{delete_law:e.ref})},children:"Delete"})})],4)||null]},e.index)}))]})})))},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isMalf,u=c.law_sets;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Remember: Stating laws other than those currently loaded may be grounds for decommissioning! - NanoTrasen"}),u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"sync",onClick:function(){return i("transfer_laws",{transfer_laws:e.ref})},children:"Load Laws"}),(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",onClick:function(){return i("state_law_set",{state_law_set:e.ref})},children:"State Laws"})],4),children:[e.laws.has_ion_laws&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.ion_laws,title:e.laws.ion_law_nr+" Laws:"})||null,(e.laws.has_zeroth_laws||e.laws.has_inherent_laws)&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.zeroth_laws.concat(e.laws.inherent_laws),title:e.header})||null,e.laws.has_supplied_laws&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.supplied_laws,title:"Supplied Laws"})||null]},e.name)}))||null],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.LookingGlass=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.LookingGlass=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.supportedPrograms,u=l.currentProgram,s=l.immersion,m=l.gravity,p=Math.min(180+23*d.length,600);return(0,o.createComponentVNode)(2,i.Window,{width:300,height:p,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eye",selected:e===u,onClick:function(){return c("program",{program:e})},children:e},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"user-astronaut",selected:m,onClick:function(){return c("gravity")},children:m?"Enabled":"Disabled"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Full Immersion",children:(0,o.createComponentVNode)(2,a.Button,{mt:-1,fluid:!0,icon:"eye",selected:s,onClick:function(){return c("immersion")},children:s?"Enabled":"Disabled"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[s.length&&(0,o.createComponentVNode)(2,a.Modal,{children:(0,o.createComponentVNode)(2,a.Section,{height:"400px",style:{"overflow-y":"auto"},title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,") (",e.year,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,c.decodeHtmlEntities)(e.message)})]},e.time)}))})})||null,u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.ref})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.ref})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){return l("shock",{mt:e.ref})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,c.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Medbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Medbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.beaker,m=l.beaker_total,p=l.beaker_max,f=l.locked,h=l.heal_threshold,C=l.heal_threshold_max,b=l.injection_amount_min,N=l.injection_amount,g=l.injection_amount_max,V=l.use_beaker,v=l.declare_treatment,y=l.vocal;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Medical Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",onClick:function(){return c("eject")},children:"Eject"}),children:s&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,maxValue:p,children:[m," / ",p]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No beaker loaded."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:f?"good":"bad",children:f?"Locked":"Unlocked"})]})}),!f&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavioral Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{fluid:!0,minValue:0,maxValue:C,value:h,onDrag:function(e,t){return c("adj_threshold",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Amount",children:(0,o.createComponentVNode)(2,a.NumberInput,{fluid:!0,minValue:b,maxValue:g,value:N,onDrag:function(e,t){return c("adj_inject",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c("use_beaker")},children:V?"Loaded Beaker (When available)":"Internal Synthesizer"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Treatment Report",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){return c("declaretreatment")},children:v?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speaker",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:y?"toggle-on":"toggle-off",selected:y,onClick:function(){return c("togglevoice")},children:y?"On":"Off"})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(1),a=n(2),i=n(45),c=n(3),l=n(131),d=n(132),u=n(62),s=(n(8),function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})});t.MedicalRecords=function(e,t){var n,s=(0,r.useBackend)(t).data,h=s.authenticated,C=s.screen;return h?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,p):4===C?n=(0,o.createComponentVNode)(2,f):5===C?n=(0,o.createComponentVNode)(2,b):6===C&&(n=(0,o.createComponentVNode)(2,N)),(0,o.createComponentVNode)(2,c.Window,{width:800,height:380,resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal,{maxHeight:"100%",maxWidth:"80%"}),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,u.TemporaryNotice),(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,a.Section,{height:"calc(100% - 5rem)",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{width:800,height:380,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return i("search",{t1:t})}}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.id+": "+e.name,onClick:function(){return i("d_rec",{d_rec:e.ref})}},t)}))})],4)},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all")}})],4)},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.medical,d=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,h)}),(0,o.createComponentVNode)(2,a.Section,{title:"Medical Data",level:2,children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",color:"bad",onClick:function(){return i("del_r")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Entry",ml:"0.5rem",onClick:function(){return i("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return i("screen",{screen:2})}})]})],4)},h=function(e,t){var n=(0,r.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,a.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return s(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e.substr(1,e.length-1),style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[e.value,(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return s(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,a.Button,{icon:"comment-medical",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,i.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},b=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.virus;return c.sort((function(e,t){return e.name>t.name?1:-1})),c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return i("vir",{vir:e.D})}}),(0,o.createVNode)(1,"br")],4,t)}))},N=function(e,t){var n=(0,r.useBackend)(t).data.medbots;return 0===n.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Collapsible,{open:!0,title:e.name,children:(0,o.createComponentVNode)(2,a.Box,{px:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:e.on?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Online"}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Offline"})})]})})},t)}))},g=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:5===c,onClick:function(){return i("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:6===c,onClick:function(){return i("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=(0,r.useBackend)(t).act,i=e.args;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",title:i.name||"Virus",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",color:"red",onClick:function(){return n("modal_close")}}),children:(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Spread",children:[i.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Possible cure",children:i.antigen}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate of Progression",children:i.rate}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Antibiotic Resistance",children:[i.resistance,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species Affected",children:i.species}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Symptoms",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:i.symptoms.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.stage+". "+e.name,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",children:"Strength:"})," ",e.strength,"\xa0",(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",children:"Aggressiveness:"})," ",e.aggressiveness]},e.stage)}))})})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MessageMonitor=void 0;var o=n(0),r=(n(5),n(8)),a=n(1),i=n(2),c=n(3),l=n(62),d=n(61);t.MessageMonitor=function(e,t){var n,r=(0,a.useBackend)(t),d=(r.act,r.data),p=d.auth,f=d.linkedServer,h=(d.message,d.hacking),C=d.emag;return n=h||C?(0,o.createComponentVNode)(2,u):p?f?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"}):(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Window,{width:670,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.TemporaryNotice),n]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.isMalfAI);return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"ERROR",children:r?(0,o.createComponentVNode)(2,i.Box,{children:"Brute-forcing for server key. It will take 20 seconds for every character that the password has."}):(0,o.createComponentVNode)(2,i.Box,{children:["01000010011100100111010101110100011001010010110",(0,o.createVNode)(1,"br"),"10110011001101111011100100110001101101001011011100110011",(0,o.createVNode)(1,"br"),"10010000001100110011011110111001000100000011100110110010",(0,o.createVNode)(1,"br"),"10111001001110110011001010111001000100000011010110110010",(0,o.createVNode)(1,"br"),"10111100100101110001000000100100101110100001000000111011",(0,o.createVNode)(1,"br"),"10110100101101100011011000010000001110100011000010110101",(0,o.createVNode)(1,"br"),"10110010100100000001100100011000000100000011100110110010",(0,o.createVNode)(1,"br"),"10110001101101111011011100110010001110011001000000110011",(0,o.createVNode)(1,"br"),"00110111101110010001000000110010101110110011001010111001",(0,o.createVNode)(1,"br"),"00111100100100000011000110110100001100001011100100110000",(0,o.createVNode)(1,"br"),"10110001101110100011001010111001000100000011101000110100",(0,o.createVNode)(1,"br"),"00110000101110100001000000111010001101000011001010010000",(0,o.createVNode)(1,"br"),"00111000001100001011100110111001101110111011011110111001",(0,o.createVNode)(1,"br"),"00110010000100000011010000110000101110011001011100010000",(0,o.createVNode)(1,"br"),"00100100101101110001000000111010001101000011001010010000",(0,o.createVNode)(1,"br"),"00110110101100101011000010110111001110100011010010110110",(0,o.createVNode)(1,"br"),"10110010100101100001000000111010001101000011010010111001",(0,o.createVNode)(1,"br"),"10010000001100011011011110110111001110011011011110110110",(0,o.createVNode)(1,"br"),"00110010100100000011000110110000101101110001000000111001",(0,o.createVNode)(1,"br"),"00110010101110110011001010110000101101100001000000111100",(0,o.createVNode)(1,"br"),"10110111101110101011100100010000001110100011100100111010",(0,o.createVNode)(1,"br"),"10110010100100000011010010110111001110100011001010110111",(0,o.createVNode)(1,"br"),"00111010001101001011011110110111001110011001000000110100",(0,o.createVNode)(1,"br"),"10110011000100000011110010110111101110101001000000110110",(0,o.createVNode)(1,"br"),"00110010101110100001000000111001101101111011011010110010",(0,o.createVNode)(1,"br"),"10110111101101110011001010010000001100001011000110110001",(0,o.createVNode)(1,"br"),"10110010101110011011100110010000001101001011101000010111",(0,o.createVNode)(1,"br"),"00010000001001101011000010110101101100101001000000111001",(0,o.createVNode)(1,"br"),"10111010101110010011001010010000001101110011011110010000",(0,o.createVNode)(1,"br"),"00110100001110101011011010110000101101110011100110010000",(0,o.createVNode)(1,"br"),"00110010101101110011101000110010101110010001000000111010",(0,o.createVNode)(1,"br"),"00110100001100101001000000111001001101111011011110110110",(0,o.createVNode)(1,"br"),"10010000001100100011101010111001001101001011011100110011",(0,o.createVNode)(1,"br"),"10010000001110100011010000110000101110100001000000111010",(0,o.createVNode)(1,"br"),"001101001011011010110010100101110"]})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.isMalfAI;return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"Welcome",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"}),"Unauthorized"]}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["Decryption Key:",(0,o.createComponentVNode)(2,i.Input,{placeholder:"Decryption Key",ml:"0.5rem",onChange:function(e,t){return r("auth",{key:t})}})]}),!!c&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:"Hack",onClick:function(){return r("hack")}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Please authenticate with the server in order to show additional options."})]})},m=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.linkedServer,d=(0,a.useLocalState)(t,"tabIndex",0),u=d[0],s=d[1];return 0===u?n=(0,o.createComponentVNode)(2,p):1===u?n=(0,o.createComponentVNode)(2,f,{logs:l.pda_msgs,pda:!0}):2===u?n=(0,o.createComponentVNode)(2,f,{logs:l.rc_msgs,rc:!0}):3===u?n=(0,o.createComponentVNode)(2,h):4===u&&(n=(0,o.createComponentVNode)(2,C)),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bars"})," Main Menu"]},"Main"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"font"})," Message Logs"]},"MessageLogs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bold"})," Request Logs"]},"RequestLogs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===u,onClick:function(){return s(3)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"comment-alt"})," Admin Messaging"]},"AdminMessage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:4===u,onClick:function(){return s(4)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"comment-slash"})," Spam Filter"]},"SpamFilter"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{color:"red",onClick:function(){return c("deauth")},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-out-alt"})," Log Out"]},"Logout")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.linkedServer;return(0,o.createComponentVNode)(2,i.Section,{title:"Main Menu",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"link",content:"Server Link",onClick:function(){return r("find")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"Server "+(c.active?"Enabled":"Disabled"),selected:c.active,onClick:function(){return r("active")}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Server Status",children:(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Good"})})}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"key",content:"Set Custom Key",onClick:function(){return r("pass")}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",confirmIcon:"exclamation-triangle",icon:"exclamation-triangle",content:"Clear Message Logs"}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",confirmIcon:"exclamation-triangle",icon:"exclamation-triangle",content:"Clear Request Logs"})]})},f=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=(n.data,e.logs),d=e.pda,u=e.rc;return(0,o.createComponentVNode)(2,i.Section,{title:d?"PDA Logs":u?"Request Logs":"Logs",buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",icon:"trash",confirmIcon:"trash",content:"Delete All",onClick:function(){return c(d?"del_pda":"del_rc")}}),children:(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{m:"2px",basis:"49%",grow:t%2,children:(0,o.createComponentVNode)(2,i.Section,{title:e.sender+" -> "+e.recipient,buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{confirmContent:"Delete Log?",color:"bad",icon:"trash",confirmIcon:"trash",onClick:function(){return c("delete",{id:e.ref,type:u?"rc":"pda"})}}),children:u?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",children:e.message}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Verification",color:"Unauthenticated"===e.id_auth?"bad":"good",children:(0,r.decodeHtmlEntities)(e.id_auth)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamp",children:e.stamp})]}):e.message})},e.ref)}))})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.possibleRecipients,d=c.customsender,u=c.customrecepient,s=c.customjob,m=c.custommessage,p=Object.keys(l);return(0,o.createComponentVNode)(2,i.Section,{title:"Admin Messaging",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sender",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:d,onChange:function(e,t){return r("set_sender",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sender's Job",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:s,onChange:function(e,t){return r("set_sender_job",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Recipient",children:(0,o.createComponentVNode)(2,i.Dropdown,{value:u,options:p,width:"100%",mb:-.7,onSelected:function(e){return r("set_recipient",{val:l[e]})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",verticalAlign:"top",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,mb:.5,value:m,onChange:function(e,t){return r("set_message",{val:t})}})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"comment",content:"Send Message",onClick:function(){return r("send_message")}})]})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.linkedServer;return(0,o.createComponentVNode)(2,i.Section,{title:"Spam Filtering",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:c.spamFilter.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",color:"bad",content:"Delete",onClick:function(){return r("deltoken",{deltoken:e.index})}}),children:e.token},e.index)}))}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Add New Entry",onClick:function(){return r("addtoken")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Microwave=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Microwave=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.config,d=n.data,u=d.broken,s=d.operating,m=d.dirty,p=d.items;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:u&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Bzzzzttttt!!"})})||s&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:["Microwaving in progress!",(0,o.createVNode)(1,"br"),"Please wait...!"]})})||m&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["This microwave is dirty!",(0,o.createVNode)(1,"br"),"Please clean it before use!"]})})||p.length&&(0,o.createComponentVNode)(2,a.Section,{level:1,title:"Ingredients",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",onClick:function(){return c("cook")},children:"Microwave"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("dispose")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.amt," ",e.extra]},e.name)}))})})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[l.title," is empty."]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningOreProcessingConsole=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=(n(19),n(187));t.MiningOreProcessingConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.unclaimedPoints,s=(d.ores,d.showAllOres,d.power);return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,l.MiningUser,{insertIdText:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",mr:1,onClick:function(){return r("insert")},children:"Insert ID"}),"in order to claim points."]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,onClick:function(){return r("power")},children:s?"Smelting":"Not Smelting"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current unclaimed points",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:u<1,icon:"download",onClick:function(){return r("claim")},children:"Claim"}),children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:u})})})}),(0,o.createComponentVNode)(2,m)]})})};var d=["Not Processing","Smelting","Compressing","Alloying"],u=["verdantium","mhydrogen","diamond","platinum","uranium","gold","silver","rutile","phoron","marble","lead","sand","carbon","hematite"],s=function(e,t){return-1===u.indexOf(e.ore)||-1===u.indexOf(t.ore)?e.ore-t.ore:u.indexOf(t.ore)-u.indexOf(e.ore)},m=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,u=l.ores,m=l.showAllOres;l.power;return(0,o.createComponentVNode)(2,i.Section,{title:"Ore Processing Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:m?"toggle-on":"toggle-off",selected:m,onClick:function(){return c("showAllOres")},children:m?"All Ores":"Ores in Machine"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:u.length&&u.sort(s).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.name),buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"120px",color:(0===e.processing?"red":1===e.processing&&"green")||2===e.processing&&"blue"||3===e.processing&&"yellow",options:d,selected:d[e.processing],onSelected:function(t){return c("toggleSmelting",{ore:e.ore,set:d.indexOf(t)})}}),children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.amount})})},e.ore)}))||(0,o.createComponentVNode)(2,i.Box,{color:"bad",textAlign:"center",children:"No ores in machine."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningStackingConsole=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3);n(19);t.MiningStackingConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.stacktypes,s=d.stackingAmt;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stacker Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stacking",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,value:s,minValue:1,maxValue:50,stepPixelSize:5,onChange:function(e,t){return l("change_stack",{amt:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),u.length&&u.sort().map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.type),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return l("release_stack",{stack:e.type})},children:"Eject"}),children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.amt})},e.type)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Empty",color:"average",children:"No stacks in machine."})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=n(187);var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:400,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",scrollable:!0,children:[(0,o.createComponentVNode)(2,l.MiningUser,{insertIdText:"Please insert an ID in order to make purchases."}),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),l=(n.act,n.data),u=l.has_id,s=l.id,p=l.items,f=(0,a.useLocalState)(t,"search",""),h=f[0],C=(f[1],(0,a.useLocalState)(t,"sort","Alphabetical")),b=C[0],N=(C[1],(0,a.useLocalState)(t,"descending",!1)),g=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),v=!1,y=Object.entries(p).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=u&&s.points>=e[1].price,e[1]})).sort(d[b]);if(0!==n.length)return g&&(n=n.reverse()),v=!0,(0,o.createComponentVNode)(2,m,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,i.Section,{onClick:function(e){return(0,c.refocusLayout)()},children:v?y:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No items matching your criteria was found!"})})})},s=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,a.useLocalState)(t,"sort",""),l=(c[0],c[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,i.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.title,d=e.items,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Collapsible,Object.assign({open:!0,title:l},u,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,i.Button,{disabled:!c.has_id||c.id.points1&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:h})," Seconds",(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Warning: Do not fire during cooldown."})]})||null})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",mt:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Calibration",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m}),"%",(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"exchange-alt",onClick:function(){return i("skill_calibration")},children:"Pre-Calibration"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:["Cal #",t,":",(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"random",onClick:function(){return i("calibration",{calibration:t})},children:e.toString()})]},t)}))})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",grow:1,mt:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Setup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"fist-raised",onClick:function(){return i("strength")},children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radius",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"expand-arrows-alt",onClick:function(){return i("range")},children:f})})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mt:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"red",icon:"bomb",onClick:function(){return i("fire")},children:"Fire ORB"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapEngines=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapEngines=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.global_state,u=l.global_limit,s=l.engines_info,m=l.total_thrust;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:530,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Engines",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("global_toggle")},children:d?"Shut All Engines Down":"Start All Engines"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Limit",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("global_limit",{global_limit:-.1})},icon:"minus"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("set_global_limit")},children:[u,"%"]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("global_limit",{global_limit:.1})},icon:"plus"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Thrust",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Engines",height:"340px",style:{"overflow-y":"auto"},children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mt:0!==t&&-1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"80%",children:(0,o.createComponentVNode)(2,a.Collapsible,{title:(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:["Engine #",t+1," | Thrust: ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.eng_thrust})," | Limit: ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.eng_thrust_limiter,format:function(e){return e+"%"}})]}),children:(0,o.createComponentVNode)(2,a.Section,{width:"127%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:e.eng_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Box,{color:e.eng_on?1===e.eng_on?"good":"average":"bad",children:e.eng_on?1===e.eng_on?"Online":"Booting":"Offline"}),e.eng_status.map((function(e){return Array.isArray(e)?(0,o.createComponentVNode)(2,a.Box,{color:e[1],children:e[0]}):(0,o.createComponentVNode)(2,a.Box,{children:e})}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Thrust",children:e.eng_thrust}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Limit",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("limit",{limit:-.1,engine:e.eng_reference})},icon:"minus"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("set_limit",{engine:e.eng_reference})},children:[e.eng_thrust_limiter,"%"]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("limit",{limit:.1,engine:e.eng_reference})},icon:"plus"})]})]})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,iconSpin:-1===e.eng_on,color:-1===e.eng_on?"purple":null,selected:1===e.eng_on,icon:"power-off",onClick:function(){return c("toggle",{engine:e.eng_reference})},children:e.eng_on?1===e.eng_on?"Shutoff":"Booting":"Startup"})})]},t)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapFlightDataWrap=t.OvermapHelm=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(133);t.OvermapHelm=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{width:565,height:545,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"40%",height:"180px",children:(0,o.createComponentVNode)(2,l)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"25%",height:"180px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",height:"180px",children:(0,o.createComponentVNode)(2,u)})]}),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Flight Data",16),(0,o.createComponentVNode)(2,c.OvermapFlightData)],4,{style:{height:"100%",border:"1px solid #4972a1",margin:"none"}})};t.OvermapFlightDataWrap=l;var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.canburn,u=l.manual_control;return(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Manual Control",16),(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,c.OvermapPanControls,{disabled:!d,actToDo:"move"})})}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,underline:!0,children:"Direct Control"}),(0,o.createComponentVNode)(2,a.Button,{selected:u,onClick:function(){return i("manual")},icon:"compass",children:u?"Enabled":"Disabled"})]})],4,{style:{height:"100%",border:"1px solid #4972a1"}})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.dest,d=c.d_x,u=c.d_y,s=c.speedlimit,m=c.autopilot;return c.autopilot_disabled?(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Autopilot",16),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",color:"bad",fontSize:1.2,children:"AUTOPILOT DISABLED"}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",color:"average",children:"Warning: This vessel is equipped with a class I autopilot. Class I autopilots are unable to do anything but fly in a straight line directly towards the target, and may result in collisions."}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:1,color:"bad",content:"Unlock Autopilot",confirmContent:"ACCEPT RISKS?",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",onClick:function(){return i("apilot_lock")}})})],4,{style:{height:"100%",border:"1px solid #4972a1"}}):(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Autopilot",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("setcoord",{setx:!0})},children:d}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("setcoord",{sety:!0})},children:u})],4)||(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("setcoord",{setx:!0,sety:!0})},children:"None"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speed Limit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tachometer-alt",onClick:function(){return i("speedlimit")},children:[s," Gm/h"]})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,selected:m,disabled:!l,icon:"robot",onClick:function(){return i("apilot")},children:m?"Engaged":"Disengaged"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"good",icon:"exclamation-triangle",onClick:function(){return i("apilot_lock")},children:"Lock Autopilot"})],4,{style:{height:"100%",border:"1px solid #4972a1"}})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.sector,d=c.s_x,u=c.s_y,s=c.sector_info,m=c.landed,p=c.locations;return(0,o.createComponentVNode)(2,a.Section,{title:"Navigation Data",m:.3,mt:1,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coordinates",children:[d," : ",u]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Data",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:m})]}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",justify:"center",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"save",onClick:function(){return i("add",{add:"current"})},children:"Save Current Position"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"sticky-note",onClick:function(){return i("add",{add:"new"})},children:"Add New Entry"})})]}),(0,o.createComponentVNode)(2,a.Section,{mt:1,scrollable:!0,height:"130px",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Coordinates"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.x," : ",e.y]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",onClick:function(){return i("setds",{x:e.x,y:e.y})},children:"Plot Course"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",onClick:function(){return i("remove",{remove:e.reference})},children:"Remove"})]})]},e.name)}))]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapShieldGenerator=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapShieldGenerator=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:500,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=c.modes,s=c.offline_for;return s?(0,o.createComponentVNode)(2,a.Section,{title:"EMERGENCY SHUTDOWN",color:"bad",children:["An emergency shutdown has been initiated - generator cooling down. Please wait until the generator cools down before resuming operation. Estimated time left: ",s," seconds."]}):(0,o.createFragment)([(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:"Field Calibration",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:e.status,onClick:function(){return i("toggle_mode",{toggle_mode:e.flag})},children:e.status?"Enabled":"Disabled"}),children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e.desc}),(0,o.createComponentVNode)(2,a.Box,{mt:.5,children:["Multiplier: ",e.multiplier]})]},e.name)}))})],4)},l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=i.running,l=i.overloaded,d=i.mitigation_max,u=i.mitigation_physical,s=i.mitigation_em,m=i.mitigation_heat,p=i.field_integrity,f=i.max_energy,h=i.current_energy,C=i.percentage_energy,b=i.total_segments,N=i.functional_segments,g=i.field_radius,V=i.target_radius,v=i.input_cap_kw,y=i.upkeep_power_usage,k=i.power_usage,_=i.spinup_counter;return(0,o.createComponentVNode)(2,a.Section,{title:"System Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generator is",children:1===c&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Shutting Down"})||2===c&&(l&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Overloaded"})||(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Running"}))||3===c&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Inactive"})||4===c&&(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:["Spinning Up\xa0",V!==g&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"(Adjusting Radius)"})||(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[2*_,"s"]})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Offline"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy Storage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,maxValue:f,children:[h," / ",f," MJ (",C,"%)"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shield Integrity",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:p}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mitigation",children:[s,"% EM / ",u,"% PH / ",m,"% HE / ",d,"% MAX"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upkeep Energy Use",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:y})," kW"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Energy Use",children:v&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:k,maxValue:v,children:[k," / ",v," kW"]})})||(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:k})," kW (No Limit)"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Field Size",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:N}),"\xa0/\xa0",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:b})," m\xb2 (radius ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),", target ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V}),")"]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.running,d=c.hacked,u=c.idle_multiplier,s=c.idle_valid_values;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([l>=2&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("begin_shutdown")},selected:!0,children:"Turn off"}),3===l&&(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("toggle_idle",{toggle_idle:0})},children:"Activate"})||(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("toggle_idle",{toggle_idle:1})},selected:!0,children:"Deactivate"})]})||(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("start_generator")},children:"Turn on"}),l&&d&&(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",onClick:function(){return i("emergency_shutdown")},color:"bad",children:"EMERGENCY SHUTDOWN"})||null],0),children:[(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",onClick:function(){return i("set_range")},children:"Set Field Range"}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",onClick:function(){return i("set_input_cap")},children:"Set Input Cap"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Set inactive power use intensity",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e===u,disabled:4===l,onClick:function(){return i("switch_idle",{switch_idle:e})},children:e},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapShipSensors=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapShipSensors=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.viewing,u=l.on,s=l.range,m=l.health,p=l.max_health,f=l.heat,h=l.critical_heat,C=l.status,b=l.contacts;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:545,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:d,onClick:function(){return c("viewing")},children:"Map View"}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:u,onClick:function(){return c("toggle")},children:u?"Sensors Enabled":"Sensors Disabled"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{icon:"signal",onClick:function(){return c("range")},children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*p,Infinity],average:[.25*p,.75*p],bad:[-Infinity,.25*p]},value:m,maxValue:p,children:[m," / ",p]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*h,Infinity],average:[.5*h,.75*h],good:[-Infinity,.5*h]},value:f,maxValue:h,children:f<.5*h&&(0,o.createComponentVNode)(2,a.Box,{children:"Temperature low."})||f<.75*h&&(0,o.createComponentVNode)(2,a.Box,{children:"Sensor temperature high!"})||(0,o.createComponentVNode)(2,a.Box,{children:"TEMPERATURE CRITICAL: Disable or reduce power immediately!"})})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contacts",children:b.length&&b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"search",onClick:function(){return c("scan",{scan:e.ref})},children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,inline:!0,children:["Scan: ",e.name]}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[", bearing: ",e.bearing,"\xb0"]})]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No contacts on sensors."})}),"MISSING"===l.status&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wifi",onClick:function(){return c("link")},children:"Link up with sensor suite?"})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:185,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Run Scan",onClick:function(){return c("scan")}}),children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Ready - All parts in place":"Unable to detect all parts"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Particle Accelerator Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Particle Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d,onClick:function(){return c("remove_strength")}})," ",String(s).padStart(1,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d,onClick:function(){return c("add_strength")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PartsLathe=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8),l=n(130);t.PartsLathe=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(u.panelOpen,u.copyBoard),m=u.copyBoardReqComponents,p=u.queue,f=u.building,h=u.buildPercent,C=u.error,b=u.recipies;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[C&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:["Missing Materials: ",C]})||null,(0,o.createComponentVNode)(2,a.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,l.Materials,{displayAllMat:!0})}),f&&(0,o.createComponentVNode)(2,a.Section,{title:"Currently Building",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,c.toTitleCase)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:h,maxValue:100})})]})})||null,s&&(0,o.createComponentVNode)(2,a.Section,{title:"Circuit Reader",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Loaded Circuit",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return d("ejectBoard")},children:"Eject"}),children:(0,c.toTitleCase)(s)})}),m&&m.length&&(0,o.createFragment)([m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.qty," x ",(0,c.toTitleCase)(e.name)]},e.name)})),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",onClick:function(){return d("queueBoard")},children:"Build All"})],0)||(0,o.createComponentVNode)(2,a.Box,{children:"Board has no required components."})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Queue",children:p.length&&p.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["#",t+1,": ",(0,c.toTitleCase)(e),(t>0||!f)&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"times",onClick:function(){return d("cancel",{cancel:t+1})},children:"Cancel"})||null]},e)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Queue Empty"})}),(0,o.createComponentVNode)(2,a.Section,{title:"Recipes",children:b.length&&b.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",onClick:function(){return d("queue",{queue:e.type})},children:(0,c.toTitleCase)(e.name)})},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PathogenicIsolator=void 0;var o=n(0),r=(n(5),n(21),n(1)),a=n(45),i=n(2),c=n(3),l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.can_print,l=e.args;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",title:l.name||"Virus",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{disabled:!c,icon:"print",content:"Print",onClick:function(){return a("print",{type:"virus_record",vir:l.record})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return a("modal_close")}})],4),children:(0,o.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[l.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:l.antigen}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate of Progression",children:l.rate}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Antibiotic Resistance",children:[l.resistance,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species Affected",children:l.species}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Symptoms",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.symptoms.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.stage+". "+e.name,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:"Strength:"})," ",e.strength,"\xa0"]}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:"Aggressiveness:"})," ",e.aggressiveness]})]},e.stage)}))})})]})})})};t.PathogenicIsolator=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.isolating),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],f=m[1],h=null;return 0===p?h=(0,o.createComponentVNode)(2,d):1===p&&(h=(0,o.createComponentVNode)(2,u)),(0,a.modalRegisterBodyOverride)("virus",l),(0,o.createComponentVNode)(2,c.Window,{height:500,width:520,resizable:!0,children:[(0,o.createComponentVNode)(2,a.ComplexModal,{maxHeight:"100%",maxWidth:"95%"}),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,i.NoticeBox,{warning:!0,children:"The Isolator is currently isolating..."})||null,(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===p,onClick:function(){return f(0)},children:"Home"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===p,onClick:function(){return f(1)},children:"Database"})]}),h]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.syringe_inserted,d=c.pathogen_pool,u=c.can_print;return(0,o.createComponentVNode)(2,i.Section,{title:"Pathogens",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print",disabled:!u,onClick:function(){return a("print",{type:"patient_diagnosis"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Syringe",disabled:!l,onClick:function(){return a("eject")}})],4),children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:[(0,o.createVNode)(1,"u",null,[(0,o.createTextVNode)("Stamm #"),e.unique_id],0),e.is_in_database?" (Analyzed)":" (Not Analyzed)"]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"virus",content:"Isolate",onClick:function(){return a("isolate",{isolate:e.reference})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"search",content:"Database",disabled:!e.is_in_database,onClick:function(){return a("view_entry",{vir:e.record})}})]})]})}),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",mb:1,children:e.name}),e.dna]})]},e.unique_id)}))||(l?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No samples detected."}):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No syringe inserted."}))})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.database,d=c.can_print;return(0,o.createComponentVNode)(2,i.Section,{title:"Database",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print",disabled:!d,onClick:function(){return a("print",{type:"virus_list"})}}),children:l.length&&l.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"search",onClick:function(){return a("view_entry",{vir:e.record})},children:e.name},e.name)}))||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"The viral database is empty."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PipeDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(194);t.PipeDispenser=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.disposals,s=d.p_layer,m=d.pipe_layers,p=d.categories,f=void 0===p?[]:p,h=(0,r.useLocalState)(t,"categoryName"),C=h[0],b=h[1],N=f.find((function(e){return e.cat_name===C}))||f[0];return(0,o.createComponentVNode)(2,i.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Layer",children:(0,o.createComponentVNode)(2,a.Box,{children:Object.keys(m).map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m[e]===s,content:e,onClick:function(){return l("p_layer",{p_layer:m[e]})}},e)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Pipes",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:f.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{fluid:!0,icon:c.ICON_BY_CATEGORY_NAME[e.cat_name],selected:e.cat_name===N.cat_name,onClick:function(){return b(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==N?void 0:N.recipes.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.pipe_name,title:e.pipe_name,onClick:function(){return l("dispense_pipe",{ref:e.ref,bent:e.bent,category:N.cat_name})}},e.pipe_name)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PlantAnalyzer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PlantAnalyzer=function(e,t){var n=(0,r.useBackend)(t).data,a=250;return n.seed&&(a+=18*n.seed.trait_info.length),n.reagents&&n.reagents.length&&(a+=55,a+=20*n.reagents.length),(0,o.createComponentVNode)(2,i.Window,{width:400,height:a,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.no_seed,d=c.seed,u=c.reagents;return l?(0,o.createComponentVNode)(2,a.Section,{title:"Analyzer Unused",children:"You should go scan a plant! There is no data currently loaded."}):(0,o.createComponentVNode)(2,a.Section,{title:"Plant Information",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return i("print")},children:"Print Report"}),(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",color:"red",onClick:function(){return i("close")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Name",children:[d.name,"#",d.uid]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Endurance",children:d.endurance}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Yield",children:d.yield}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maturation Time",children:d.maturation_time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Production Time",children:d.production_time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Potency",children:d.potency})]}),u.length&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Plant Reagents",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.volume," unit(s)."]},e.name)}))})})||null,(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Other Data",children:d.trait_info.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",mb:.4,children:e},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PointDefenseControl=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PointDefenseControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.id,u=l.turrets;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Fire Assist Mainframe: "+(d||"[no tag]"),children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{level:2,title:e.id,buttons:(0,o.createComponentVNode)(2,a.Button,{selected:e.active,icon:"power-off",onClick:function(){return c("toggle_active",{target:e.ref})},children:e.active?"Online":"Offline"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Effective range",children:e.effective_range}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reaction wheel delay",children:e.reaction_wheel_delay}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recharge time",children:e.recharge_time})]})},e.id)}))||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Error: No weapon systems detected. Please check network connection."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableGenerator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(5);t.PortableGenerator=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.fuel_stored/d.fuel_capacity,s=(u>=.5?"good":u>.15&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!d.anchored&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.active?"power-off":"times",onClick:function(){return l("toggle_power")},selected:d.active,disabled:!d.ready_to_boot,children:d.active?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel Type",buttons:d.fuel_stored>=1&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"eject",disabled:d.active,onClick:function(){return l("eject")},children:"Eject"}),children:(0,o.createComponentVNode)(2,a.Box,{color:s,children:[d.fuel_stored,"cm\xb3 ",d.sheet_name]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.fuel_stored/d.fuel_capacity,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[d.fuel_stored,"cm\xb3 / ",d.fuel_capacity,"cm\xb3"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel Usage",children:[d.fuel_usage," cm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.temperature_current,maxValue:d.temperature_max+30,color:d.temperature_overheat?"bad":"good",children:[(0,c.round)(d.temperature_current),"\xb0C"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current output",color:d.unsafe_output?"bad":null,children:d.power_output}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",onClick:function(){return l("lower_power")},children:d.power_generated}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("higher_power")},children:d.power_generated})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:!d.connected&&"bad",children:d.connected?d.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortablePump=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(195);t.PortablePump=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.direction,s=d.target_pressure,m=d.default_pressure,p=d.min_pressure,f=d.max_pressure;return(0,o.createComponentVNode)(2,i.Window,{width:330,height:375,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Pump",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-in-alt":"sign-out-alt",content:u?"In":"Out",selected:u,onClick:function(){return l("direction")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output",children:(0,o.createComponentVNode)(2,a.Slider,{mt:"0.4em",animated:!0,minValue:p,maxValue:f,value:s,unit:"kPa",stepPixelSize:.3,onChange:function(e,t){return l("pressure",{pressure:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",disabled:s===p,onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",disabled:s===m,onClick:function(){return l("pressure",{pressure:"reset"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",disabled:s===f,onClick:function(){return l("pressure",{pressure:"max"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableScrubber=void 0;var o=n(0),r=n(1),a=n(2),i=(n(39),n(3)),c=n(195);t.PortableScrubber=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.rate,s=d.minrate,m=d.maxrate;return(0,o.createComponentVNode)(2,i.Window,{width:320,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Power Regulator",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Rate",children:(0,o.createComponentVNode)(2,a.Slider,{mt:"0.4em",animated:!0,minValue:s,maxValue:m,value:u,unit:"L/s",onChange:function(e,t){return l("volume_adj",{vol:t})}})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PressureRegulator=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PressureRegulator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.pressure_set,s=(l.max_pressure,l.input_pressure),m=l.output_pressure,p=l.regulate_mode,f=l.set_flow_rate,h=l.last_flow_rate;return(0,o.createComponentVNode)(2,i.Window,{width:470,height:370,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s/100})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m/100})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:h/10})," L/s"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"Unlocked":"Closed",selected:d,onClick:function(){return c("toggle_valve")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Regulation",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Off",selected:0===p,onClick:function(){return c("regulate_mode",{mode:"off"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"Input",selected:1===p,onClick:function(){return c("regulate_mode",{mode:"input"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"Output",selected:2===p,onClick:function(){return c("regulate_mode",{mode:"output"})}})],4)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Output Pressure",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"MIN",onClick:function(){return c("set_press",{press:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"MAX",onClick:function(){return c("set_press",{press:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"SET",onClick:function(){return c("set_press",{press:"set"})}})],4),children:[u/100," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate Limit",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"MIN",onClick:function(){return c("set_flow_rate",{press:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"MAX",onClick:function(){return c("set_flow_rate",{press:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"SET",onClick:function(){return c("set_flow_rate",{press:"set"})}})],4),children:[f/10," L/s"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PrisonerManagement=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);n(21);t.PrisonerManagement=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.locked,u=l.chemImplants,s=l.trackImplants;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:d&&(0,o.createComponentVNode)(2,a.Section,{title:"Locked",textAlign:"center",children:["This interface is currently locked.",(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",onClick:function(){return c("lock")},children:"Unlock"})})]})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Interface Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",onClick:function(){return c("lock")},children:"Lock Interface"})}),(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Implants",children:u.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Host"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Units Remaining"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Inject"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.host}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.units,"u remaining"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:1})},children:"(1)"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:5})},children:"(5)"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:10})},children:"(10)"})]})]},e.ref)}))]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No chemical implants found."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Tracking Implants",children:s.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Host"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Location"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Message"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.host," (",e.id,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.loc}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("warn",{imp:e.ref})},children:"Message"})})]},e.ref)}))]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No chemical implants found."})})],4)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RIGSuit=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8);t.RIGSuit=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),s=c.interfacelock,m=c.malf,p=c.aicontrol,f=c.ai,h=null;return s||m?h=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"--HARDSUIT INTERFACE OFFLINE--"}):!f&&p&&(h=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"-- HARDSUIT CONTROL OVERRIDDEN BY AI --"})),(0,o.createComponentVNode)(2,i.Window,{height:480,width:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:h||(0,o.createFragment)([(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.chargestatus,d=c.charge,u=c.maxcharge,s=c.aioverride,m=c.sealing,p=c.sealed,f=c.emagged,h=c.securitycheck,C=c.coverlock,b=(0,o.createComponentVNode)(2,a.Button,{content:"Suit "+(m?"seals working...":p?"is Active":"is Inactive"),icon:m?"redo":p?"power-off":"lock-open",iconSpin:m,disabled:m,selected:p,onClick:function(){return i("toggle_seals")}}),N=(0,o.createComponentVNode)(2,a.Button,{content:"AI Control "+(s?"Enabled":"Disabled"),selected:s,icon:"robot",onClick:function(){return i("toggle_ai_control")}});return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([b,N],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Supply",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,maxValue:50,value:l,ranges:{good:[35,Infinity],average:[15,35],bad:[-Infinity,15]},children:[d," / ",u]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Status",children:f||!h?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Error - Maintenance Lock Control Offline"}):(0,o.createComponentVNode)(2,a.Button,{icon:C?"lock":"lock-open",content:C?"Locked":"Unlocked",onClick:function(){return i("toggle_suit_lock")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sealing,u=l.helmet,s=l.helmetDeployed,m=l.gauntlets,p=l.gauntletsDeployed,f=l.boots,h=l.bootsDeployed,C=l.chest,b=l.chestDeployed;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:s?"sign-out-alt":"sign-in-alt",content:s?"Deployed":"Deploy",disabled:d,selected:s,onClick:function(){return i("toggle_piece",{piece:"helmet"})}}),children:(0,c.capitalize)(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:p?"sign-out-alt":"sign-in-alt",content:p?"Deployed":"Deploy",disabled:d,selected:p,onClick:function(){return i("toggle_piece",{piece:"gauntlets"})}}),children:(0,c.capitalize)(m)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:h?"sign-out-alt":"sign-in-alt",content:h?"Deployed":"Deploy",disabled:d,selected:h,onClick:function(){return i("toggle_piece",{piece:"boots"})}}),children:(0,c.capitalize)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestpiece",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:b?"sign-out-alt":"sign-in-alt",content:b?"Deployed":"Deploy",disabled:d,selected:b,onClick:function(){return i("toggle_piece",{piece:"chest"})}}),children:(0,c.capitalize)(C)})]})})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sealed,u=l.sealing,s=l.primarysystem,m=l.modules;return!d||u?(0,o.createComponentVNode)(2,a.Section,{title:"Modules",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"HARDSUIT SYSTEMS OFFLINE"})}):(0,o.createComponentVNode)(2,a.Section,{title:"Modules",children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",mb:"0.2rem",fontSize:1.5,children:["Selected Primary: ",(0,c.capitalize)(s||"None")]}),m&&m.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{level:2,title:(0,c.toTitleCase)(e.name)+(e.damage?" (damaged)":""),buttons:(0,o.createFragment)([e.can_select?(0,o.createComponentVNode)(2,a.Button,{selected:e.name===s,content:e.name===s?"Selected":"Select",icon:"arrow-circle-right",onClick:function(){return i("interact_module",{module:e.index,module_mode:"select"})}}):null,e.can_use?(0,o.createComponentVNode)(2,a.Button,{content:e.engagestring,icon:"arrow-circle-down",onClick:function(){return i("interact_module",{module:e.index,module_mode:"engage"})}}):null,e.can_toggle?(0,o.createComponentVNode)(2,a.Button,{selected:e.is_active,content:e.is_active?e.deactivatestring:e.activatestring,icon:"arrow-circle-down",onClick:function(){return i("interact_module",{module:e.index,module_mode:"toggle"})}}):null],0),children:e.damage>=2?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"-- MODULE DESTROYED --"}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Engage: ",e.engagecost]}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Active: ",e.activecost]}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Passive: ",e.passivecost]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:e.desc}),e.charges?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Module Charges",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected",children:(0,c.capitalize)(e.chargetype)}),e.charges.map((function(t,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.capitalize)(t.caption),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",onClick:function(){return i("interact_module",{module:e.index,module_mode:"select_charge_type",charge_type:n})}})},t.caption)}))]})})}):null]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Radio=void 0;var o=n(0),r=(n(19),n(5)),a=n(1),i=n(2),c=n(39),l=n(3);t.Radio=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.rawfreq,m=u.minFrequency,p=u.maxFrequency,f=u.listening,h=u.broadcasting,C=u.subspace,b=u.subspaceSwitchable,N=u.chan_list,g=u.loudspeaker,V=u.mic_cut,v=u.spk_cut,y=u.useSyndMode,k=c.RADIO_CHANNELS.find((function(e){return e.freq===Number(s)})),_=156;return N&&N.length>0?_+=28*N.length+6:_+=24,b&&(_+=38),(0,o.createComponentVNode)(2,l.Window,{width:310,height:_,resizable:!0,theme:y?"syndicate":"",children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},onDrag:function(e,t){return d("setFrequency",{freq:(0,r.round)(10*t)})}}),k&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:k.color,ml:2,children:["[",k.name,"]"]})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Audio",children:[(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:f?"volume-up":"volume-mute",selected:f,disabled:v,onClick:function(){return d("listen")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:h?"microphone":"microphone-slash",selected:h,disabled:V,onClick:function(){return d("broadcast")}}),!!b&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"bullhorn",selected:C,content:"Subspace Tx "+(C?"ON":"OFF"),onClick:function(){return d("subspace")}})}),!!b&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:g?"volume-up":"volume-mute",selected:g,content:"Loudspeaker",onClick:function(){return d("toggleLoudspeaker")}})})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Channels",children:[(!N||0===N.length)&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"No channels detected."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:N?N.map((function(e){var t=c.RADIO_CHANNELS.find((function(t){return t.freq===Number(e.freq)})),n="default";return t&&(n=t.color),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.display_name,labelColor:n,textAlign:"right",children:e.secure_channel&&C?(0,o.createComponentVNode)(2,i.Button,{icon:e.sec_channel_listen?"square-o":"check-square-o",selected:!e.sec_channel_listen,content:e.sec_channel_listen?"Off":"On",onClick:function(){return d("channel",{channel:e.chan})}}):(0,o.createComponentVNode)(2,i.Button,{content:"Switch",selected:e.chan===s,onClick:function(){return d("specFreq",{channel:e.chan})}})},e.chan)})):null})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RequestConsole=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t).act,r=e.dept_list,c=e.department;return(0,o.createComponentVNode)(2,i.LabeledList,{children:r.sort().map((function(e){return e!==c&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"envelope-open-text",onClick:function(){return n("write",{write:e,priority:1})},children:"Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",onClick:function(){return n("write",{write:e,priority:2})},children:"High Priority"})],4)})||null}))})},d={0:function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.silent;return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,i.Button,{selected:!c,icon:c?"volume-mute":"volume-up",onClick:function(){return r("toggleSilent")},children:["Speaker ",c?"OFF":"ON"]})})},1:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.assist_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Request assistance from another department",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},2:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.supply_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Supplies",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},3:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.info_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Report Anonymous Information",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},4:function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:2,color:"good",children:"Message Sent Successfully"}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",onClick:function(){return r("setScreen",{setScreen:0})},children:"Continue"})})]})},5:function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:1.5,bold:!0,color:"bad",children:"An error occured. Message Not Sent."}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",onClick:function(){return r("setScreen",{setScreen:0})},children:"Continue"})})]})},6:function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.message_log;return(0,o.createComponentVNode)(2,i.Section,{title:"Messages",children:l.length&&l.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.decodeHtmlEntities)(e[0]),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return c("print",{print:t+1})},children:"Print"}),children:(0,r.decodeHtmlEntities)(e[1])},t)}))||(0,o.createComponentVNode)(2,i.Box,{children:"No messages."})})},7:function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.message,u=l.recipient,s=l.priority,m=l.msgStamped,p=l.msgVerified;return(0,o.createComponentVNode)(2,i.Section,{title:"Message Authentication",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message for "+u,children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Priority",children:2===s?"High Priority":1===s?"Normal Priority":"Unknown"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated By",color:p?"good":"bad",children:(0,r.decodeHtmlEntities)(p)||"No Validation"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamped By",color:m?"good":"bad",children:(0,r.decodeHtmlEntities)(m)||"No Stamp"})]}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"share",onClick:function(){return c("department",{department:u})},children:"Send Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return c("setScreen",{setScreen:0})},children:"Back"})]})},8:function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=(c.department,c.screen,c.message_log,c.newmessagepriority,c.silent,c.announcementConsole,c.assist_dept,c.supply_dept,c.info_dept,c.message),d=(c.recipient,c.priority,c.msgStamped,c.msgVerified,c.announceAuth);return(0,o.createComponentVNode)(2,i.Section,{title:"Send Station-Wide Announcement",children:[d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"good",mb:1,children:"ID Verified. Authentication Accepted."}),(0,o.createComponentVNode)(2,i.Section,{title:"Message",mt:1,maxHeight:"200px",scrollable:!0,buttons:(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"pen",onClick:function(){return r("writeAnnouncement")},children:"Edit"}),children:l||"No Message"})],4)||(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mb:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l||!d,icon:"share",onClick:function(){return r("sendAnnouncement")},children:"Announce"}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return r("setScreen",{setScreen:0})},children:"Back"})]})}};t.RequestConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,u=l.screen,s=l.newmessagepriority,m=l.announcementConsole,p=d[u];return(0,o.createComponentVNode)(2,c.Window,{width:520,height:410,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:6===u,onClick:function(){return r("setScreen",{setScreen:6})},icon:"envelope-open-text",children:"Messages"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===u,onClick:function(){return r("setScreen",{setScreen:1})},icon:"share-square",children:"Assistance"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===u,onClick:function(){return r("setScreen",{setScreen:2})},icon:"share-square",children:"Supplies"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===u,onClick:function(){return r("setScreen",{setScreen:3})},icon:"share-square-o",children:"Report"}),m&&(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:8===u,onClick:function(){return r("setScreen",{setScreen:8})},icon:"volume-up",children:"Announce"})||null,(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===u,onClick:function(){return r("setScreen",{setScreen:0})},icon:"cog"})]}),s&&(0,o.createComponentVNode)(2,i.Section,{title:s>1?"NEW PRIORITY MESSAGES":"There are new messages!",color:s>1?"bad":"average",bold:s>1})||null,(0,o.createComponentVNode)(2,p)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResearchConsole=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t).data,o=e.title,r=n[e.target];return"number"==typeof r?o+" - Page "+(r+1):o},d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.target;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return n(r,{reset:!0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-left",onClick:function(){return n(r,{reverse:-1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",onClick:function(){return n(r,{reverse:1})}})],4)},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info.tech,l=e.disk;if(!l||!l.present)return null;var d=(0,a.useSharedState)(t,"saveDialogTech",!1),u=d[0],s=d[1];return u?(0,o.createComponentVNode)(2,i.Section,{title:"Load Technology to Disk",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return s(!1)}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){s(!1),r("copy_tech",{copy_tech_ID:e.id})},children:"Copy To Disk"})},e.name)}))})}):(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disk Contents",children:"(Technology Data Disk)"})}),l.stored&&(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:l.name}),(0,o.createComponentVNode)(2,i.Box,{children:["Level: ",l.level]}),(0,o.createComponentVNode)(2,i.Box,{children:["Description: ",l.desc]}),(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return r("updt_tech")},children:"Upload to Database"}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return r("clear_tech")},children:"Clear Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_tech")},children:"Eject Disk"})]})]})||(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"This disk has no data stored on it."}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return s(!0)},children:"Load Tech To Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_tech")},children:"Eject Disk"})]})]})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=c.info.designs,s=e.disk;if(!s||!s.present)return null;var m=(0,a.useSharedState)(t,"saveDialogData",!1),p=m[0],f=m[1];return p?(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{title:"Load Design to Disk",target:"design_page"}),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return f(!1)}}),(0,o.createComponentVNode)(2,d,{target:"design_page"})||null],0),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){f(!1),r("copy_design",{copy_design_ID:e.id})},children:"Copy To Disk"})},e.name)}))})]}):(0,o.createComponentVNode)(2,i.Box,{children:s.stored&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lathe Type",children:s.build_type}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Materials",children:Object.keys(s.materials).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e," x ",s.materials[e]]},e)}))})]}),(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return r("updt_design")},children:"Upload to Database"}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return r("clear_design")},children:"Clear Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_design")},children:"Eject Disk"})]})]})||(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{mb:.5,children:"This disk has no data stored on it."}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return f(!0)},children:"Load Design To Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_design")},children:"Eject Disk"})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=e.target,s=e.designs,m=e.buildName,p=e.buildFiveName;return u?(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{target:"builder_page",title:"Designs"}),buttons:(0,o.createComponentVNode)(2,d,{target:"builder_page"}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),s.length?s.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex,{width:"100%",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",style:{"word-wrap":"break-all"},children:e.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"15%",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Button,{mb:-1,icon:"wrench",onClick:function(){return r(m,{build:e.id,imprint:e.id})},children:"Build"}),p&&(0,o.createComponentVNode)(2,i.Button,{mb:-1,onClick:function(){return r(p,{build:e.id,imprint:e.id})},children:"x5"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"45%",style:{"word-wrap":"break-all"},children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:e.mat_list.join(" ")}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"average",ml:1,children:e.chem_list.join(" ")})]})]}),(0,o.createComponentVNode)(2,i.Divider)],4,e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No items could be found matching the parameters (page or search)."})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Error"})},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=e.name,u=null,s=null;if("Protolathe"===d?(u=l.info.linked_lathe,s=l.lathe_designs):(u=l.info.linked_imprinter,s=l.imprinter_designs),!u||!u.present)return(0,o.createComponentVNode)(2,i.Section,{title:d,children:["No ",d," found."]});var p=u,f=p.total_materials,h=p.max_materials,C=p.total_volume,b=p.max_volume,N=p.busy,g=p.mats,V=p.reagents,v=p.queue,y=(0,a.useSharedState)(t,"protoTab",0),k=y[0],_=y[1];return(0,o.createComponentVNode)(2,i.Section,{title:d,buttons:N&&(0,o.createComponentVNode)(2,i.Icon,{name:"sync",spin:!0})||null,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Materials",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:f,maxValue:h,children:[f," cm\xb3 / ",h," cm\xb3"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Chemicals",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:C,maxValue:b,children:[C,"u / ",b,"u"]})})]}),(0,o.createComponentVNode)(2,i.Tabs,{mt:1,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"wrench",selected:0===k,onClick:function(){return _(0)},children:"Build"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"layer-group",iconSpin:N,color:N?"average":"transparent",selected:1===k,onClick:function(){return _(1)},children:"Queue"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"cookie-bite",selected:2===k,onClick:function(){return _(2)},children:"Mat Storage"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"flask",selected:3===k,onClick:function(){return _(3)},children:"Chem Storage"})]}),0===k&&(0,o.createComponentVNode)(2,m,{target:u,designs:s,buildName:"Protolathe"===d?"build":"imprint",buildFiveName:"Protolathe"===d?"buildfive":null})||1===k&&(0,o.createComponentVNode)(2,i.LabeledList,{children:v.length&&v.map((function(e){return 1===e.index?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,labelColor:"bad",children:N?(0,o.createComponentVNode)(2,i.Button,{disabled:!0,icon:"trash",children:"Remove"}):(0,o.createComponentVNode)(2,i.Box,{children:["(Awaiting Materials)",(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"trash",onClick:function(){return c("removeP",{removeP:e.index})},children:"Remove"})]})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return c("removeP",{removeP:e.index})},children:"Remove"})},e.name)}))||(0,o.createComponentVNode)(2,i.Box,{m:1,children:"Queue Empty."})})||2===k&&(0,o.createComponentVNode)(2,i.LabeledList,{children:g.map((function(e){var n=(0,a.useLocalState)(t,"ejectAmt"+e.name,0),l=n[0],d=n[1];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.name),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.NumberInput,{minValue:0,width:"100px",value:l,maxValue:e.sheets,onDrag:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!e.removable,onClick:function(){d(0),c("lathe_ejectsheet",{lathe_ejectsheet:e.name,amount:l})},children:"Num"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!e.removable,onClick:function(){return c("lathe_ejectsheet",{lathe_ejectsheet:e.name,amount:50})},children:"All"})],4),children:[e.amount," cm\xb3"]},e.name)}))})||3===k&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:V.length&&V.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[e.volume,"u",(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eject",onClick:function(){return c("disposeP",{dispose:e.id})},children:"Purge"})]},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Empty",children:"No chems detected"})}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"trash",onClick:function(){return c("disposeallP")},children:"Disposal All Chemicals In Storage"})]})||(0,o.createComponentVNode)(2,i.Box,{children:"Error"})]})},f=[{name:"Protolathe",icon:"wrench",template:(0,o.createComponentVNode)(2,p,{name:"Protolathe"})},{name:"Circuit Imprinter",icon:"digital-tachograph",template:(0,o.createComponentVNode)(2,p,{name:"Circuit Imprinter"})},{name:"Destructive Analyzer",icon:"eraser",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info.linked_destroy;if(!c.present)return(0,o.createComponentVNode)(2,i.Section,{title:"Destructive Analyzer",children:"No destructive analyzer found."});var l=c.loaded_item,d=c.origin_tech;return(0,o.createComponentVNode)(2,i.Section,{title:"Destructive Analyzer",children:l&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Origin Tech",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[e.level,"\xa0\xa0",e.current&&"(Current: "+e.current+")"]},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Error",children:"No origin tech found."})})})]}),(0,o.createComponentVNode)(2,i.Button,{mt:1,color:"red",icon:"eraser",onClick:function(){return r("deconstruct")},children:"Deconstruct Item"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_item")},children:"Eject Item"})]})||(0,o.createComponentVNode)(2,i.Box,{children:"No Item Loaded. Standing-by..."})})}))},{name:"Settings",icon:"cog",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info,l=c.sync,d=c.linked_destroy,u=c.linked_imprinter,s=c.linked_lathe,m=(0,a.useSharedState)(t,"settingsTab",0),p=m[0],f=m[1];return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"cogs",onClick:function(){return f(0)},selected:0===p,children:"General"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"link",onClick:function(){return f(1)},selected:1===p,children:"Device Linkages"})]}),0===p&&(0,o.createComponentVNode)(2,i.Box,{children:[l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"sync",onClick:function(){return r("sync")},children:"Sync Database with Network"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"unlink",onClick:function(){return r("togglesync")},children:"Disconnect from Research Network"})],4)||(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"link",onClick:function(){return r("togglesync")},children:"Connect to Research Network"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"lock",onClick:function(){return r("lock")},children:"Lock Console"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"red",icon:"trash",onClick:function(){return r("reset")},children:"Reset R&D Database"})]})||1===p&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"sync",mb:1,onClick:function(){return r("find_device")},children:"Re-sync with Nearby Devices"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[d.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destructive Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"destroy"})},children:"Disconnect"})})||null,s.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Protolathe",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"lathe"})},children:"Disconnect"})})||null,u.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Circuit Imprinter",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"imprinter"})},children:"Disconnect"})})||null]})]})||(0,o.createComponentVNode)(2,i.Box,{children:"Error"})]})}))},{name:"Research List",icon:"flask",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.tech;return(0,o.createComponentVNode)(2,i.Section,{title:"Current Research Levels",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return r("print",{print:1})},children:"Print This Page"}),children:(0,o.createComponentVNode)(2,i.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{children:[" - Level ",e.level]})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.desc})})]},e.name)}))})})}))},{name:"Design List",icon:"file",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=c.designs;return(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{title:"Researched Technologies & Designs",target:"design_page"}),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return r("print",{print:2})},children:"Print This Page"}),(0,o.createComponentVNode)(2,d,{target:"design_page"})||null],0),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:e.desc},e.name)}))})]})}))},{name:"Disk Operations",icon:"save",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.info),c=r.d_disk,l=r.t_disk;return c.present||l.present?(0,o.createComponentVNode)(2,i.Section,{title:"Disk Operations",children:[(0,o.createComponentVNode)(2,u,{disk:l}),(0,o.createComponentVNode)(2,s,{disk:c})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Disk Operations",children:"No disk inserted."})}))}];t.ResearchConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.busy_msg,u=l.locked,s=(0,a.useSharedState)(t,"rdmenu",0),m=s[0],p=s[1],h=!1;return(d||u)&&(h=!0),(0,o.createComponentVNode)(2,c.Window,{width:850,height:630,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:f.map((function(e,t){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:e.icon,selected:m===t,disabled:h,onClick:function(){return p(t)},children:e.name},t)}))}),d&&(0,o.createComponentVNode)(2,i.Section,{title:"Processing...",children:d})||u&&(0,o.createComponentVNode)(2,i.Section,{title:"Console Locked",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("lock")},icon:"lock-open",children:"Unlock"})})||f[m].template]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResearchServerController=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(19);t.ResearchServerController=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:430,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=(i.badmin,i.servers),l=(i.consoles,(0,r.useSharedState)(t,"selectedServer",null)),u=l[0],s=l[1],m=c.find((function(e){return e.id===u}));return m?(0,o.createComponentVNode)(2,d,{setSelectedServer:s,server:m}):(0,o.createComponentVNode)(2,a.Section,{title:"Server Selection",children:c.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return s(e.id)},children:e.name})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.badmin),c=e.server,l=e.setSelectedServer,d=(0,r.useSharedState)(t,"tab",0),p=d[0],f=d[1];return(0,o.createComponentVNode)(2,a.Section,{title:c.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return l(null)},children:"Back"}),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return f(0)},children:"Access Rights"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return f(1)},children:"Data Management"}),i&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return f(2)},color:"red",children:"Server-to-Server Transfer"})||null]}),0===p&&(0,o.createComponentVNode)(2,u,{server:c})||null,1===p&&(0,o.createComponentVNode)(2,s,{server:c})||null,2===p&&i&&(0,o.createComponentVNode)(2,m,{server:c})||null]})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.server,d=c.consoles,u=function(e,t){return-1!==e.id_with_upload.indexOf(t.id)},s=function(e,t){return-1!==e.id_with_download.indexOf(t.id)};return(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Consoles",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name+" ("+e.loc+")",children:[(0,o.createComponentVNode)(2,a.Button,{icon:u(l,e)?"lock-open":"lock",selected:u(l,e),onClick:function(){return i("toggle_upload",{server:l.ref,console:e.ref})},children:u(l,e)?"Upload On":"Upload Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:s(l,e)?"lock-open":"lock",selected:s(l,e),onClick:function(){return i("toggle_download",{server:l.ref,console:e.ref})},children:s(l,e)?"Download On":"Download Off"})]},e.name)}))})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=(n.data,e.server);return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Research Levels",children:l.tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"trash",color:"red",content:"Reset",onClick:function(){return i("reset_tech",{server:l.ref,tech:e.id})}})},e.name)}))}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Designs",children:(0,c.filter)((function(e){return!!e.name}))(l.designs).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"trash",color:"red",content:"Delete",onClick:function(){return i("reset_design",{server:l.ref,design:e.id})}})},e.name)}))})],4)},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.server,d=c.badmin,u=c.servers;return d?(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Server Data Transfer",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,color:"bad",content:(0,o.createComponentVNode)(2,a.Box,{children:["Transfer from ",l.name," To ",e.name]}),onClick:function(){return i("transfer_data",{server:l.ref,target:e.ref})}})},e.name)}))}):null}},function(e,t,n){"use strict";t.__esModule=!0,t.ResleevingConsole=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=(n(39),n(45)),l=n(3),d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.args),l=c.activerecord,d=c.realname,u=c.obviously_dead,s=c.oocnotes,m=c.can_sleeve_active;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Mind Record ("+d+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return r("modal_close")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!m,icon:"user-plus",content:"Sleeve",onClick:function(){return r("sleeve",{ref:l,mode:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user-plus",content:"Card",onClick:function(){return r("sleeve",{ref:l,mode:2})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"OOC Notes",children:(0,o.createComponentVNode)(2,i.Section,{style:{"word-break":"break-all",height:"100px"},scrollable:!0,children:s})})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.args),l=c.activerecord,d=c.realname,u=c.species,s=c.sex,m=c.mind_compat,p=c.synthetic,f=c.oocnotes,h=c.can_grow_active;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Body Record ("+d+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return r("modal_close")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bio. Sex",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Compat",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Synthetic",children:p?"Yes":"No"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"OOC Notes",children:(0,o.createComponentVNode)(2,i.Section,{style:{"word-break":"break-all",height:"100px"},scrollable:!0,children:f})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{disabled:!h,icon:"user-plus",content:p?"Build":"Grow",onClick:function(){return r("create",{ref:l})}})})]})})};t.ResleevingConsole=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),h=(r.menu,r.coredumped),C=r.emergency,b=(0,o.createFragment)([(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,v),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})],4);return h&&(b=(0,o.createComponentVNode)(2,p)),C&&(b=(0,o.createComponentVNode)(2,f)),(0,c.modalRegisterBodyOverride)("view_b_rec",u),(0,c.modalRegisterBodyOverride)("view_m_rec",d),(0,o.createComponentVNode)(2,l.Window,{width:640,height:520,resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:b})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Body Records"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,icon:"folder",onClick:function(){return r("menu",{num:3})},children:"Mind Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data,i=r.menu,c=r.bodyrecords,l=r.mindrecords;return 1===i?n=(0,o.createComponentVNode)(2,h):2===i?n=(0,o.createComponentVNode)(2,g,{records:c,actToDo:"view_b_rec"}):3===i&&(n=(0,o.createComponentVNode)(2,g,{records:l,actToDo:"view_m_rec"})),n},p=function(e,t){return(0,o.createComponentVNode)(2,i.Dimmer,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",justify:"space-evenly",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Icon,{size:12,color:"bad",name:"exclamation-triangle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,color:"bad",mt:5,children:(0,o.createVNode)(1,"h2",null,"TransCore dump completed. Resleeving offline.",16)})]})})},f=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:(0,o.createVNode)(1,"h1",null,"TRANSCORE DUMP",16)}),(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:(0,o.createVNode)(1,"h2",null,"!!WARNING!!",16)}),(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"This will transfer all minds to the dump disk, and the TransCore will be made unusable until post-shift maintenance! This should only be used in emergencies!"}),(0,o.createComponentVNode)(2,i.Box,{mt:4,children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Disk",color:"good",onClick:function(){return n("ejectdisk")}})}),(0,o.createComponentVNode)(2,i.Box,{mt:4,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Core Dump",confirmContent:"Disable Transcore?",color:"bad",onClick:function(){return n("coredump")}})})]})},h=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);r.loading,r.scantemp,r.occupant,r.locked,r.can_brainscan,r.scan_mode,r.pods,r.selected_pod;return(0,o.createComponentVNode)(2,i.Section,{title:"Pods",level:"2",children:[(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,b)]})},C=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.pods,u=l.spods,s=l.selected_pod;return d&&d.length?d.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:s===e.pod,icon:s===e.pod&&"check",content:"Select",mt:u&&u.length?"2rem":"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):null},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.sleevers,d=c.spods,u=c.selected_sleever;return l&&l.length?l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"sleeve_"+(e.occupied?"occupied":"empty")+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:e.occupied?"label":"bad",children:e.name}),(0,o.createComponentVNode)(2,i.Button,{selected:u===e.sleever,icon:u===e.sleever&&"check",content:"Select",mt:d&&d.length?"3rem":"1.5rem",onClick:function(){return r("selectsleever",{ref:e.sleever})}})]},t)})):null},N=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.spods,u=l.selected_printer;return d&&d.length?d.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:u===e.spod,icon:u===e.spod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectprinter",{ref:e.spod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"synthprinter"+(e.busy?"_working":"")+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.steel>=15e3?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.steel>=15e3?"circle":"circle-o"}),"\xa0",e.steel]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.glass>=15e3?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.glass>=15e3?"circle":"circle-o"}),"\xa0",e.glass]}),n]},t)})):null},g=function(e,t){var n=(0,a.useBackend)(t).act,r=e.records,c=e.actToDo;return r.length?(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:r.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.name,onClick:function(){return n(c,{ref:e.recref})}},t)}))}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},V=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}},v=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.pods,l=r.spods,d=r.sleevers;r.autoallowed,r.autoprocess,r.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pods",children:c&&c.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[c.length," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"SynthFabs",children:l&&l.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[l.length," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sleevers",children:d&&d.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[d.length," Connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResleevingPod=void 0;var o=n(0),r=n(3),a=n(1),i=n(2);t.ResleevingPod=function(e,t){var n=(0,a.useBackend)(t).data,c=n.occupied,l=n.name,d=n.health,u=n.maxHealth,s=n.stat,m=n.mindStatus,p=n.mindName,f=n.resleeveSick,h=n.initialSick;return(0,o.createComponentVNode)(2,r.Window,{width:300,height:350,resizeable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",children:c?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:2===s?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"}):1===s?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unconscious"}):(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},value:d/u,children:[d,"%"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Status",children:m?"Present":"Missing"}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Occupying",children:p}):""]}),f?(0,o.createComponentVNode)(2,i.Box,{color:"average",mt:3,children:["Warning: Resleeving Sickness detected.",h?(0,o.createFragment)([(0,o.createTextVNode)(" Motion Sickness also detected. Please allow the newly resleeved person a moment to get their bearings. This warning will disappear when Motion Sickness is no longer detected.")],4):""]}):""],0):(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Unoccupied."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_detonate_all,p=d.cyborgs,f=void 0===p?[]:p;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:460,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Self Destruct",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",disabled:s,content:"Destroy ALL Cyborgs",color:"bad",onClick:function(){return l("nuke",{})}})]}),(0,o.createComponentVNode)(2,c,{cyborgs:f,can_hack:u})]})})};var c=function(e,t){var n=e.cyborgs,i=(e.can_hack,(0,r.useBackend)(t)),c=i.act,l=i.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return c("hackbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return c("stopbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",disabled:!l.auth,color:"bad",onClick:function(){return c("killbot",{ref:e.ref})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.RogueZones=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.RogueZones=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.timeout_percent,u=l.diffstep,s=l.difficulty,m=l.occupied,p=l.scanning,f=l.updated,h=l.debug,C=l.shuttle_location,b=l.shuttle_at_station,N=l.scan_ready,g=l.can_recall_shuttle;return(0,o.createComponentVNode)(2,i.Window,{width:360,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current Area",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mineral Content",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Location",buttons:g&&(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"rocket",onClick:function(){return c("recall_shuttle")},children:"Recall Shuttle"})||null,children:C}),m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"bad",labelColor:"bad",label:"Personnel",children:["WARNING: Area occupied by ",m," personnel!"]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Personnel",color:"good",children:"No personnel detected."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!N,fluid:!0,icon:"search",onClick:function(){return c("scan_for_new")},children:"Scan For Asteroids"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scn Ramestat Core",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:100,ranges:{good:[100,Infinity],average:[75,100],bad:[-Infinity,75]}})}),p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanning",children:"In progress."})||null,f&&!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Info",children:"Updated shuttle destination!"})||null,h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Debug",labelColor:"bad",children:[(0,o.createComponentVNode)(2,a.Box,{children:["Timeout Percent: ",d]}),(0,o.createComponentVNode)(2,a.Box,{children:["Diffstep: ",u]}),(0,o.createComponentVNode)(2,a.Box,{children:["Difficulty: ",s]}),(0,o.createComponentVNode)(2,a.Box,{children:["Occupied: ",m]}),(0,o.createComponentVNode)(2,a.Box,{children:["Debug: ",h]}),(0,o.createComponentVNode)(2,a.Box,{children:["Shuttle Location: ",C]}),(0,o.createComponentVNode)(2,a.Box,{children:["Shuttle at station: ",b]}),(0,o.createComponentVNode)(2,a.Box,{children:["Scan Ready: ",N]})]})||null]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Secbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Secbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.idcheck,p=l.check_records,f=l.check_arrest,h=l.arrest_type,C=l.declare_arrests,b=l.will_patrol;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:320,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Security Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check for Weapon Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"toggle-on":"toggle-off",selected:m,onClick:function(){return c("idcheck")},children:m?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check Security Records",children:(0,o.createComponentVNode)(2,a.Button,{icon:p?"toggle-on":"toggle-off",selected:p,onClick:function(){return c("ignorerec")},children:p?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check Arrest Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("ignorearr")},children:f?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Operating Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("switchmode")},children:h?"Detain":"Arrest"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Report Arrests",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("declarearrests")},children:C?"Yes":"No"})}),b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Patrol",children:(0,o.createComponentVNode)(2,a.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return c("patrol")},children:b?"Yes":"No"})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(1),a=n(2),i=n(45),c=n(3),l=n(131),d=n(132),u=n(62),s=(n(8),function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})});t.SecurityRecords=function(e,t){var n,s=(0,r.useBackend)(t).data,h=s.authenticated,C=s.screen;return h?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,p):4===C&&(n=(0,o.createComponentVNode)(2,f)),(0,o.createComponentVNode)(2,c.Window,{width:700,height:680,resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal,{maxHeight:"100%",maxWidth:"400px"}),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,u.TemporaryNotice),(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,a.Section,{height:"89%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{width:700,height:680,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return i("search",{t1:t})}}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",color:e.color,content:e.id+": "+e.name+" (Criminal Status: "+e.criminal+")",onClick:function(){return i("d_rec",{d_rec:e.ref})}},t)}))})],4)},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Security Records",onClick:function(){return n("del_all")}})],4)},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.security,d=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,h)}),(0,o.createComponentVNode)(2,a.Section,{title:"Security Data",level:2,children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Security Record",color:"bad",onClick:function(){return i("del_r")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Record (All)",color:"bad",onClick:function(){return i("del_r_2")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Entry",ml:"0.5rem",onClick:function(){return i("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return i("screen",{screen:2})}})]})],4)},h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.general;return c&&c.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:c.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,a.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return s(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"right",textAlign:"right",children:[!!c.has_photos&&c.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e.substr(1,e.length-1),style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)})),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("photo_front")},children:"Update Front Photo"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("photo_side")},children:"Update Side Photo"})]})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[e.value,(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return s(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,a.Button,{icon:"comment",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,i.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Security records lost!",(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},b=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedStorage=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8),l=n(19);t.SeedStorage=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(u.scanner,u.seeds),m=(0,l.sortBy)((function(e){return e.name.toLowerCase()}))(s);return(0,o.createComponentVNode)(2,i.Window,{width:600,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Seeds",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mt:-1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"60%",children:(0,o.createComponentVNode)(2,a.Collapsible,{title:(0,c.toTitleCase)(e.name)+" #"+e.uid,children:(0,o.createComponentVNode)(2,a.Section,{width:"165%",title:"Traits",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:Object.keys(e.traits).map((function(t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.toTitleCase)(t),children:e.traits[t]},t)}))})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.4,children:[e.amount," Remaining"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",onClick:function(){return d("vend",{id:e.id})},children:"Vend"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"trash",onClick:function(){return d("purge",{id:e.id})},children:"Purge"})})]},e.name+e.uid)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShieldCapacitor=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(5),l=n(21);t.ShieldCapacitor=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.time_since_fail,p=u.stored_charge,f=u.max_charge,h=u.charge_rate,C=u.max_charge_rate;return(0,o.createComponentVNode)(2,a.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,content:s?"Online":"Offline",onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitor Status",children:m>2?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"OK."}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Discharging!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stored Energy",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:p,format:function(e){return(0,l.formatSiUnit)(e,0,"J")}})," (",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:100*(0,c.round)(p/f,1)}),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:h,step:100,stepPixelSize:.2,minValue:1e4,maxValue:C,format:function(e){return(0,l.formatPower)(e)},onDrag:function(e,t){return d("charge_rate",{rate:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShieldGenerator=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(5),l=n(21),d=n(61);t.ShieldGenerator=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,a.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:i?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)})})};var u=function(e,t){return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"Locked",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"})}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:"Swipe your ID to begin."})]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data.lockedData,u=d.capacitors,s=d.active,m=d.failing,p=d.radius,f=d.max_radius,h=d.z_range,C=d.max_z_range,b=d.average_field_strength,N=d.target_field_strength,g=d.max_field_strength,V=d.shields,v=d.upkeep,y=d.strengthen_rate,k=d.max_strengthen_rate,_=d.gen_power,x=(u||[]).length;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Field Status",children:m?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Unstable"}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Stable"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Overall Field Strength",children:[(0,c.round)(b,2)," Renwick (",N&&(0,c.round)(100*b/N,1)||"NA","%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Upkeep Power",children:(0,l.formatPower)(v)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shield Generation Power",children:(0,l.formatPower)(_)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Currently Shielded",children:[V," m\xb2"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:x?u.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitor #"+t,children:[e.active?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Offline"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge",children:[(0,l.formatSiUnit)(e.stored_charge,0,"J")," (",100*(0,c.round)(e.stored_charge/e.max_charge,2),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.failing?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Discharging"}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"OK."})})]})]},t)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No Capacitors Connected"})})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"Online":"Offline",selected:s,onClick:function(){return a("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Coverage Radius",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:6,minValue:0,maxValue:f,value:p,unit:"m",onDrag:function(e,t){return a("change_radius",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vertical Shielding",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:0,maxValue:C,value:h,unit:"vertical range",onDrag:function(e,t){return a("z_range",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:0,step:.1,maxValue:k,value:y,format:function(e){return(0,c.round)(e,1)},unit:"Renwick/s",onDrag:function(e,t){return a("strengthen_rate",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maximum Field Strength",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:1,maxValue:g,value:N,unit:"Renwick",onDrag:function(e,t){return a("target_field_strength",{val:t})}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleControl=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=function(e,t){var n="ERROR",r="bad",a=!1;return"docked"===e?(n="DOCKED",r="good"):"docking"===e?(n="DOCKING",r="average",a=!0):"undocking"===e?(n="UNDOCKING",r="average",a=!0):"undocked"===e&&(n="UNDOCKED",r="#676767"),a&&t&&(n+="-MANUAL"),(0,o.createComponentVNode)(2,i.Box,{color:r,children:n})},d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,d=e.engineName,u=void 0===d?"Bluespace Drive":d,s=c.shuttle_status,m=c.shuttle_state,p=c.has_docking,f=c.docking_status,h=c.docking_override,C=c.docking_codes;return(0,o.createComponentVNode)(2,i.Section,{title:"Shuttle Status",children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",mb:1,children:s}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u,children:"idle"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#676767",bold:!0,children:"IDLE"})||"warmup"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"SPINNING UP"})||"in_transit"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"ENGAGED"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"})}),p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Status",children:l(f,h)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Codes",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return r("set_codes")},children:C||"Not Set"})})],4)||null]})]})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_launch,d=c.can_cancel,u=c.can_force;return(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("move")},disabled:!l,icon:"rocket",fluid:!0,children:"Launch Shuttle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("cancel")},disabled:!d,icon:"ban",fluid:!0,children:"Cancel Launch"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("force")},color:"bad",disabled:!u,icon:"exclamation-triangle",fluid:!0,children:"Force Launch"})})]})})},s={ShuttleControlConsoleDefault:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleMulti:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_cloak,s=c.can_pick,m=c.legit,p=c.cloaked,f=c.destination_name;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.Section,{title:"Multishuttle Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:m?"ATC Inhibitor":"Cloaking",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"eye":"eye-o",onClick:function(){return r("toggle_cloaked")},children:p?"Enabled":"Disabled"})})||null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Destination",children:(0,o.createComponentVNode)(2,i.Button,{icon:"taxi",disabled:!s,onClick:function(){return r("pick")},children:f})})]})}),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleExploration:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_pick,s=c.destination_name,m=c.fuel_usage,p=c.fuel_span,f=c.remaining_fuel;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{engineName:"Engines"}),(0,o.createComponentVNode)(2,i.Section,{title:"Jump Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Destination",children:(0,o.createComponentVNode)(2,i.Button,{icon:"taxi",disabled:!l,onClick:function(){return r("pick")},children:s})}),m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Est. Delta-V Budget",color:p,children:[f," m/s"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Avg. Delta-V Per Maneuver",children:[m," m/s"]})],4)||null]})}),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleWeb:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.autopilot,s=d.can_rename,m=d.shuttle_state,p=d.is_moving,f=d.skip_docking,h=d.docking_status,C=d.docking_override,b=d.shuttle_location,N=d.can_cloak,g=d.cloaked,V=d.can_autopilot,v=d.routes,y=d.is_in_transit,k=d.travel_progress,_=d.time_left,x=d.doors,L=d.sensors;return(0,o.createFragment)([u&&(0,o.createComponentVNode)(2,i.Section,{title:"AI PILOT (CLASS D) ACTIVE",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,italic:!0,children:"This vessel will start and stop automatically. Ensure that all non-cycling capable hatches and doors are closed, as the automated system may not be able to control them. Docking and flight controls are locked. To unlock, disable the automated flight system."})})||null,(0,o.createComponentVNode)(2,i.Section,{title:"Shuttle Status",buttons:s&&(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("rename_command")},children:"Rename"})||null,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Engines",children:"idle"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#676767",bold:!0,children:"IDLE"})||"warmup"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"SPINNING UP"})||"in_transit"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"ENGAGED"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"})}),!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Location",children:(0,r.toTitleCase)(b)}),!f&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{selected:"docked"===h,disabled:"undocked"!==h&&"docked"!==h,onClick:function(){return c("dock_command")},children:"Dock"}),(0,o.createComponentVNode)(2,i.Button,{selected:"undocked"===h,disabled:"docked"!==h&&"undocked"!==h,onClick:function(){return c("undock_command")},children:"Undock"})],4),children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,inline:!0,children:l(h,C)})})||null,N&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cloaking",children:(0,o.createComponentVNode)(2,i.Button,{selected:g,icon:g?"eye":"eye-o",onClick:function(){return c("toggle_cloaked")},children:g?"Enabled":"Disabled"})})||null,V&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Autopilot",children:(0,o.createComponentVNode)(2,i.Button,{selected:u,icon:u?"eye":"eye-o",onClick:function(){return c("toggle_autopilot")},children:u?"Enabled":"Disabled"})})||null],0)||null]}),!p&&(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Available Destinations",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:v.length&&v.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"rocket",onClick:function(){return c("traverse",{traverse:e.index})},children:e.travel_time})},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Error",color:"bad",children:"No routes found."})})})||null]}),y&&(0,o.createComponentVNode)(2,i.Section,{title:"Transit ETA",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Distance from target",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",minValue:0,maxValue:100,value:k,children:[_,"s"]})})})})||null,Object.keys(x).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Hatch Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(x).map((function(e){var t=x[e];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[t.open&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"Open"})||(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Closed"}),"\xa0-\xa0",t.bolted&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Bolted"})||(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"Unbolted"})]},e)}))})})||null,Object.keys(L).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Sensors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(L).map((function(e){var t=L[e];return-1!==t.reading?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,color:"bad",children:"Unable to get sensor air reading."}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:[t.pressure,"kPa"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[t.temp,"\xb0C"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:[t.oxygen,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:[t.nitrogen,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:[t.carbon_dioxide,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Phoron",children:[t.phoron,"%"]}),t.other&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:[t.other,"%"]})||null]})},e)}))})})||null],0)}))};t.ShuttleControl=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.subtemplate);return(0,o.createComponentVNode)(2,c.Window,{width:470,height:"ShuttleControlConsoleWeb"===r?560:370,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:s[r]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.Signaler=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.code,s=d.frequency,m=d.minFrequency,p=d.maxFrequency;return(0,o.createComponentVNode)(2,c.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{size:1.4,color:"label",children:"Frequency:"}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}})})]}),(0,o.createComponentVNode)(2,i.Grid,{mt:.6,children:[(0,o.createComponentVNode)(2,i.Grid.Column,{size:1.4,color:"label",children:"Code:"}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}})})]}),(0,o.createComponentVNode)(2,i.Grid,{mt:.8,children:(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{mb:-.1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return l("signal")}})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,b));return(0,o.createComponentVNode)(2,c.Window,{width:550,height:820,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:r})})};var m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=(r.occupant,r.dialysis),c=r.stomachpumping;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,h,{title:"Dialysis",active:i,actToDo:"togglefilter"}),(0,o.createComponentVNode)(2,h,{title:"Stomach Pump",active:c,actToDo:"togglepump"}),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead,p=d.stasis;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}}),(0,o.createComponentVNode)(2,i.Button,{content:p,onClick:function(){return c("changestasis")}})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},f=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.isBeakerLoaded,d=c.beakerMaxSpace,u=c.beakerFreeSpace,s=e.active,m=e.actToDo,p=e.title,f=s&&u>0;return(0,o.createComponentVNode)(2,i.Section,{title:p,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{disabled:!l||u<=0,selected:f,icon:f?"toggle-on":"toggle-off",content:f?"Active":"Inactive",onClick:function(){return r(m)}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:l?(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:d,value:u/d,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[u,"u"]})})}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.occupant,d=c.chemicals,u=c.maxchem,s=c.amounts;return(0,o.createComponentVNode)(2,i.Section,{title:"Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,i.Box,{color:"average",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,i.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,i.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:t,mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.isBeakerLoaded;return(0,o.createComponentVNode)(2,i.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected.",c&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Remove Beaker",onClick:function(){return r("removebeaker")}})})||null]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(0),r=n(19),a=n(1),i=n(2),c=n(3);t.SmartVend=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.config,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Storage",children:[u.secure&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:-1===u.locked,info:-1!==u.locked,children:-1===u.locked?(0,o.createComponentVNode)(2,i.Box,{children:"Sec.re ACC_** //):securi_nt.diag=>##'or 1=1'%($..."}):(0,o.createComponentVNode)(2,i.Box,{children:"Secure Access: Please have your identification ready."})})||null,0===u.contents.length&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Unfortunately, this ",d.title," is empty."]})||(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Item"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:"Amount"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:"Dispense"})]}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," in stock"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,i.Button,{content:"1",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index,amount:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"5",disabled:e.amount<5,onClick:function(){return l("Release",{index:e.index,amount:5})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index})}}),(0,o.createComponentVNode)(2,i.Button,{content:"All",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index,amount:e.amount})}})]})]},t)}))(u.contents)]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),i=n(21),c=n(3),l=n(5);t.Smes=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.capacityPercent,m=u.capacity,p=u.charge,f=u.inputAttempt,h=u.inputting,C=u.inputLevel,b=u.inputLevelMax,N=u.inputAvailable,g=u.outputAttempt,V=u.outputting,v=u.outputLevel,y=u.outputLevelMax,k=u.outputUsed,_=(s>=100?"good":h&&"average")||"bad",x=(V?"good":p>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{width:340,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*s,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[(0,l.round)(p/6e4,1)," kWh / ",(0,l.round)(m/6e4)," kWh (",s,"%)"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:f?"sync-alt":"times",selected:f,onClick:function(){return d("tryinput")},children:f?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:(s>=100?"Fully Charged":h&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===C,onClick:function(){return d("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===C,onClick:function(){return d("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:C/1e3,fillValue:N/1e3,minValue:0,maxValue:b/1e3,step:5,stepPixelSize:4,format:function(e){return(0,i.formatPower)(1e3*e,1)},onDrag:function(e,t){return d("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:C===b,onClick:function(){return d("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:C===b,onClick:function(){return d("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,i.formatPower)(N)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return d("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:x,children:V?"Sending":p>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===v,onClick:function(){return d("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===v,onClick:function(){return d("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:v/1e3,minValue:0,maxValue:y/1e3,step:5,stepPixelSize:4,format:function(e){return(0,i.formatPower)(1e3*e,1)},onDrag:function(e,t){return d("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:v===y,onClick:function(){return d("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:v===y,onClick:function(){return d("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,i.formatPower)(k)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(5);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.generated,s=d.generated_ratio,m=d.sun_angle,p=d.array_angle,f=d.rotation_rate,h=d.max_rotation_rate,C=d.tracking_state,b=d.connected_panels,N=d.connected_tracker;return(0,o.createComponentVNode)(2,i.Window,{width:380,height:230,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return l("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:N?"good":"bad",children:N?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:b>0?"good":"bad",children:b})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:s,children:u+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Star orientation",children:[m,"\xb0"]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracking",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===C,onClick:function(){return l("tracking",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===C,onClick:function(){return l("tracking",{mode:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===C,disabled:!N,onClick:function(){return l("tracking",{mode:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Azimuth",children:[(0===C||1===C)&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"52px",unit:"\xb0",step:1,stepPixelSize:2,minValue:-360,maxValue:720,value:p,format:function(e){var t=Math.sign(e)>0?" (CW)":" (CCW)";return Math.abs((0,c.round)(e))+t},onDrag:function(e,t){return l("azimuth",{value:t})}}),1===C&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"80px",unit:"deg/h",step:1,minValue:-h-.01,maxValue:h+.01,value:f,format:function(e){var t=Math.sign(e)>0?" (CW)":" (CCW)";return Math.abs((0,c.round)(e))+t},onDrag:function(e,t){return l("azimuth_rate",{value:t})}}),2===C&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mt:"3px",children:[p+"\xb0"," (auto)"]})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpaceHeater=void 0;var o=n(0),r=n(39),a=n(1),i=n(2),c=n(3);t.SpaceHeater=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.temp,s=d.minTemp,m=d.maxTemp,p=d.cell,f=d.power;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Temperature",children:[u," K (",u-r.T0C,"\xb0 C)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Charge",children:[f,"% ",!p&&"(No Cell Inserted)"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.LabeledControls,{children:[(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Thermostat",children:(0,o.createComponentVNode)(2,i.Knob,{animated:!0,value:u-r.T0C,minValue:s-r.T0C,maxValue:m-r.T0C,unit:"C",onChange:function(e,t){return l("temp",{newtemp:t+r.T0C})}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Cell",children:p?(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Cell",onClick:function(){return l("cellremove")}}):(0,o.createComponentVNode)(2,i.Button,{icon:"car-battery",content:"Insert Cell",onClick:function(){return l("cellinstall")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitCycler=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.SuitCycler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),s=a.active,m=a.locked,p=a.uv_active,f=(0,o.createComponentVNode)(2,c);return p?f=(0,o.createComponentVNode)(2,l):m?f=(0,o.createComponentVNode)(2,d):s&&(f=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.Window,{width:320,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:f})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.safeties,d=c.occupied,u=c.suit,s=c.helmet,m=c.departments,p=c.species,f=c.uv_level,h=c.max_uv_level,C=c.can_repair,b=c.damage;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Storage",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock",onClick:function(){return i("lock")}}),children:[!(!d||!l)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Biological entity detected in suit chamber. Please remove before continuing with operation.",(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",color:"red",content:"Eject Entity",onClick:function(){return i("eject_guy")}})]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"square":"square-o",content:s||"Empty",disabled:!s,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"square":"square-o",content:u||"Empty",disabled:!u,onClick:function(){return i("dispense",{item:"suit"})}})}),C&&b?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit Damage",children:[b,(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"Repair",onClick:function(){return i("repair_suit")}})]}):null]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Customization",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Paintjob",children:(0,o.createComponentVNode)(2,a.Dropdown,{noscroll:!0,width:"100%",options:m,selected:m[0],onSelected:function(e){return i("department",{department:e})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Species",children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"100%",maxHeight:"160px",options:p,selected:p[0],onSelected:function(e){return i("species",{species:e})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,content:"Customize",onClick:function(){return i("apply_paintjob")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"UV Decontamination",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Level",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"50px",value:f,minValue:1,maxValue:h,stepPixelSize:30,onChange:function(e,t){return i("radlevel",{radlevel:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Decontaminate",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",disabled:d&&l,textAlign:"center",onClick:function(){return i("uv")}})})]})})],4)},l=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.model_text,d=c.userHasAccess;return(0,o.createComponentVNode)(2,a.Section,{title:"Locked",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:["The ",l," suit cycler is currently locked. Please contact your system administrator."]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",content:"[Unlock]",disabled:!d,onClick:function(){return i("lock")}})})]})},u=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being painted. Please wait."})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorageUnit=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.SuitStorageUnit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),s=a.panelopen,m=a.uv_active,p=a.broken,f=(0,o.createComponentVNode)(2,c);return s?f=(0,o.createComponentVNode)(2,l):m?f=(0,o.createComponentVNode)(2,d):p&&(f=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.Window,{width:400,height:365,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:f})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.locked,d=c.open,u=c.safeties,s=c.occupied,m=c.suit,p=c.helmet,f=c.mask;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",minHeight:"260px",buttons:(0,o.createFragment)([!d&&(0,o.createComponentVNode)(2,a.Button,{icon:l?"unlock":"lock",content:l?"Unlock":"Lock",onClick:function(){return i("lock")}}),!l&&(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"sign-in-alt",content:d?"Close":"Open",onClick:function(){return i("door")}})],0),children:[!(!s||!u)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Biological entity detected in suit chamber. Please remove before continuing with operation.",(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",color:"red",content:"Eject Entity",onClick:function(){return i("eject_guy")}})]}),l&&(0,o.createComponentVNode)(2,a.Box,{mt:6,bold:!0,textAlign:"center",fontSize:"40px",children:[(0,o.createComponentVNode)(2,a.Box,{children:"Unit Locked"}),(0,o.createComponentVNode)(2,a.Icon,{name:"lock"})]})||d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:p?"square":"square-o",content:p||"Empty",disabled:!p,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"square":"square-o",content:m||"Empty",disabled:!m,onClick:function(){return i("dispense",{item:"suit"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"square":"square-o",content:f||"Empty",disabled:!f,onClick:function(){return i("dispense",{item:"mask"})}})})]})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",content:"Decontaminate",disabled:s&&u,textAlign:"center",onClick:function(){return i("uv")}})]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.safeties,d=c.uv_super;return(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Panel",children:[(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"The panel is ridden with controls, button and meters, labeled in strange signs and symbols that you cannot understand. Probably the manufactoring world's language. Among other things, a few controls catch your eye."}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{children:["A small dial with a biohazard symbol next to it. It's pointing towards a gauge that reads ",d?"15nm":"185nm",".",(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Knob,{size:2,inline:!0,value:d,minValue:0,maxValue:1,step:1,stepPixelSize:40,color:d?"red":"green",format:function(e){return e?"15nm":"185nm"},onChange:function(e,t){return i("toggleUV")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:"biohazard",size:3,color:"orange"})})]})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{children:["A thick old-style button, with 2 grimy LED lights next to it. The ",l?(0,o.createVNode)(1,"font",null,"GREEN",16,{color:"green"}):(0,o.createVNode)(1,"font",null,"RED",16,{color:"red"})," LED is on.",(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fontSize:"2rem",color:"grey",inline:!0,icon:"caret-square-right",style:{border:"4px solid #777","border-style":"outset"},onClick:function(){return i("togglesafeties")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"circle",color:l?"black":"red",mr:2}),(0,o.createComponentVNode)(2,a.Icon,{name:"circle",color:l?"green":"black"})]})]})]})]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})},u=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance."})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupplyConsole=void 0;var o=n(0),r=n(19),a=(n(5),n(21)),i=n(1),c=n(2),l=n(45),d=n(3),u=n(44),s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supply_points,l=e.args,d=l.name,u=l.cost,s=l.manifest,m=l.ref,p=l.random;return(0,o.createComponentVNode)(2,c.Section,{width:"400px",level:2,m:"-1rem",pb:"1rem",title:d,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"shopping-cart",content:"Buy - "+u+" points",disabled:u>a,onClick:function(){return r("request_crate",{ref:m})}}),children:(0,o.createComponentVNode)(2,c.Section,{title:"Contains"+(p?" any "+p+" of:":""),scrollable:!0,height:"200px",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e},e)}))})})};t.SupplyConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,l.modalRegisterBodyOverride)("view_crate",s),(0,o.createComponentVNode)(2,d.Window,{width:700,height:620,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"100%"}),(0,o.createComponentVNode)(2,c.Section,{title:"Supply Records",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})]})})};var m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.supply_points,u=l.shuttle,s=null,m=!1;return l.shuttle_auth&&(1===u.launch&&0===u.mode?s=(0,o.createComponentVNode)(2,c.Button,{icon:"rocket",content:"Send Away",onClick:function(){return r("send_shuttle",{mode:"send_away"})}}):2!==u.launch||3!==u.mode&&1!==u.mode?1===u.launch&&5===u.mode&&(s=(0,o.createComponentVNode)(2,c.Button,{icon:"rocket",content:"Send Shuttle",onClick:function(){return r("send_shuttle",{mode:"send_to_station"})}})):s=(0,o.createComponentVNode)(2,c.Button,{icon:"ban",content:"Cancel Launch",onClick:function(){return r("send_shuttle",{mode:"cancel_shuttle"})}}),u.force&&(m=!0)),(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Supply Points",children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Supply Shuttle",mt:2,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",buttons:(0,o.createFragment)([s,m?(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-triangle",content:"Force Launch",onClick:function(){return r("send_shuttle",{mode:"force_shuttle"})}}):null],0),children:u.location}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Engine",children:u.engine}),4===u.mode?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"ETA",children:u.time>1?(0,a.formatTime)(u.time):"LATE"}):null]})})]})},p=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.order_auth,(0,i.useLocalState)(t,"tabIndex",0)),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"box",selected:0===a,onClick:function(){return l(0)},children:"Request"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"check-circle-o",selected:1===a,onClick:function(){return l(1)},children:"Accepted"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"circle-o",selected:2===a,onClick:function(){return l(2)},children:"Requests"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"book",selected:3===a,onClick:function(){return l(3)},children:"Order history"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"book",selected:4===a,onClick:function(){return l(4)},children:"Export history"})]}),0===a?(0,o.createComponentVNode)(2,f):null,1===a?(0,o.createComponentVNode)(2,h,{mode:"Approved"}):null,2===a?(0,o.createComponentVNode)(2,h,{mode:"Requested"}):null,3===a?(0,o.createComponentVNode)(2,h,{mode:"All"}):null,4===a?(0,o.createComponentVNode)(2,C):null]})},f=function(e,t){var n=(0,i.useBackend)(t),a=n.act,l=n.data,d=l.categories,s=l.supply_packs,m=l.contraband,p=l.supply_points,f=(0,i.useLocalState)(t,"activeCategory",null),h=f[0],C=f[1],b=(0,u.flow)([(0,r.filter)((function(e){return e.group===h})),(0,r.filter)((function(e){return!e.contraband||m})),(0,r.sortBy)((function(e){return e.name})),(0,r.sortBy)((function(e){return e.cost>p}))])(s);return(0,o.createComponentVNode)(2,c.Section,{level:2,children:(0,o.createComponentVNode)(2,c.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"25%",children:(0,o.createComponentVNode)(2,c.Section,{title:"Categories",scrollable:!0,fill:!0,height:"290px",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:e,selected:e===h,onClick:function(){return C(e)}},e)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Section,{title:"Contents",scrollable:!0,fill:!0,height:"290px",children:b.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",justify:"flex-start",spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"70%",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"shopping-cart",ellipsis:!0,content:e.name,color:e.cost>p?"red":null,onClick:function(){return a("request_crate",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{content:"#",color:e.cost>p?"red":null,onClick:function(){return a("request_crate_multi",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{content:"C",color:e.cost>p?"red":null,onClick:function(){return a("view_crate",{crate:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:[e.cost," points"]})]})},e.name)}))})})]})})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=e.mode,d=a.orders,u=a.order_auth,s=a.supply_points,m=d.filter((function(e){return e.status===l||"All"===l}));return m.length?(0,o.createComponentVNode)(2,c.Section,{level:2,children:["Requested"===l&&u?(0,o.createComponentVNode)(2,c.Button,{mt:-1,mb:1,fluid:!0,color:"red",icon:"trash",content:"Clear all requests",onClick:function(){return r("clear_all_requests")}}):null,m.map((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{title:"Order "+(t+1),buttons:"All"===l&&u?(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"trash",content:"Delete Record",onClick:function(){return r("delete_order",{ref:e.ref})}}):null,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[e.entries.map((function(t){return t.entry?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.field,buttons:u?(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){r("edit_order_value",{ref:e.ref,edit:t.field,"default":t.entry})}}):null,children:t.entry}):null})),"All"===l?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:e.status}):null]}),u&&"Requested"===l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"check",content:"Approve",disabled:e.cost>s,onClick:function(){return r("approve_order",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Deny",onClick:function(){return r("deny_order",{ref:e.ref})}})],4):null]},t)}))]}):(0,o.createComponentVNode)(2,c.Section,{level:2,children:"No orders found."})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.receipts,d=a.order_auth;return l.length?(0,o.createComponentVNode)(2,c.Section,{level:2,children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[e.title.map((function(t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.field,buttons:d?(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){return r("export_edit",{ref:e.ref,edit:t.field,"default":t.entry})}}):null,children:t.entry},t.field)})),e.error?(0,o.createComponentVNode)(2,c.LabeledList.Item,{labelColor:"red",label:"Error",children:e.error}):e.contents.map((function(t,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.object,buttons:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){return r("export_edit_field",{ref:e.ref,index:n+1,edit:"meow","default":t.object})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"red",content:"Delete",onClick:function(){return r("export_delete_field",{ref:e.ref,index:n+1})}})],4):null,children:[t.quantity,"x -> ",t.value," points"]},n)}))]}),d?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"plus",content:"Add Item To Record",onClick:function(){return r("export_add_field",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete Record",onClick:function(){return r("export_delete",{ref:e.ref})}})],4):null]},t)}))}):(0,o.createComponentVNode)(2,c.Section,{level:2,children:"No receipts found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEGenerator=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.TEGenerator=function(e,t){var n=(0,a.useBackend)(t).data,r=n.totalOutput,u=n.maxTotalOutput,s=n.thermalOutput,m=n.primary,p=n.secondary;return(0,o.createComponentVNode)(2,c.Window,{width:550,height:310,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Output",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:r,maxValue:u,children:(0,l.formatPower)(r)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermal Output",children:(0,l.formatPower)(s)})]})}),m&&p?(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,grow:1,children:(0,o.createComponentVNode)(2,d,{name:"Primary Circulator",values:m})}),(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,grow:1,children:(0,o.createComponentVNode)(2,d,{name:"Secondary Circulator",values:p})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning! Both circulators must be connected in order to operate this machine."})]})})};var d=function(e,t){var n=e.name,a=e.values,c=a.dir,d=a.output,u=a.flowCapacity,s=a.inletPressure,m=a.inletTemperature,p=a.outletPressure,f=a.outletTemperature;return(0,o.createComponentVNode)(2,i.Section,{title:n+" ("+c+")",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Turbine Output",children:(0,l.formatPower)(d)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Flow Capacity",children:[(0,r.round)(u,2),"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inlet Pressure",children:(0,l.formatSiUnit)(1e3*s,0,"Pa")}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inlet Temperature",children:[(0,r.round)(m,2)," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outlet Pressure",children:(0,l.formatSiUnit)(1e3*p,0,"Pa")}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outlet Temperature",children:[(0,r.round)(f,2)," K"]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Tank=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.connected,u=l.maskConnected,s=l.tankPressure,m=l.releasePressure,p=l.defaultReleasePressure,f=l.minReleasePressure,h=l.maxReleasePressure;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:320,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"air-freshener":"lock-open",selected:d,disabled:!u,content:"Mask Release Valve",onClick:function(){return c("toggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask Connected",children:u?"Yes":"No"})})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:l.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:m===f,onClick:function(){return c("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(m),width:"65px",unit:"kPa",minValue:f,maxValue:h,onChange:function(e,t){return c("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:m===h,onClick:function(){return c("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:m===p,onClick:function(){return c("pressure",{pressure:"reset"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:275,height:103,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Phoron",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.plasma?"square":"square-o",content:"Dispense",disabled:!l.plasma,onClick:function(){return c("plasma")}}),children:l.plasma}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.oxygen?"square":"square-o",content:"Dispense",disabled:!l.oxygen,onClick:function(){return c("oxygen")}}),children:l.oxygen})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsLogBrowser=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.TelecommsLogBrowser=function(e,t){var n=(0,a.useBackend)(t),r=n.act,u=n.data,s=u.universal_translate,m=u.network,p=u.temp,f=u.servers,h=u.selectedServer;return(0,o.createComponentVNode)(2,c.Window,{width:575,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p&&p.length?(0,o.createComponentVNode)(2,i.NoticeBox,{warning:!0,children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-box",verticalAlign:"middle",children:p}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return r("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]}):null,(0,o.createComponentVNode)(2,i.Section,{title:"Network Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Network",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"search",content:"Refresh",onClick:function(){return r("scan")}}),(0,o.createComponentVNode)(2,i.Button,{color:"bad",icon:"exclamation-triangle",content:"Flush Buffer",disabled:0===f.length,onClick:function(){return r("release")}})],4),children:(0,o.createComponentVNode)(2,i.Button,{content:m,icon:"pen",onClick:function(){return r("network")}})})})}),h?(0,o.createComponentVNode)(2,d,{network:m,server:h,universal_translate:s}):(0,o.createComponentVNode)(2,l,{network:m,servers:f})]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.network,e.servers);return c&&c.length?(0,o.createComponentVNode)(2,i.Section,{title:"Detected Telecommunication Servers",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name+" ("+e.id+")",children:(0,o.createComponentVNode)(2,i.Button,{content:"View",icon:"eye",onClick:function(){return r("view",{id:e.id})}})},e.id)}))})}):(0,o.createComponentVNode)(2,i.Section,{title:"Detected Telecommunications Servers",children:[(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No servers detected."}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Scan",icon:"search",onClick:function(){return r("scan")}})]})},d=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=(n.data,e.network,e.server),d=e.universal_translate;return(0,o.createComponentVNode)(2,i.Section,{title:"Server ("+l.id+")",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Return",icon:"undo",onClick:function(){return c("mainmenu")}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Recorded Traffic",children:l.totalTraffic>=1024?(0,r.round)(l.totalTraffic/1024)+" Terrabytes":l.totalTraffic+" Gigabytes"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Stored Logs",mt:"4px",children:(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:l.logs&&l.logs.length?l.logs.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{m:"2px",basis:"49%",grow:e.id%2,children:(0,o.createComponentVNode)(2,i.Section,{title:d||e.parameters.uspeech||e.parameters.intelligible||"Execution Error"===e.input_type?e.input_type:"Audio File",buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{confirmContent:"Delete Log?",color:"bad",icon:"trash",confirmIcon:"trash",onClick:function(){return c("delete",{id:e.id})}}),children:"Execution Error"===e.input_type?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data type",children:"Error"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output",children:e.parameters.message}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Delete",children:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return c("delete",{id:e.id})}})})]}):d||e.parameters.uspeech||e.parameters.intelligible?(0,o.createComponentVNode)(2,u,{log:e}):(0,o.createComponentVNode)(2,u,{error:!0})})},e.id)})):"No Logs Detected."})})]})},u=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data,e.log),c=e.error,l=r&&r.parameters||{none:"none"},d=l.timecode,u=l.name,s=l.race,m=l.job,p=l.message;return c?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Recieved",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Source",children:"Unidentifiable"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Class",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",children:"Unintelligible"})]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Recieved",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Source",children:[u," (Job: ",m,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Class",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",className:"LabeledList__breakContents",children:p})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsMachineBrowser=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.TelecommsMachineBrowser=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.network,s=d.temp,m=d.machinelist,p=d.selectedMachine;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[s&&s.length?(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-box",verticalAlign:"middle",children:s}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return l("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]}):null,(0,o.createComponentVNode)(2,a.Section,{title:"Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Network",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Probe Network",onClick:function(){return l("scan")}}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"exclamation-triangle",content:"Flush Buffer",disabled:0===m.length,onClick:function(){return l("release")}})],4),children:(0,o.createComponentVNode)(2,a.Button,{content:u,icon:"pen",onClick:function(){return l("network")}})})})}),m&&m.length?(0,o.createComponentVNode)(2,c,{title:p?p.name+" ("+p.id+")":"Detected Network Entities",list:p?p.links:m,showBack:p}):(0,o.createComponentVNode)(2,a.Section,{title:"No Devices Found",children:(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Probe Network",onClick:function(){return l("scan")}})})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.list),l=e.title,d=e.showBack;return(0,o.createComponentVNode)(2,a.Section,{title:l,buttons:d&&(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"Back to Main Menu",onClick:function(){return i("mainmenu")}}),children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"u",null,"Linked entities",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:c.length?c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name+" ("+e.id+")",children:(0,o.createComponentVNode)(2,a.Button,{content:"View",icon:"eye",onClick:function(){return i("view",{id:e.id})}})},e.id)})):(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"bad",children:"No links detected."})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsMultitoolMenu=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(62),c=n(3);t.TelecommsMultitoolMenu=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),u=(a.temp,a.on,a.id,a.network,a.autolinkers,a.shadowlink,a.options);a.linked,a.filter,a.multitool,a.multitool_buffer;return(0,o.createComponentVNode)(2,c.Window,{width:520,height:540,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.TemporaryNotice),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d,{options:u})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.temp,c.on),d=c.id,u=c.network,s=c.autolinkers,m=c.shadowlink,p=(c.options,c.linked),f=c.filter,h=c.multitool,C=c.multitool_buffer;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:l,content:l?"On":"Off",onClick:function(){return i("toggle")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Identification String",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:d,onClick:function(){return i("id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:u,onClick:function(){return i("network")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prefabrication",children:s?"TRUE":"FALSE"}),m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shadow Link",children:"Active."}):null,h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Multitool Buffer",children:[C?(0,o.createFragment)([C.name,(0,o.createTextVNode)(" ("),C.id,(0,o.createTextVNode)(")")],0):null,(0,o.createComponentVNode)(2,a.Button,{color:C?"green":null,content:C?"Link ("+C.id+")":"Add Machine",icon:C?"link":"plus",onClick:C?function(){return i("link")}:function(){return i("buffer")}}),C?(0,o.createComponentVNode)(2,a.Button,{color:"red",content:"Flush",icon:"trash",onClick:function(){return i("flush")}}):null]}):null]}),(0,o.createComponentVNode)(2,a.Section,{title:"Linked network Entities",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.ref+" "+e.name+" ("+e.id+")",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",icon:"trash",onClick:function(){return i("unlink",{unlink:e.index})}})},e.ref)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Filtering Frequencies",mt:1,children:[f.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{content:e.name+" GHz",confirmContent:"Delete?",confirmColor:"red",confirmIcon:"trash",onClick:function(){return i("delete",{"delete":e.freq})}},e.index)})),f&&0!==f.length?null:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No filters."})]})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.options),l=c.use_listening_level,d=c.use_broadcasting,u=c.use_receiving,s=c.listening_level,m=c.broadcasting,p=c.receiving,f=c.use_change_freq,h=c.change_freq,C=c.use_broadcast_range,b=c.use_receive_range,N=c.range,g=c.minRange,V=c.maxRange;return l||d||u||f||C||b?(0,o.createComponentVNode)(2,a.Section,{title:"Options",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[l?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Locked to Station",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock-closed":"lock-open",content:s?"Yes":"No",onClick:function(){return i("change_listening")}})}):null,d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Broadcasting",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:m,content:m?"Yes":"No",onClick:function(){return i("broadcast")}})}):null,u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receving",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:p,content:p?"Yes":"No",onClick:function(){return i("receive")}})}):null,f?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Signal Frequency",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wave-square",selected:!!h,content:h?"Yes ("+h+")":"No",onClick:function(){return i("change_freq")}})}):null,C||b?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(C?"Broadcast":"Receive")+" Range",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:N,minValue:g,maxValue:V,unit:"gigameters",stepPixelSize:4,format:function(e){return e+1},onDrag:function(e,t){return i("range",{range:t})}})}):null]})}):(0,o.createComponentVNode)(2,a.Section,{title:"No Options Found"})}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeClock=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(186);t.TimeClock=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.department_hours,m=u.user_name,p=u.card,f=u.assignment,h=u.job_datum,C=u.allow_change_job,b=u.job_choices;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:520,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"OOC",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:"OOC Note: PTO acquired is account-wide and shared across all characters. Info listed below is not IC information."}),(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Time Off Balance for "+m,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,color:s[e]>6?"good":s[e]>1?"average":"bad",children:[(0,r.toFixed)(s[e],1)," ",1===s[e]?"hour":"hours"]},e)}))})})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Employee Info",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Employee ID",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"user",onClick:function(){return d("id")},children:p||"Insert ID"})}),!!h&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:h.selection_color,p:.8,children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{ml:1,children:(0,o.createComponentVNode)(2,l.RankIcon,{color:"white",rank:h.title})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{fontSize:1.5,inline:!0,mr:1,children:h.title})})]})})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Departments",children:h.departments}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pay Scale",children:h.economic_modifier}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"PTO Elegibility",children:h.timeoff_factor>0&&(0,o.createComponentVNode)(2,i.Box,{children:["Earns PTO - ",h.pto_department]})||h.timeoff_factor<0&&(0,o.createComponentVNode)(2,i.Box,{children:["Requires PTO - ",h.pto_department]})||(0,o.createComponentVNode)(2,i.Box,{children:"Neutral"})})],4)]})}),!(!C||!h||0===h.timeoff_factor||"Dismissed"===f)&&(0,o.createComponentVNode)(2,i.Section,{title:"Employment Actions",children:h.timeoff_factor>0&&(s[h.pto_department]>0&&(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"exclamation-triangle",onClick:function(){return d("switch-to-offduty")},children:"Go Off-Duty"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning: You do not have enough accrued time off to go off-duty."}))||Object.keys(b).length&&Object.keys(b).map((function(e){return b[e].map((function(t){return(0,o.createComponentVNode)(2,i.Button,{icon:"suitcase",onClick:function(){return d("switch-to-onduty-rank",{"switch-to-onduty-rank":e,"switch-to-onduty-assignment":t})},children:t},t)}))}))||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No Open Positions - See Head Of Personnel"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return c("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return c("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return c("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return c("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return c("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Turbolift=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Turbolift=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.floors,u=l.doors_open,s=l.fire_mode;return(0,o.createComponentVNode)(2,i.Window,{width:480,height:260+25*s,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Floor Selection",className:s?"Section--elevator--fire":null,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:u?"door-open":"door-closed",content:u?s?"Close Doors (SAFETY OFF)":"Doors Open":"Doors Closed",selected:u&&!s,color:s?"red":null,onClick:function(){return c("toggle_doors")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:"bad",content:"Emergency Stop",onClick:function(){return c("emergency_stop")}})],4),children:[!s||(0,o.createComponentVNode)(2,a.Section,{className:"Section--elevator--fire",textAlign:"center",title:"FIREFIGHTER MODE ENGAGED"}),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"22%",textAlign:"right",mr:"3px",children:e.label||"Floor #"+e.id}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"8%",textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"circle",color:e.current?"red":e.target?"green":e.queued?"yellow":null,onClick:function(){return c("move_to_floor",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",grow:1,children:e.name})]})},e.id)}))})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VendingMaintenance=t.VendingProducts=t.Vending=void 0;var o=n(0),r=n(9),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.actively_vending,d=e.product;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:d.isatom&&(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",d.path]),null,1,{style:{"vertical-align":"middle","horizontal-align":"middle"}})||null}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,color:d.color,children:d.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Box,{color:(d.amount<=0?"bad":d.amount<=d.max_amount/2&&"average")||"good",children:[d.amount," in stock"]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:d.price?"credit-card":"download",iconSpin:l===d.name,disabled:0===d.amount,content:d.price?"Buy ("+d.price+"\u20ae)":"Vend",onClick:function(){return c("vend",{vend:d.key})}})})]})};t.Vending=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.panel);return(0,o.createComponentVNode)(2,c.Window,{width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),r?(0,o.createComponentVNode)(2,u):null]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,d=c.coin,u=c.chargesMoney,s=c.user,m=c.userMoney,p=c.guestNotice,f=c.products.filter((function(e){return!!e}));return(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,i.Section,{title:"User",children:s&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),","," ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)("\u20ae Thalers")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-grey",children:p})}),(0,o.createComponentVNode)(2,i.Section,{title:"Products",children:(0,o.createComponentVNode)(2,i.Table,{children:f.map((function(e){return(0,o.createComponentVNode)(2,l,{product:e},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,i.Section,{title:d+" deposited",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Coin",onClick:function(){return r("remove_coin")}})})],0)};t.VendingProducts=d;var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.speaker;return(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Section,{title:"Speaker",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:c?"volume-up":"volume-off",content:c?"Enabled":"Disabled",selected:c,onClick:function(){return r("togglevoice")}})})})};t.VendingMaintenance=u},function(e,t,n){"use strict";t.__esModule=!0,t.VolumePanel=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.VolumePanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.volume_channels;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Volume Levels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:Object.keys(l).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Slider,{width:"88%",minValue:0,maxValue:200,value:100*l[e],onChange:function(t,n){return c("adjust_volume",{channel:e,vol:n/100})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"undo",onClick:function(){return c("adjust_volume",{channel:e,vol:1})}})]},e)}))})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VorePanel=void 0;var o=n(0),r=(n(5),n(8)),a=n(1),i=n(2),c=n(3),l=n(9),d=[null,"average","bad"],u={Hold:null,Digest:"red",Absorb:"purple",Unabsorb:"purple",Drain:"purple",Shrink:"purple",Grow:"purple","Size Steal":"purple",Heal:"purple","Encase In Egg":"purple",Transform:"purple","Transform (Hair and eyes)":"purple","Transform (Male)":"purple","Transform (Female)":"purple","Transform (Keep Gender)":"purple","Transform (Replica Of Self)":"purple","Transform (Change Species and Taur)":"purple","Transform (Change Species and Taur) (EGG)":"purple","Transform (Replica Of Self) (EGG)":"purple","Transform (Keep Gender) (EGG)":"purple","Transform (Male) (EGG)":"purple","Transform (Female) (EGG)":"purple"},s={Hold:"being held.",Digest:"being digested.",Absorb:"being absorbed.",Unabsorb:"being unabsorbed.",Drain:"being drained.",Shrink:"being shrunken.",Grow:"being grown.","Size Steal":"having your size stolen.",Heal:"being healed.","Encase In Egg":"being encased in an egg.",Transform:"being transformed.","Transform (Hair and eyes)":"being transformed.","Transform (Male)":"being transformed.","Transform (Female)":"being transformed.","Transform (Keep Gender)":"being transformed.","Transform (Replica Of Self)":"being transformed.","Transform (Change Species and Taur)":"being transformed.","Transform (Change Species and Taur) (EGG)":"being transformed.","Transform (Replica Of Self) (EGG)":"being transformed.","Transform (Keep Gender) (EGG)":"being transformed.","Transform (Male) (EGG)":"being transformed.","Transform (Female) (EGG)":"being transformed."};t.VorePanel=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:700,height:660,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[l.unsaved_changes&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:!0,children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"90%",children:"Warning: Unsaved Changes!"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Save Prefs",icon:"save",onClick:function(){return r("saveprefs")}})})]})})||null,(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,C)]})})};var m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.inside),c=r.absorbed,l=r.belly_name,d=r.belly_mode,m=r.desc,p=r.pred,f=r.contents,C=r.ref;return l?(0,o.createComponentVNode)(2,i.Section,{title:"Inside",children:[(0,o.createComponentVNode)(2,i.Box,{color:"green",inline:!0,children:["You are currently ",c?"absorbed into":"inside"]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"yellow",inline:!0,children:[p,"'s"]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"red",inline:!0,children:l}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"yellow",inline:!0,children:"and you are"}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:u[d],inline:!0,children:s[d]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"label",children:m}),f.length&&(0,o.createComponentVNode)(2,i.Collapsible,{title:"Belly Contents",children:(0,o.createComponentVNode)(2,h,{contents:f,belly:C})})||"There is nothing else around you."]}):(0,o.createComponentVNode)(2,i.Section,{title:"Inside",children:"You aren't inside anyone."})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.our_bellies,d=c.selected;return(0,o.createComponentVNode)(2,i.Section,{title:"My Bellies",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[l.map((function(e){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{color:e.selected?"green":u[e.digest_mode],onClick:function(){return r("bellypick",{bellypick:e.ref})},children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:e.selected&&u[e.digest_mode]||null,children:[e.name," (",e.contents,")"]})},e.name)})),(0,o.createComponentVNode)(2,i.Tabs.Tab,{onClick:function(){return r("newbelly")},children:["New",(0,o.createComponentVNode)(2,i.Icon,{name:"plus",ml:.5})]})]}),d&&(0,o.createComponentVNode)(2,f,{belly:d})]})},f=function(e,t){var n=(0,a.useBackend)(t).act,c=e.belly,d=c.belly_name,s=c.is_wet,m=c.wet_loop,p=c.mode,f=c.item_mode,C=c.verb,b=c.desc,N=c.fancy,g=c.sound,V=c.release_sound,v=c.can_taste,y=c.nutrition_percent,k=c.digest_brute,_=c.digest_burn,x=c.bulge_size,L=c.shrink_grow_size,B=c.addons,w=c.contaminates,S=c.contaminate_flavor,I=c.contaminate_color,T=c.escapable,E=c.interacts,A=c.contents,O=c.belly_fullscreen,M=c.possible_fullscreens,P=c.disable_hud,F=(0,a.useLocalState)(t,"tabIndex",0),D=F[0],R=F[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===D,onClick:function(){return R(0)},children:"Controls"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===D,onClick:function(){return R(1)},children:"Options"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===D,onClick:function(){return R(2)},children:["Contents (",A.length,")"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===D,onClick:function(){return R(3)},children:"Interactions"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:4===D,onClick:function(){return R(4)},children:"Belly Styles"})]}),0===D&&(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",tooltipPosition:"left",tooltip:"Move this belly tab left.",onClick:function(){return n("move_belly",{dir:-1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",tooltipPosition:"left",tooltip:"Move this belly tab right.",onClick:function(){return n("move_belly",{dir:1})}})],4),children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_name"})},content:d})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{color:u[p],onClick:function(){return n("set_attribute",{attribute:"b_mode"})},content:p})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Flavor Text",buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_desc"})},icon:"pen"}),children:b}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode Addons",children:[B.length&&B.join(", ")||"None",(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_addons"})},ml:1,icon:"plus"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Item Mode",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_item_mode"})},content:f})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vore Verb",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_verb"})},content:C})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Belly Messages",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"dmp"})},content:"Digest Message (to prey)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"dmo"})},content:"Digest Message (to you)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"smo"})},content:"Struggle Message (outside)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"smi"})},content:"Struggle Message (inside)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"em"})},content:"Examine Message (when full)"}),(0,o.createComponentVNode)(2,i.Button,{color:"red",onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"reset"})},content:"Reset Messages"})]})]})||1===D&&(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Brute Damage",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_brute_dmg"})},content:k})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Burn Damage",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_burn_dmg"})},content:_})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nutritional Gain",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_nutritionpercent"})},content:y+"%"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contaminates",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contaminates"})},icon:w?"toggle-on":"toggle-off",selected:w,content:w?"Yes":"No"})}),w&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contamination Flavor",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contamination_flavor"})},icon:"pen",content:S})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contamination Color",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contamination_color"})},icon:"pen",content:(0,r.capitalize)(I)})})],4)||null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Can Taste",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_tastes"})},icon:v?"toggle-on":"toggle-off",selected:v,content:v?"Yes":"No"})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fleshy Belly",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_wetness"})},icon:s?"toggle-on":"toggle-off",selected:s,content:s?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Loop",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_wetloop"})},icon:m?"toggle-on":"toggle-off",selected:m,content:m?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Use Fancy Sounds",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_fancy_sound"})},icon:N?"toggle-on":"toggle-off",selected:N,content:N?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vore Sound",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_sound"})},content:g}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_soundtest"})},icon:"volume-up"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Release Sound",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_release"})},content:V}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_releasesoundtest"})},icon:"volume-up"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Examine Size",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_bulge_size"})},content:100*x+"%"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shrink/Grow Size",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_grow_shrink"})},content:100*L+"%"})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"100%",mt:1,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{fluid:!0,icon:"exclamation-triangle",confirmIcon:"trash",color:"red",content:"Delete Belly",confirmContent:"This is irreversable!",onClick:function(){return n("set_attribute",{attribute:"b_del"})}})})]})||2===D&&(0,o.createComponentVNode)(2,h,{outside:!0,contents:A})||3===D&&(0,o.createComponentVNode)(2,i.Section,{title:"Belly Interactions",buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_escapable"})},icon:T?"toggle-on":"toggle-off",selected:T,content:T?"Interactions On":"Interactions Off"}),children:T?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Escape Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.escapechance+"%",onClick:function(){return n("set_attribute",{attribute:"b_escapechance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Escape Time",children:(0,o.createComponentVNode)(2,i.Button,{content:E.escapetime/10+"s",onClick:function(){return n("set_attribute",{attribute:"b_escapetime"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.transferchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_transferchance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer Location",children:(0,o.createComponentVNode)(2,i.Button,{content:E.transferlocation?E.transferlocation:"Disabled",onClick:function(){return n("set_attribute",{attribute:"b_transferlocation"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Absorb Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.absorbchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_absorbchance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.digestchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_digestchance"})}})})]}):"These options only display while interactions are turned on."})||4===D&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Vore FX",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disable Prey HUD",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_disable_hud"})},icon:P?"toggle-on":"toggle-off",selected:P,content:P?"Yes":"No"})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Belly Fullscreens",children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,selected:""===O||null===O,onClick:function(){return n("set_attribute",{attribute:"b_fullscreen",val:null})},children:"Disabled"}),Object.keys(M).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{width:"256px",height:"256px",selected:e===O,onClick:function(){return n("set_attribute",{attribute:"b_fullscreen",val:e})},children:(0,o.createComponentVNode)(2,i.Box,{className:(0,l.classes)(["vore240x240",e]),style:{transform:"translate(0%, 4%)"}})},e)}))]})],4)||"Error"],0)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.show_pictures,l=e.contents,u=e.belly,s=e.outside,m=void 0!==s&&s;return(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",fluid:!0,mb:1,onClick:function(){return r("pick_from_outside",{pickall:!0})},children:"All"})||null,c&&(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",justify:"center",align:"center",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:[(0,o.createComponentVNode)(2,i.Button,{width:"64px",color:e.absorbed?"purple":d[e.stat],style:{"vertical-align":"middle","margin-right":"5px","border-radius":"20px"},onClick:function(){return r(e.outside?"pick_from_outside":"pick_from_inside",{pick:e.ref,belly:u})},children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64, "+e.icon,width:"64px",height:"64px",style:{"-ms-interpolation-mode":"nearest-neighbor","margin-left":"-5px"}})}),e.name]},e.name)}))})||(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:-1,mb:-1,color:e.absorbed?"purple":d[e.stat],onClick:function(){return r(e.outside?"pick_from_outside":"pick_from_inside",{pick:e.ref,belly:u})},children:"Interact"})},e.ref)}))})],0)},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.prefs,d=l.digestable,u=l.devourable,s=l.feeding,m=l.absorbable,p=l.digest_leave_remains,f=l.allowmobvore,h=l.permit_healbelly,C=l.show_vore_fx,b=l.can_be_drop_prey,N=l.can_be_drop_pred,g=l.noisy,V=c.show_pictures;return(0,o.createComponentVNode)(2,i.Section,{title:"Preferences",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eye",selected:V,onClick:function(){return r("show_pictures")},children:["Contents Preference: ",V?"Show Pictures":"Show List"]}),children:[(0,o.createComponentVNode)(2,i.Flex,{spacing:1,wrap:"wrap",justify:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_digest")},icon:d?"toggle-on":"toggle-off",selected:d,fluid:!0,tooltip:"This button is for those who don't like being digested. It can make you undigestable."+(d?" Click here to prevent digestion.":" Click here to allow digestion."),content:d?"Digestion Allowed":"No Digestion"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_absorbable")},icon:m?"toggle-on":"toggle-off",selected:m,fluid:!0,tooltip:"This button allows preds to know whether you prefer or don't prefer to be absorbed. "+(m?"Click here to disallow being absorbed.":"Click here to allow being absorbed."),content:m?"Absorption Allowed":"No Absorption"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_devour")},icon:u?"toggle-on":"toggle-off",selected:u,fluid:!0,tooltip:"This button is to toggle your ability to be devoured by others. "+(u?"Click here to prevent being devoured.":"Click here to allow being devoured."),content:u?"Devouring Allowed":"No Devouring"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_mobvore")},icon:f?"toggle-on":"toggle-off",selected:f,fluid:!0,tooltip:"This button is for those who don't like being eaten by mobs. "+(f?"Click here to prevent being eaten by mobs.":"Click here to allow being eaten by mobs."),content:f?"Mobs eating you allowed":"No Mobs eating you"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_feed")},icon:s?"toggle-on":"toggle-off",selected:s,fluid:!0,tooltip:"This button is to toggle your ability to be fed to or by others vorishly. "+(s?"Click here to prevent being fed to/by other people.":"Click here to allow being fed to/by other people."),content:s?"Feeding Allowed":"No Feeding"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_healbelly")},icon:h?"toggle-on":"toggle-off",selected:h,fluid:!0,tooltipPosition:"top",tooltip:"This button is for those who don't like healbelly used on them as a mechanic. It does not affect anything, but is displayed under mechanical prefs for ease of quick checks. "+(h?"Click here to prevent being heal-bellied.":"Click here to allow being heal-bellied."),content:h?"Heal-bellies Allowed":"No Heal-bellies"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_dropnom_prey")},icon:b?"toggle-on":"toggle-off",selected:b,fluid:!0,tooltip:"This toggle is for spontaneous, environment related vore as prey, including drop-noms, teleporters, etc. "+(b?"Click here to allow being spontaneous prey.":"Click here to disable being spontaneous prey."),content:b?"Spontaneous Prey Enabled":"Spontaneous Prey Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_dropnom_pred")},icon:N?"toggle-on":"toggle-off",selected:N,fluid:!0,tooltip:"This toggle is for spontaneous, environment related vore as a predator, including drop-noms, teleporters, etc. "+(N?"Click here to allow being spontaneous pred.":"Click here to disable being spontaneous pred."),content:N?"Spontaneous Pred Enabled":"Spontaneous Pred Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_noisy")},icon:g?"toggle-on":"toggle-off",selected:g,fluid:!0,tooltip:"Toggle audible hunger noises. "+(g?"Click here to turn off hunger noises.":"Click here to turn on hunger noises."),content:g?"Hunger Noises Enabled":"Hunger Noises Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_leaveremains")},icon:p?"toggle-on":"toggle-off",selected:p,fluid:!0,tooltipPosition:"top",tooltip:p?"Your Predator must have this setting enabled in their belly modes to allow remains to show up,if they do not, they will not leave your remains behind, even with this on. Click to disable remains":"Regardless of Predator Setting, you will not leave remains behind. Click this to allow leaving remains.",content:p?"Allow Leaving Remains Behind":"Do Not Allow Leaving Remains Behind"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_fx")},icon:C?"toggle-on":"toggle-off",selected:C,fluid:!0,tooltipPosition:"top",tooltip:C?"This setting controls whether or not a pred is allowed to mess with your HUD and fullscreen overlays.Click to disable all FX.":"Regardless of Predator Setting, you will not see their FX settings. Click this to enable showing FX.",content:C?"Show Vore FX":"Do Not Show Vore FX"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Set Taste",icon:"grin-tongue",onClick:function(){return r("setflavor")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Set Smell",icon:"wind",onClick:function(){return r("setsmell")}})})]}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Save Prefs",icon:"save",onClick:function(){return r("saveprefs")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Reload Prefs",icon:"undo",onClick:function(){return r("reloadprefs")}})})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,i.Window,{width:350,height:150+30*d.length,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchArtifactAnalyzer=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.XenoarchArtifactAnalyzer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:250,height:140,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.owned_scanner,d=c.scan_in_progress;return l?d?(0,o.createComponentVNode)(2,i.Section,{title:"Scan In Progress",children:["Scanning...",(0,o.createComponentVNode)(2,i.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return a("scan")},children:"Cancel Scan"})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Artifact Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"search",onClick:function(){return a("scan")},children:"Begin Scan"})}):(0,o.createComponentVNode)(2,i.Section,{title:"No Scanner Detected",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning: No scanner was detected. This machine requires a scanner to operate."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchArtifactHarvester=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchArtifactHarvester=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.info,u=d.no_scanner,s=d.harvesting,m=d.inserted_battery;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:200,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:u&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Warning: No scanner detected."})||(0,o.createComponentVNode)(2,a.Section,{children:s>0&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",mb:1,children:"Please wait. Harvesting in progress."}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return l("stopharvest")},children:"Stop Early"})]})||s<0&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",mb:1,children:"Please wait. Energy dump in progress."}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return l("stopharvest")},children:"Stop Early"})]})||Object.keys(m).length&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:m.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy Signature ID",children:m.artifact_id})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"eject",onClick:function(){return l("ejectbattery")},children:"Eject Battery"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"bolt",onClick:function(){return l("drainbattery")},children:"Drain Battery"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"star",onClick:function(){return l("harvest")},children:"Begin Harvest"})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted."})})})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.info.inserted_battery);return Object.keys(i).length?(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:i.stored_charge,maxValue:i.capacity}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted."})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchDepthScanner=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchDepthScanner=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.current,u=l.positive_locations;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[Object.keys(d).length&&(0,o.createComponentVNode)(2,a.Section,{title:"Selected",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"bad",icon:"trash",confirmIcon:"trash",content:"Delete Entry",onClick:function(){return c("clear",{index:d.index})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time",children:d.time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coords",children:d.coords}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Depth",children:[d.depth," cm"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Size",children:[d.clearance," cm"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dissonance Spread",children:d.dissonance_spread}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Material",children:d.material})]})})||null,(0,o.createComponentVNode)(2,a.Section,{title:"Entries",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",icon:"trash",confirmIcon:"trash",content:"Delete All",onClick:function(){return c("clear")}}),children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return c("select",{select:e.index})},children:[e.time,", ",e.coords]},e.index)}))||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No traces found."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchHandheldPowerUtilizer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchHandheldPowerUtilizer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.inserted_battery,u=l.anomaly,s=l.charge,m=l.capacity,p=l.timeleft,f=l.activated,h=l.duration,C=l.interval;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Anomaly Power Utilizer",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"eject",onClick:function(){return c("ejectbattery")},children:"Eject Battery"}),children:d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Battery",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomalies Detected",children:u||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s,maxValue:m,children:[s," / ",m]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left Activated",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"power-off",onClick:function(){return c("startup")},children:f?"Activated":"Deactivated"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Duration",children:(0,o.createComponentVNode)(2,a.NumberInput,{unit:"s",fluid:!0,minValue:0,value:h,stepPixelSize:4,maxValue:30,onDrag:function(e,t){return c("changeduration",{duration:10*t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Interval",children:(0,o.createComponentVNode)(2,a.NumberInput,{unit:"s",fluid:!0,minValue:0,value:C,stepPixelSize:10,maxValue:10,onDrag:function(e,t){return c("changeinterval",{interval:10*t})}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted. Please insert a cell."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchReplicator=void 0;var o=n(0),r=(n(5),n(8),n(1)),a=n(2),i=n(3);t.XenoarchReplicator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.tgui_construction;return(0,o.createComponentVNode)(2,i.Window,{theme:"abductor",width:400,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{color:e.background,icon:e.icon,iconColor:e.foreground,fontSize:4,onClick:function(){return c("construct",{key:e.key})}},e.key)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchSpectrometer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(8);t.XenoarchSpectrometer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.scanned_item,s=d.scanned_item_desc,m=d.last_scan_data,p=d.scan_progress,f=d.scanning,h=d.scanner_seal_integrity,C=d.scanner_rpm,b=d.scanner_temperature,N=d.coolant_usage_rate,g=d.coolant_usage_max,V=(d.unused_coolant_abs,d.unused_coolant_per),v=d.coolant_purity,y=d.optimal_wavelength,k=d.maser_wavelength,_=d.maser_wavelength_max,x=d.maser_efficiency,L=d.radiation,B=(d.t_left_radspike,d.rad_shield_on);return(0,o.createComponentVNode)(2,i.Window,{width:900,height:825,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"signal",selected:f,onClick:function(){return l("scanItem")},children:f?"HALT SCAN":"Begin Scan"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,onClick:function(){return l("ejectItem")},children:"Eject Item"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Item",children:u||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No item inserted."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heuristic Analysis",children:s||"None found."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:100,color:"good"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Vacuum Seal Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,minValue:0,maxValue:100,ranges:{good:[66,100],average:[33,66],bad:[0,33]}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"MASER",buttons:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Match wavelengths to progress the scan."}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"MASER Efficiency",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:x,minValue:0,maxValue:100,ranges:{good:[66,100],average:[33,66],bad:[0,33]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wavelength",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,value:k,fillValue:y,minValue:1,maxValue:_,format:function(e){return e+" MHz"},step:10,onDrag:function(e,t){return l("maserWavelength",{wavelength:t})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Environment / Internal",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Centrifuge Speed",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:C,minValue:0,maxValue:1e3,color:"good",children:[C," RPM"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:b,maxValue:1273,ranges:{bad:[1e3,Infinity],average:[250,1e3],good:[0,250]},children:[b," K"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radiation",buttons:(0,o.createComponentVNode)(2,a.Button,{selected:B,icon:"radiation",onClick:function(){return l("toggle_rad_shield")},children:B?"Disable Radiation Shielding":"Enable Radiation Shielding"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ambient Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:L,maxValue:100,ranges:{bad:[65,Infinity],average:[15,65],good:[0,15]},children:[L," mSv"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cooling",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Remaining",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:10*V,maxValue:1e3,ranges:{good:[65,Infinity],average:[15,65],bad:[0,15]},children:[10*V," u"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Flow Rate",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,value:N,maxValue:g,stepPixelSize:50,format:function(e){return e+" u/s"},onDrag:function(e,t){return l("coolantRate",{coolant:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Purity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:v,maxValue:100,ranges:{good:[66,Infinity],average:[33,66],bad:[0,33]}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Latest Results",children:(0,c.decodeHtmlEntities)(m).split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchSuspension=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchSuspension=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.cell,u=l.cellCharge,s=l.cellMaxCharge,m=l.locked,p=l.suspension_field;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:150,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:'Triple-phase S.F.G. MK III "Reliant"',buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"lock":"lock-open",selected:!m,onClick:function(){return c("lock")},children:m?"Locked":"Unlocked"}),children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"This interface is locked. Swipe an ID card to unlock it."})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:d&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*s,Infinity],average:[.5*s,.75*s],bad:[-Infinity,.5*s]},value:u,maxValue:s})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No cell inserted."})})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,icon:"meteor",selected:p,onClick:function(){return c("toggle_field")},children:p?"Disengage Suspension Field":"Engage Suspension Field"})],4)})})})}}]); \ No newline at end of file +var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var a,i=n.document,c=i.createElement("link");if(t)a=t;else{var l=(i.body||i.getElementsByTagName("head")[0]).childNodes;a=l[l.length-1]}var d=i.styleSheets;if(r)for(var u in r)r.hasOwnProperty(u)&&c.setAttribute(u,r[u]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(i.body)return e();setTimeout((function(){p(e)}))}((function(){a.parentNode.insertBefore(c,t?a:a.nextSibling)}));var s=function h(e){for(var t=c.href,n=d.length;n--;)if(d[n].href===t)return e();setTimeout((function(){h(e)}))};function m(){c.addEventListener&&c.removeEventListener("load",m),c.media=o||"all"}return c.addEventListener&&c.addEventListener("load",m),c.onloadcssdefined=s,s(m),c}}).call(this,n(76))},function(e,t,n){"use strict";t.__esModule=!0,t.getRoutedComponent=void 0;var o=n(0),r=n(1),a=(n(122),n(3)),i=n(458),c=function(e,t){return function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:["notFound"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" was not found.")],4),"missingExport"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" is missing an export.")],4)]})})}},l=function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0})})};t.getRoutedComponent=function(e){var t=(0,r.selectBackend)(e),n=t.suspended,o=t.config;if(n)return l;var a,d=null==o?void 0:o["interface"];try{a=i("./"+d+".js")}catch(s){if("MODULE_NOT_FOUND"===s.code)return c("notFound",d);throw s}var u=a[d];return u||c("missingExport",d)}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.NtosWindow=void 0;var o=n(0),r=n(75),a=n(1),i=n(2),c=n(123),l=n(180),d=function(e,t){var n=e.title,d=e.width,u=void 0===d?575:d,s=e.height,m=void 0===s?700:s,p=e.resizable,h=e.theme,f=void 0===h?"ntos":h,C=e.children,N=(0,a.useBackend)(t),b=N.act,g=N.data,V=g.PC_device_theme,v=g.PC_batteryicon,k=g.PC_showbatteryicon,y=g.PC_batterypercent,_=g.PC_ntneticon,B=g.PC_apclinkicon,L=g.PC_stationtime,w=g.PC_programheaders,x=void 0===w?[]:w,S=g.PC_showexitprogram;return(0,o.createComponentVNode)(2,l.Window,{title:n,width:u,height:m,theme:f,resizable:p,children:(0,o.createVNode)(1,"div","NtosWindow",[(0,o.createVNode)(1,"div","NtosWindow__header NtosHeader",[(0,o.createVNode)(1,"div","NtosHeader__left",[(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,mr:2,children:L}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,italic:!0,mr:2,opacity:.33,children:["ntos"===V&&"NtOS","syndicate"===V&&"Syndix"]})],4),(0,o.createVNode)(1,"div","NtosHeader__right",[x.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:(0,r.resolveAsset)(e.icon)})},e.icon)})),(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:_&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:(0,r.resolveAsset)(_)})}),!!k&&v&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:[v&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:(0,r.resolveAsset)(v)}),y&&y]}),B&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:(0,r.resolveAsset)(B)})}),!!S&&(0,o.createComponentVNode)(2,i.Button,{width:"26px",textAlign:"center",color:"transparent",icon:"window-minimize-o",tooltip:"Minimize",tooltipPosition:"bottom",onClick:function(){return b("PC_minimize")}}),!!S&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",textAlign:"center",color:"transparent",icon:"window-close-o",tooltip:"Close",tooltipPosition:"bottom-left",onClick:function(){return b("PC_exit")}}),!S&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"power-off",tooltip:"Power off",tooltipPosition:"bottom-left",onClick:function(){return b("PC_shutdown")}})],0)],4,{onMouseDown:function(){(0,c.refocusLayout)()}}),C],0)})};t.NtosWindow=d;d.Content=function(e){return(0,o.createVNode)(1,"div","NtosWindow__content",(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Window.Content,Object.assign({},e))),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.BlockQuote=void 0;var o=n(0),r=n(9),a=n(19);t.BlockQuote=function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(9),a=n(441),i=n(24),c=n(19);function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var d=(0,i.createLogger)("ByondUi"),u=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),C=this.state.viewBox,N=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),i=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],i[0]=n[1]),o!==undefined&&(a[1]=o[0],i[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,i,t)}))(e)}(a,C,c,l);if(N.length>0){var b=N[0],g=N[N.length-1];N.push([C[0]+h,g[1]]),N.push([C[0]+h,-h]),N.push([-h,-h]),N.push([-h,b[1]])}var V=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,["children","color","title","buttons"]);return(0,o.createComponentVNode)(2,r.Box,{mb:1,children:[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:l,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},s,{children:d}))),2),u&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",u,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})]})},i}(o.Component);t.Collapsible=i},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(9),a=n(19);var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,c=e.backgroundColor,l=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return l.color=t?null:"transparent",l.backgroundColor=i||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(l)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(l))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(9),a=n(19),i=n(126);function c(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t,n;function l(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=l.prototype;return d.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},d.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},d.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},d.buildMenu=function(){var e=this,t=this.props,n=t.options,r=void 0===n?[]:n,a=t.placeholder,i=r.map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return a&&i.unshift((0,o.createVNode)(1,"div","Dropdown__menuentry",[(0,o.createTextVNode)("-- "),a,(0,o.createTextVNode)(" --")],0,{onClick:function(){e.setSelected(null)}},a)),i},d.render=function(){var e=this,t=this.props,n=t.color,l=void 0===n?"default":n,d=t.over,u=t.noscroll,s=t.nochevron,m=t.width,p=t.maxHeight,h=(t.onClick,t.selected,t.disabled),f=t.placeholder,C=c(t,["color","over","noscroll","nochevron","width","maxHeight","onClick","selected","disabled","placeholder"]),N=C.className,b=c(C,["className"]),g=d?!this.state.open:this.state.open,V=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([u?"Dropdown__menu-noscroll":"Dropdown__menu",d&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:m,"max-height":p}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:m,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+l,h&&"Button--disabled",N])},b,{onClick:function(){h&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",this.state.selected||f,0),!!s||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,i.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),V],0)},l}(o.Component);t.Dropdown=l},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(0),r=n(128),a=n(9);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.children,n=i(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=a.pureComponentHooks;var l=function(e){var t=e.size,n=void 0===t?1:t,a=e.style,c=i(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},a)},c)))};t.GridColumn=l,c.defaultHooks=a.pureComponentHooks,c.Column=l},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(9),a=n(19);function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){return(0,r.isFalsy)(e)?"":e},l=function(e){var t,n;function l(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=l.prototype;return d.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},d.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=c(r))},d.setEditing=function(e){this.setState({editing:e})},d.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,i(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus"])),l=c.className,d=c.fluid,u=i(c,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",d&&"Input--fluid",l])},u,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},l}(o.Component);t.Input=l},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(5),a=n(9),i=n(19),c=n(127),l=n(129);t.Knob=function(e){if(Byond.IS_LTE_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.forcedInputWidth,d=e.format,u=e.maxValue,s=e.minValue,m=e.onChange,p=e.onDrag,h=e.step,f=e.stepPixelSize,C=e.suppressFlicker,N=e.unit,b=e.value,g=e.className,V=e.style,v=e.fillValue,k=e.color,y=e.ranges,_=void 0===y?{}:y,B=e.size,L=e.bipolar,w=(e.children,e.popUpPosition),x=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","forcedInputWidth","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,forcedInputWidth:n,format:d,maxValue:u,minValue:s,onChange:m,onDrag:p,step:h,stepPixelSize:f,suppressFlicker:C,unit:N,value:b},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,m=e.handleDragStart,p=(0,r.scale)(null!=v?v:c,s,u),h=(0,r.scale)(c,s,u),f=k||(0,r.keyOfMatchingRange)(null!=v?v:n,_)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,L&&"Knob--bipolar",g,(0,i.computeBoxClassName)(x)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",w&&"Knob__popupValue--"+w]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((L?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":B+"rem"},V)},x)),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(179);function a(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var i=function(e){var t=e.children,n=a(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=i;i.Item=function(e){var t=e.label,n=e.children,i=a(e,["label","children"]);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},i,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var o=n(0),r=n(9),a=n(19),i=n(178),c=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.label,i=e.labelColor,c=void 0===i?"label":i,l=e.color,d=e.textAlign,u=e.verticalAlign,s=e.buttons,m=e.content,p=e.children;return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,a.Box,{as:"td",color:c,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,o.createComponentVNode)(2,a.Box,{as:"td",color:l,textAlign:d,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:s?undefined:2,children:[m,p]}),s&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",s,0)],0)};t.LabeledListItem=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.size?(0,a.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=d,d.defaultHooks=r.pureComponentHooks,c.Item=l,c.Divider=d},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1);n(75),n(24);var i=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={offsetX:0,offsetY:0,transform:"none",dragging:!1,originX:null,originY:null},n.handleDragStart=function(e){document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd)},n.handleDragMove=function(e){n.setState((function(t){var o=Object.assign({},t),r=e.screenX-o.originX,a=e.screenY-o.originY;return t.dragging?(o.offsetX+=r/n.props.zoom,o.offsetY+=a/n.props.zoom,o.originX=e.screenX,o.originY=e.screenY):o.dragging=!0,o}))},n.handleDragEnd=function(e){document.body.style["pointer-events"]="auto",clearTimeout(n.timer),n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd)},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.offsetX,i=t.offsetY,c=this.props,l=c.children,d=c.zoom,u=(c.reset,"matrix("+d+", 0, 0, "+d+", "+n*d+", "+i*d+")"),s={width:"560px",height:"560px",overflow:"hidden",position:"relative",padding:"0px","background-image":"url("+e.map+"_nanomap_z"+e.mapZLevel+".png)","background-size":"cover","text-align":"center",transform:u};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:(0,o.createComponentVNode)(2,r.Box,{style:s,textAlign:"center",onMouseDown:this.handleDragStart,children:(0,o.createComponentVNode)(2,r.Box,{children:l})})})},i}(o.Component);t.NanoMap=i;i.Marker=function(e,t){var n=e.x,a=e.y,i=e.zoom,c=e.icon,l=e.tooltip,d=e.color,u=e.onClick,s=4*n-5,m=4*a-4;return(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",onMouseDown:u,children:[(0,o.createComponentVNode)(2,r.Icon,{name:c,color:d,fontSize:"4px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l,scale:i})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(9),a=n(19),i=n(177);t.Modal=function(e){var t,n=e.className,c=e.children,l=e.onEnter,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children","onEnter"]);return l&&(t=function(e){13===(e.which||e.keyCode)&&l(e)}),(0,o.createComponentVNode)(2,i.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(d)]),c,0,Object.assign({},(0,a.computeBoxProps)(d))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(9),a=n(19);var i=function(e){var t=e.className,n=e.color,i=e.info,c=(e.warning,e.success),l=e.danger,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","color","info","warning","success","danger"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",c&&"NoticeBox--type--success",l&&"NoticeBox--type--danger",t])},d)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var o=n(0),r=n(5),a=n(9),i=n(19);var c=function(e){var t=e.className,n=e.value,c=e.minValue,l=void 0===c?0:c,d=e.maxValue,u=void 0===d?1:d,s=e.color,m=e.ranges,p=void 0===m?{}:m,h=e.children,f=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","value","minValue","maxValue","color","ranges","children"]),C=(0,r.scale)(n,l,u),N=h!==undefined,b=s||(0,r.keyOfMatchingRange)(n,p)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+b,t,(0,i.computeBoxClassName)(f)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(C)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",N?h:(0,r.toFixed)(100*C)+"%",0)],4,Object.assign({},(0,i.computeBoxProps)(f))))};t.ProgressBar=c,c.defaultHooks=a.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(9),a=n(19);var i=function(e){var t=e.className,n=e.title,i=e.level,c=void 0===i?1:i,l=e.buttons,d=e.fill,u=e.stretchContents,s=e.noTopPadding,m=e.children,p=e.scrollable,h=e.flexGrow,f=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","fill","stretchContents","noTopPadding","children","scrollable","flexGrow"]),C=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(l),N=!(0,r.isFalsy)(m);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Section","Section--level--"+c,d&&"Section--fill",p&&"Section--scrollable",h&&"Section--flex",t].concat((0,a.computeBoxClassName)(f))),[C&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",l,0)],4),N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__content",!!u&&"Section__content--stretchContents",!!s&&"Section__content--noTopPadding"]),m,0)],0,Object.assign({},(0,a.computeBoxProps)(f))))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(5),a=n(9),i=n(19),c=n(127),l=n(129);t.Slider=function(e){if(Byond.IS_LTE_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,s=e.onChange,m=e.onDrag,p=e.step,h=e.stepPixelSize,f=e.suppressFlicker,C=e.unit,N=e.value,b=e.className,g=e.fillValue,V=e.color,v=e.ranges,k=void 0===v?{}:v,y=e.children,_=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),B=y!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:d,minValue:u,onChange:s,onDrag:m,step:p,stepPixelSize:h,suppressFlicker:f,unit:C,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,s=e.inputElement,m=e.handleDragStart,p=g!==undefined&&null!==g,h=((0,r.scale)(n,u,d),(0,r.scale)(null!=g?g:c,u,d)),f=(0,r.scale)(c,u,d),C=V||(0,r.keyOfMatchingRange)(null!=g?g:n,k)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Slider","ProgressBar","ProgressBar--color--"+C,b,(0,i.computeBoxClassName)(_)]),[(0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(h)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(h,f))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(f)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",B?y:l,0),s],0,Object.assign({},(0,i.computeBoxProps)(_),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(9),a=n(19),i=n(125);function c(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.className,n=e.vertical,i=e.children,l=c(e,["className","vertical","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",i,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=l;l.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,l=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},l)))}},function(e,t,n){var o={"./AICard.js":459,"./APC.js":460,"./AiAirlock.js":461,"./AiRestorer.js":462,"./AiSupermatter.js":463,"./AirAlarm.js":464,"./AlgaeFarm.js":466,"./AppearanceChanger.js":467,"./AreaScrubberControl.js":468,"./AssemblyInfrared.js":469,"./AssemblyProx.js":470,"./AssemblyTimer.js":471,"./AtmosAlertConsole.js":472,"./AtmosControl.js":182,"./AtmosFilter.js":473,"./AtmosMixer.js":474,"./Autolathe.js":475,"./BeaconLocator.js":476,"./Biogenerator.js":477,"./BodyDesigner.js":478,"./BodyScanner.js":479,"./BombTester.js":480,"./BotanyEditor.js":481,"./BotanyIsolator.js":482,"./BrigTimer.js":483,"./CameraConsole.js":183,"./Canister.js":484,"./ChemDispenser.js":485,"./ChemMaster.js":489,"./Cleanbot.js":490,"./CloningConsole.js":491,"./ColorMate.js":492,"./CommunicationsConsole.js":185,"./ComputerFabricator.js":493,"./CookingAppliance.js":494,"./CrewMonitor.js":186,"./Cryo.js":495,"./CryoStorage.js":187,"./CryoStorageVr.js":496,"./DNAForensics.js":497,"./DNAModifier.js":498,"./DestinationTagger.js":499,"./DiseaseSplicer.js":500,"./DishIncubator.js":501,"./DisposalBin.js":502,"./DroneConsole.js":503,"./EmbeddedController.js":504,"./ExonetNode.js":505,"./ExosuitFabricator.js":130,"./Farmbot.js":506,"./FileCabinet.js":507,"./Floorbot.js":508,"./GasPump.js":509,"./GasTemperatureSystem.js":510,"./GeneralAtmoControl.js":511,"./GeneralRecords.js":512,"./Gps.js":513,"./GravityGenerator.js":514,"./Holodeck.js":515,"./ICAssembly.js":516,"./ICCircuit.js":517,"./ICDetailer.js":518,"./ICPrinter.js":519,"./IDCard.js":520,"./IdentificationComputer.js":133,"./InventoryPanel.js":521,"./InventoryPanelHuman.js":522,"./IsolationCentrifuge.js":523,"./Jukebox.js":524,"./LawManager.js":525,"./LookingGlass.js":526,"./MechaControlConsole.js":527,"./Medbot.js":528,"./MedicalRecords.js":529,"./MessageMonitor.js":530,"./Microwave.js":531,"./MiningOreProcessingConsole.js":532,"./MiningStackingConsole.js":533,"./MiningVendor.js":534,"./MuleBot.js":535,"./NTNetRelay.js":536,"./Newscaster.js":537,"./NoticeBoard.js":538,"./NtosAccessDecrypter.js":539,"./NtosArcade.js":540,"./NtosAtmosControl.js":541,"./NtosCameraConsole.js":542,"./NtosCommunicationsConsole.js":543,"./NtosConfiguration.js":544,"./NtosCrewMonitor.js":545,"./NtosDigitalWarrant.js":546,"./NtosEmailAdministration.js":547,"./NtosEmailClient.js":190,"./NtosFileManager.js":548,"./NtosIdentificationComputer.js":549,"./NtosMain.js":550,"./NtosNetChat.js":551,"./NtosNetDos.js":552,"./NtosNetDownloader.js":553,"./NtosNetMonitor.js":554,"./NtosNetTransfer.js":555,"./NtosNewsBrowser.js":556,"./NtosOvermapNavigation.js":557,"./NtosPowerMonitor.js":558,"./NtosRCON.js":559,"./NtosRevelation.js":560,"./NtosShutoffMonitor.js":561,"./NtosStationAlertConsole.js":562,"./NtosSupermatterMonitor.js":563,"./NtosUAV.js":564,"./NtosWordProcessor.js":565,"./OmniFilter.js":566,"./OmniMixer.js":567,"./OperatingComputer.js":568,"./OvermapDisperser.js":569,"./OvermapEngines.js":570,"./OvermapHelm.js":571,"./OvermapNavigation.js":191,"./OvermapShieldGenerator.js":572,"./OvermapShipSensors.js":573,"./ParticleAccelerator.js":574,"./PartsLathe.js":575,"./PathogenicIsolator.js":576,"./PipeDispenser.js":577,"./PlantAnalyzer.js":578,"./PointDefenseControl.js":579,"./PortableGenerator.js":580,"./PortablePump.js":581,"./PortableScrubber.js":582,"./PowerMonitor.js":192,"./PressureRegulator.js":583,"./PrisonerManagement.js":584,"./RCON.js":193,"./RIGSuit.js":585,"./Radio.js":586,"./RapidPipeDispenser.js":197,"./RequestConsole.js":587,"./ResearchConsole.js":588,"./ResearchServerController.js":589,"./ResleevingConsole.js":590,"./ResleevingPod.js":591,"./RoboticsControlConsole.js":592,"./RogueZones.js":593,"./Secbot.js":594,"./SecurityRecords.js":595,"./SeedStorage.js":596,"./ShieldCapacitor.js":597,"./ShieldGenerator.js":598,"./ShutoffMonitor.js":194,"./ShuttleControl.js":599,"./Signaler.js":600,"./Sleeper.js":601,"./SmartVend.js":602,"./Smes.js":603,"./SolarControl.js":604,"./SpaceHeater.js":605,"./StationAlertConsole.js":195,"./SuitCycler.js":606,"./SuitStorageUnit.js":607,"./SupermatterMonitor.js":196,"./SupplyConsole.js":608,"./TEGenerator.js":609,"./Tank.js":610,"./TankDispenser.js":611,"./TelecommsLogBrowser.js":612,"./TelecommsMachineBrowser.js":613,"./TelecommsMultitoolMenu.js":614,"./TimeClock.js":615,"./TransferValve.js":616,"./Turbolift.js":617,"./Vending.js":618,"./VolumePanel.js":619,"./VorePanel.js":620,"./Wires.js":621,"./XenoarchArtifactAnalyzer.js":622,"./XenoarchArtifactHarvester.js":623,"./XenoarchDepthScanner.js":624,"./XenoarchHandheldPowerUtilizer.js":625,"./XenoarchReplicator.js":626,"./XenoarchSpectrometer.js":627,"./XenoarchSuspension.js":628};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=458},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.has_ai,u=l.integrity,s=l.backup_capacitor,m=l.flushing,p=l.has_laws,h=l.laws,f=l.wireless,C=l.radio;if(0===d)return(0,o.createComponentVNode)(2,i.Window,{width:600,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var N=null;N=u>=75?"green":u>=25?"yellow":"red";var b=null;return s>=75&&(b="green"),b=s>=25?"yellow":"red",(0,o.createComponentVNode)(2,i.Window,{width:600,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:N,value:u/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:b,value:s/100})})]})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===m?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!p&&(0,o.createComponentVNode)(2,a.Box,{children:h.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"check":"times",content:f?"Enabled":"Disabled",color:f?"green":"red",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"check":"times",content:C?"Enabled":"Disabled",color:C?"green":"red",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"AI Power",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"radiation",confirmIcon:"radiation",disabled:m||0===u,confirmColor:"red",content:"Shutdown",onClick:function(){return c("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(181),l=n(61);t.APC=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=(0,o.createComponentVNode)(2,u);return a.gridCheck?c=(0,o.createComponentVNode)(2,s):a.failTime&&(c=(0,o.createComponentVNode)(2,m)),(0,o.createComponentVNode)(2,i.Window,{width:450,height:475,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:c})})};var d={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.locked&&!l.siliconUser,s=(l.normallyLocked,d[l.externalPower]||d[0]),m=d[l.chargingStatus]||d[0],p=l.powerChannels||[],h=l.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox,{deny:l.emagged,denialMessage:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"bad",fontSize:"1.5rem",children:"Fault in ID authenticator."}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Please contact maintenance for service."})],4)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!u,color:l.isOperating?"":"bad",disabled:u,onClick:function(){return i("breaker")}}),children:["[ ",s.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:h})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:u,onClick:function(){return i("charge")}}),children:["[ ",m.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[p.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!u&&(1===e.status||3===e.status),disabled:u,onClick:function(){return i("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!u&&2===e.status,disabled:u,onClick:function(){return i("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!u&&0===e.status,disabled:u,onClick:function(){return i("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:l.totalCharging?(0,o.createVNode)(1,"b",null,[l.totalLoad,(0,o.createTextVNode)(" W (+ "),l.totalCharging,(0,o.createTextVNode)(" W charging)")],0):(0,o.createVNode)(1,"b",null,[l.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!l.siliconUser&&(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return i("overload")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",selected:l.coverLocked,disabled:u,onClick:function(){return i("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Disabled",selected:2===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Automatic",selected:1===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Enabled",selected:3===l.nightshiftSetting,onClick:function(){return i("nightshift",{nightshift:3})}})],4)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",selected:l.emergencyLights,onClick:function(){return i("emergency_lighting")}})})]})})],4)},s=function(e,t){return(0,o.createComponentVNode)(2,l.FullscreenNotice,{title:"System Failure",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"})}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,children:"Power surge detected, grid check in effect..."})]})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act,l=(0,o.createComponentVNode)(2,a.Button,{icon:"repeat",content:"Restart Now",color:"good",onClick:function(){return c("reboot")}});return i.locked&&!i.siliconUser&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Swipe an ID card for manual reboot."})),(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:(0,o.createVNode)(1,"h1",null,"SYSTEM FAILURE",16)}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h2",null,"I/O regulators malfunction detected! Waiting for system reboot...",16)}),(0,o.createComponentVNode)(2,a.Box,{color:"good",children:["Automatic reboot in ",i.failTime," seconds..."]}),(0,o.createComponentVNode)(2,a.Box,{mt:4,children:l})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c={2:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Offline"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=c[d.power.main]||c[0],s=c[d.power.backup]||c[0],m=c[d.shock]||c[0];return(0,o.createComponentVNode)(2,i.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_1&&d.wires.main_2?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_1&&d.wires.backup_2?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&0===d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiRestorerContent=t.AiRestorer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AiRestorer=function(){return(0,o.createComponentVNode)(2,i.Window,{width:370,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.AI_present,d=c.error,u=c.name,s=c.laws,m=c.isDead,p=c.restoring,h=c.health,f=c.ejectable;return(0,o.createFragment)([d&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:d}),!!f&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:l?u:"----------",disabled:!l,onClick:function(){return i("PRG_eject")}}),!!l&&(0,o.createComponentVNode)(2,a.Section,{title:f?"System Status":u,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m?"bad":"good",children:m?"Nonfunctional":"Functional"}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})})}),!!p&&(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",color:"good",mt:1,children:"RECONSTRUCTION IN PROGRESS"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",content:"Begin Reconstruction",disabled:p,mt:1,onClick:function(){return i("PRG_beginReconstruction")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{className:"candystripe",children:e},e)}))})]})],0)};t.AiRestorerContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.AiSupermatter=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=(n(21),n(61));t.AiSupermatter=function(e,t){var n=(0,r.useBackend)(t).data,a=(n.integrity_percentage,n.ambient_temp,n.ambient_pressure,n.detonating),c=(0,o.createComponentVNode)(2,d);return a&&(c=(0,o.createComponentVNode)(2,l)),(0,o.createComponentVNode)(2,i.Window,{width:500,height:300,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:c})})};var l=function(e,t){return(0,o.createComponentVNode)(2,c.FullscreenNotice,{title:"DETONATION IMMINENT",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{color:"bad",name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"CRYSTAL DELAMINATING"}),(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Evacuate area immediately"})]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,i=n.integrity_percentage,c=n.ambient_temp,l=n.ambient_pressure;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Crystal Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i,maxValue:100,ranges:{good:[90,Infinity],average:[25,90],bad:[-Infinity,25]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Environment Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c,maxValue:1e4,ranges:{bad:[5e3,Infinity],average:[4e3,5e3],good:[-Infinity,4e3]},children:[c," K"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Environment Pressure",children:[l," kPa"]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(5),a=(n(7),n(1)),i=n(2),c=n(32),l=n(3),d=n(181),u=n(465);t.AirAlarm=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.locked&&!r.siliconUser&&!r.remoteUser;return(0,o.createComponentVNode)(2,l.Window,{width:440,height:650,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),!i&&(0,o.createComponentVNode)(2,h)]})})};var s=function(e,t){var n=(0,a.useBackend)(t).data,l=(n.environment_data||[]).filter((function(e){return e.value>=.01})),d={0:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},2:{color:"bad",localStatusText:"Danger (Internals Required)"}},u=d[n.danger_level]||d[0];return(0,o.createComponentVNode)(2,i.Section,{title:"Air Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[l.length>0&&(0,o.createFragment)([l.map((function(e){var t=d[e.danger_level]||d[0];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,c.getGasLabel)(e.name),color:t.color,children:[(0,r.toFixed)(e.value,2),e.unit]},e.name)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Local status",color:u.color,children:u.localStatusText}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Area status",color:n.atmos_alarm||n.fire_alarm?"bad":"good",children:(n.atmos_alarm?"Atmosphere Alarm":n.fire_alarm&&"Fire Alarm")||"Nominal"})],0)||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Warning",color:"bad",children:"Cannot obtain air sample for analysis."}),!!n.emagged&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Warning",color:"bad",children:"Safety measures offline. Device may exhibit abnormal behavior."})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.target_temperature,d=c.rcon;return(0,o.createComponentVNode)(2,i.Section,{title:"Comfort Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Control",children:[(0,o.createComponentVNode)(2,i.Button,{selected:1===d,content:"Off",onClick:function(){return r("rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,i.Button,{selected:2===d,content:"Auto",onClick:function(){return r("rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,i.Button,{selected:3===d,content:"On",onClick:function(){return r("rcon",{rcon:3})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermostat",children:(0,o.createComponentVNode)(2,i.Button,{content:l,onClick:function(){return r("temperature")}})})]})})},p={home:{title:"Air Controls",component:function(){return f}},vents:{title:"Vent Controls",component:function(){return C}},scrubbers:{title:"Scrubber Controls",component:function(){return N}},modes:{title:"Operating Mode",component:function(){return b}},thresholds:{title:"Alarm Thresholds",component:function(){return g}}},h=function(e,t){var n=(0,a.useLocalState)(t,"screen"),r=n[0],c=n[1],l=p[r]||p.home,d=l.component();return(0,o.createComponentVNode)(2,i.Section,{title:l.title,buttons:r&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c()}}),children:(0,o.createComponentVNode)(2,d)})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=(0,a.useLocalState)(t,"screen"),d=(l[0],l[1]),u=c.mode,s=c.atmos_alarm;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:s?"exclamation-triangle":"exclamation",color:s&&"caution",content:"Area Atmosphere Alarm",onClick:function(){return r(s?"reset":"alarm")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:3===u?"exclamation-triangle":"exclamation",color:3===u&&"danger",content:"Panic Siphon",onClick:function(){return r("mode",{mode:3===u?1:3})}}),(0,o.createComponentVNode)(2,i.Box,{mt:2}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Vent Controls",onClick:function(){return d("vents")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"filter",content:"Scrubber Controls",onClick:function(){return d("scrubbers")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Operating Mode",onClick:function(){return d("modes")}}),(0,o.createComponentVNode)(2,i.Box,{mt:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"chart-bar",content:"Alarm Thresholds",onClick:function(){return d("thresholds")}})],4)},C=function(e,t){var n=(0,a.useBackend)(t).data.vents;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,u.Vent,{vent:e},e.id_tag)})):"Nothing to show"},N=function(e,t){var n=(0,a.useBackend)(t).data.scrubbers;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,u.Scrubber,{scrubber:e},e.id_tag)})):"Nothing to show"},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.modes;return c&&0!==c.length?c.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:e.selected?"check-square-o":"square-o",selected:e.selected,color:e.selected&&e.danger&&"danger",content:e.name,onClick:function(){return r("mode",{mode:e.mode})}}),(0,o.createComponentVNode)(2,i.Box,{mt:1})],4,e.mode)})):"Nothing to show"},g=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.thresholds;return(0,o.createVNode)(1,"table","LabeledList",[(0,o.createVNode)(1,"thead",null,(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","color-bad","min2",16),(0,o.createVNode)(1,"td","color-average","min1",16),(0,o.createVNode)(1,"td","color-average","max1",16),(0,o.createVNode)(1,"td","color-bad","max2",16)],4),2),(0,o.createVNode)(1,"tbody",null,d.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","LabeledList__label",(0,o.createVNode)(1,"span","color-"+(0,c.getGasColor)(e.name),(0,c.getGasLabel)(e.name),0),2),e.settings.map((function(e){return(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button,{content:(0,r.toFixed)(e.selected,2),onClick:function(){return l("threshold",{env:e.env,"var":e.val})}}),2,null,e.val)}))],0,null,e.name)})),0)],4,{style:{width:"100%"}})}},function(e,t,n){"use strict";t.__esModule=!0,t.Scrubber=t.Vent=void 0;var o=n(0),r=n(7),a=n(1),i=n(2);n(32);t.Vent=function(e,t){var n=e.vent,c=(0,a.useBackend)(t).act,l=n.id_tag,d=n.long_name,u=n.power,s=n.checks,m=n.excheck,p=n.incheck,h=n.direction,f=n.external,C=n.internal,N=n.extdefault,b=n.intdefault;return(0,o.createComponentVNode)(2,i.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return c("power",{id_tag:l,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"siphon"!==h?"Pressurizing":"Siphoning",color:"siphon"===h&&"danger",onClick:function(){return c("direction",{id_tag:l,val:Number("siphon"===h)})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Internal",selected:p,onClick:function(){return c("incheck",{id_tag:l,val:s})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"External",selected:m,onClick:function(){return c("excheck",{id_tag:l,val:s})}})]}),!!p&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Target",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(C),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return c("set_internal_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:b,content:"Reset",onClick:function(){return c("reset_internal_pressure",{id_tag:l})}})]}),!!m&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Target",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(f),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return c("set_external_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:N,content:"Reset",onClick:function(){return c("reset_external_pressure",{id_tag:l})}})]})]})})};t.Scrubber=function(e,t){var n=e.scrubber,c=(0,a.useBackend)(t).act,l=n.long_name,d=n.power,u=n.scrubbing,s=n.id_tag,m=(n.widenet,n.filters);return(0,o.createComponentVNode)(2,i.Section,{level:2,title:(0,r.decodeHtmlEntities)(l),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return c("power",{id_tag:s,val:Number(!d)})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:u?"filter":"sign-in-alt",color:u||"danger",content:u?"Scrubbing":"Siphoning",onClick:function(){return c("scrubbing",{id_tag:s,val:Number(!u)})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filters",children:u&&m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.val?"check-square-o":"square-o",content:e.name,title:e.name,selected:e.val,onClick:function(){return c(e.command,{id_tag:s,val:!e.val})}},e.name)}))||"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AlgaeFarm=void 0;var o=n(0),r=n(1),a=n(2),i=(n(21),n(3)),c=(n(5),n(7));t.AlgaeFarm=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.usePower,s=d.materials,m=d.last_flow_rate,p=d.last_power_draw,h=d.inputDir,f=d.outputDir,C=d.input,N=d.output,b=d.errorText;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[b&&(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:b})}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Processing",selected:2===u,onClick:function(){return l("toggle")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[m," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw",children:[p," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider,{size:1}),s.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.capitalize)(e.display),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{width:"80%",value:e.qty,maxValue:e.max,children:[e.qty,"/",e.max]}),(0,o.createComponentVNode)(2,a.Button,{ml:1,content:"Eject",onClick:function(){return l("ejectMaterial",{mat:e.name})}})]},e.name)}))]}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Gas Input ("+h+")",children:C?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Pressure",children:[C.pressure," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:C.name,children:[C.percent,"% (",C.moles," moles)"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No connection detected."})})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Gas Output ("+f+")",children:N?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Pressure",children:[N.pressure," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:N.name,children:[N.percent,"% (",N.moles," moles)"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No connection detected."})})})]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(17),a=n(7),i=n(1),c=n(2),l=n(3);t.AppearanceChanger=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.config),h=n.data,f=h.name,C=h.specimen,N=h.gender,b=h.gender_id,g=h.hair_style,V=h.facial_hair_style,v=h.change_race,k=h.change_gender,y=h.change_eye_color,_=h.change_skin_tone,B=h.change_skin_color,L=h.change_hair_color,w=h.change_facial_hair_color,x=h.change_hair,S=h.change_facial_hair,I=h.mapRef,T=r.title,E=y||_||B||L||w,A=-1;v?A=0:k?A=1:E?A=2:x?A=4:S&&(A=5);var P=(0,i.useLocalState)(t,"tabIndex",A),M=P[0],O=P[1];return(0,o.createComponentVNode)(2,l.Window,{width:700,height:650,title:(0,a.decodeHtmlEntities)(T),children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Reflection",children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:f}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Species",color:v?null:"grey",children:C}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Biological Sex",color:k?null:"grey",children:(0,a.capitalize)(N)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Gender Identity",color:E?null:"grey",children:(0,a.capitalize)(b)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Hair Style",color:x?null:"grey",children:(0,a.capitalize)(g)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Facial Hair Style",color:S?null:"grey",children:(0,a.capitalize)(V)})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.ByondUi,{style:{width:"256px",height:"256px"},params:{id:I,type:"map"}})})]})}),(0,o.createComponentVNode)(2,c.Tabs,{children:[v?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===M,onClick:function(){return O(0)},children:"Race"}):null,k?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===M,onClick:function(){return O(1)},children:"Gender & Sex"}):null,E?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===M,onClick:function(){return O(2)},children:"Colors"}):null,x?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===M,onClick:function(){return O(3)},children:"Hair"}):null,S?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===M,onClick:function(){return O(4)},children:"Facial Hair"}):null]}),(0,o.createComponentVNode)(2,c.Box,{height:"43%",children:[v&&0===M?(0,o.createComponentVNode)(2,d):null,k&&1===M?(0,o.createComponentVNode)(2,u):null,E&&2===M?(0,o.createComponentVNode)(2,s):null,x&&3===M?(0,o.createComponentVNode)(2,m):null,S&&4===M?(0,o.createComponentVNode)(2,p):null]})]})})};var d=function(e,t){var n=(0,i.useBackend)(t),a=n.act,l=n.data,d=l.species,u=l.specimen,s=(0,r.sortBy)((function(e){return e.specimen}))(d||[]);return(0,o.createComponentVNode)(2,c.Section,{title:"Species",fill:!0,scrollable:!0,children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{content:e.specimen,selected:u===e.specimen,onClick:function(){return a("race",{race:e.specimen})}},e.specimen)}))})},u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.gender,d=a.gender_id,u=a.genders,s=a.id_genders;return(0,o.createComponentVNode)(2,c.Section,{title:"Gender & Sex",fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Biological Sex",children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{selected:e.gender_key===l,content:e.gender_name,onClick:function(){return r("gender",{gender:e.gender_key})}},e.gender_key)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Gender Identity",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{selected:e.gender_key===d,content:e.gender_name,onClick:function(){return r("gender_id",{gender_id:e.gender_key})}},e.gender_key)}))})]})})},s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.change_eye_color,d=a.change_skin_tone,u=a.change_skin_color,s=a.change_hair_color,m=a.change_facial_hair_color,p=a.eye_color,h=a.skin_color,f=a.hair_color,C=a.facial_hair_color;return(0,o.createComponentVNode)(2,c.Section,{title:"Colors",fill:!0,scrollable:!0,children:[l?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:p,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Eye Color",onClick:function(){return r("eye_color")}})]}):null,d?(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Change Skin Tone",onClick:function(){return r("skin_tone")}})}):null,u?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:h,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Skin Color",onClick:function(){return r("skin_color")}})]}):null,s?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:f,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Hair Color",onClick:function(){return r("hair_color")}})]}):null,m?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.ColorBox,{color:C,mr:1}),(0,o.createComponentVNode)(2,c.Button,{content:"Change Facial Hair Color",onClick:function(){return r("facial_hair_color")}})]}):null]})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.hair_style,d=a.hair_styles;return(0,o.createComponentVNode)(2,c.Section,{title:"Hair",fill:!0,scrollable:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return r("hair",{hair:e.hairstyle})},selected:e.hairstyle===l,content:e.hairstyle},e.hairstyle)}))})},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.facial_hair_style,d=a.facial_hair_styles;return(0,o.createComponentVNode)(2,c.Section,{title:"Facial Hair",fill:!0,scrollable:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return r("facial_hair",{facial_hair:e.facialhairstyle})},selected:e.facialhairstyle===l,content:e.facialhairstyle},e.facialhairstyle)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AreaScrubberControl=void 0;var o=n(0),r=n(2),a=n(1),i=n(3),c=n(7);t.AreaScrubberControl=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=(0,a.useLocalState)(t,"showArea",!1),s=u[0],m=u[1],p=d.scrubbers;return p?(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Flex,{wrap:"wrap",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"search",content:"Scan",onClick:function(){return c("scan")}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"layer-group",content:"Show Areas",selected:s,onClick:function(){return m(!s)}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"toggle-on",content:"All On",onClick:function(){return c("allon")}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,r.Button,{textAlign:"center",fluid:!0,icon:"toggle-off",content:"All Off",onClick:function(){return c("alloff")}})})]}),(0,o.createComponentVNode)(2,r.Flex,{wrap:"wrap",children:p.map((function(e){return(0,o.createComponentVNode)(2,r.Flex.Item,{m:"2px",basis:"32%",children:(0,o.createComponentVNode)(2,l,{scrubber:e,showArea:s})},e.id)}))})]})})}):(0,o.createComponentVNode)(2,r.Section,{title:"Error",children:[(0,o.createComponentVNode)(2,r.Box,{color:"bad",children:"No Scrubbers Detected."}),(0,o.createComponentVNode)(2,r.Button,{fluid:!0,icon:"search",content:"Scan",onClick:function(){return c("scan")}})]})};var l=function(e,t){var n=(0,a.useBackend)(t).act,i=e.scrubber,l=e.showArea;return(0,o.createComponentVNode)(2,r.Section,{title:i.name,children:[(0,o.createComponentVNode)(2,r.Button,{fluid:!0,icon:"power-off",content:i.on?"Enabled":"Disabled",selected:i.on,onClick:function(){return n("toggle",{id:i.id})}}),(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Pressure",children:[i.pressure," kPa"]}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Flow Rate",children:[i.flow_rate," L/s"]}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Load",children:[i.load," W"]}),l&&(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Area",children:(0,c.toTitleCase)(i.area)})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyInfrared=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.AssemblyInfrared=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Infrared Unit",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",fluid:!0,selected:d,onClick:function(){return c("state")},children:d?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",fluid:!0,selected:u,onClick:function(){return c("visible")},children:u?"Able to be seen":"Invisible"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyProx=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.AssemblyProx=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.timing,m=u.time,p=u.range,h=u.maxRange,f=u.scanning;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Timing Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",selected:s,onClick:function(){return d("timing")},children:s?"Counting Down":"Disabled"}),children:(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:m/10,minValue:0,maxValue:600,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("set_time",{time:t})}})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Prox Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,i.NumberInput,{minValue:1,value:p,maxValue:h,onDrag:function(e,t){return d("range",{range:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Armed",children:[(0,o.createComponentVNode)(2,i.Button,{mr:1,icon:f?"lock":"lock-open",selected:f,onClick:function(){return d("scanning")},children:f?"ARMED":"Unarmed"}),"Movement sensor is active when armed!"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AssemblyTimer=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.AssemblyTimer=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.timing,m=u.time;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Timing Unit",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",selected:s,onClick:function(){return d("timing")},children:s?"Counting Down":"Disabled"}),children:(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:m/10,minValue:0,maxValue:600,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("set_time",{time:t})}})})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.priority_alarms||[],u=l.minor_alarms||[];return(0,o.createComponentVNode)(2,i.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===d.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e.name,color:"bad",onClick:function(){return c("clear",{ref:e.ref})}}),2,null,e.name)})),0===u.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),u.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e.name,color:"average",onClick:function(){return c("clear",{ref:e.ref})}}),2,null,e.name)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),i=(n(32),n(3));t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:390,height:187,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:1,children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l.last_flow_rate,format:function(e){return e+" L/s"}})}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onDrag:function(e,t){return c("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.rate===l.max_rate,onClick:function(){return c("rate",{rate:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.selected,content:e.name,onClick:function(){return c("filter",{filterset:e.f_type})}},e.name)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:370,height:195,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.set_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure,step:10,onChange:function(e,t){return c("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.set_pressure===l.max_pressure,onClick:function(){return c("pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider,{size:1}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"label",children:(0,o.createVNode)(1,"u",null,"Concentrations",16)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 1 ("+l.node1_dir+")",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node1_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return c("node1",{concentration:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 2 ("+l.node2_dir+")",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node2_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return c("node2",{concentration:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=(n(5),n(44)),a=n(17),i=n(1),c=n(2),l=n(3),d=n(130),u=n(7),s=function(e,t){if(null===e.requirements)return!0;for(var n=Object.keys(e.requirements),o=function(){var n=a[r],o=t.find((function(e){return e.name===n}));return o?o.amount=e[1].price/d.build_eff,e[1]})).sort(l[C]);if(0!==n.length)return b&&(n=n.reverse()),V=!0,(0,o.createComponentVNode)(2,m,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,i.Section,{onClick:function(e){return(0,c.refocusLayout)()},children:V?v:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,a.useLocalState)(t,"sort",""),d=(c[0],c[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,i.Dropdown,{selected:"Alphabetical",options:Object.keys(l),width:"100%",lineHeight:"19px",onSelected:function(e){return d(e)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},s=function(e,t){return!!e.affordable&&!(e.reagent&&!t.beaker)},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.title,d=e.items,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Collapsible,Object.assign({open:!0,title:l},u,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s(e,c),content:(e.price/c.build_eff).toLocaleString("en-US"),width:"15%",textAlign:"center",style:{float:"right"},onClick:function(){return r("purchase",{cat:l,name:e.name})}}),(0,o.createComponentVNode)(2,i.Box,{style:{clear:"both"}})]},e.name)}))})))}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyDesigner=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3);t.BodyDesigner=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.menu,s=d.disk,m=d.diskStored,p=d.activeBodyRecord,h=l[u];return(0,o.createComponentVNode)(2,c.Window,{width:400,height:650,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",content:"Save To Disk",onClick:function(){return r("savetodisk")},disabled:!p}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",content:"Load From Disk",onClick:function(){return r("loadfromdisk")},disabled:!m}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return r("ejectdisk")}})]}):null,h]})})};var l={Main:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Database Functions",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View Individual Body Records",onClick:function(){return r("menu",{menu:"Body Records"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View Stock Body Records",onClick:function(){return r("menu",{menu:"Stock Records"})}})]})})),"Body Records":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.bodyrecords;return(0,o.createComponentVNode)(2,i.Section,{title:"Body Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Main"})}}),children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:e.name,onClick:function(){return r("view_brec",{view_brec:e.recref})}},e.name)}))})})),"Stock Records":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.stock_bodyrecords;return(0,o.createComponentVNode)(2,i.Section,{title:"Stock Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Main"})}}),children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:e,onClick:function(){return r("view_stock_brec",{view_stock_brec:e})}},e)}))})})),"Specific Record":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.activeBodyRecord,u=l.mapRef;return d?(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"165px",children:(0,o.createComponentVNode)(2,i.Section,{title:"Specific Record",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c("menu",{menu:"Main"})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d.real_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:d.speciesname}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bio. Sex",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:(0,r.capitalize)(d.gender),onClick:function(){return c("href_conversion",{target_href:"bio_gender",target_value:1})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Synthetic",children:d.synthetic}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Compat",children:[d.locked,(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eye",content:"View OOC Notes",disabled:!d.booc,onClick:function(){return c("boocnotes")}})]})]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"130px",children:(0,o.createComponentVNode)(2,i.ByondUi,{style:{width:"100%",height:"128px"},params:{id:u,type:"map"}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"300px",children:(0,o.createComponentVNode)(2,i.Section,{title:"Customize",height:"300px",style:{overflow:"auto"},children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scale",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:d.scale,onClick:function(){return c("href_conversion",{target_href:"size_multiplier",target_value:1})}})}),Object.keys(d.styles).map((function(e){var t=d.styles[e];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[t.styleHref?(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.style,onClick:function(){return c("href_conversion",{target_href:t.styleHref,target_value:1})}}):null,t.colorHref?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.color,onClick:function(){return c("href_conversion",{target_href:t.colorHref,target_value:1})}}),(0,o.createComponentVNode)(2,i.ColorBox,{verticalAlign:"top",width:"32px",height:"20px",color:t.color,style:{border:"1px solid #fff"}})]}):null,t.colorHref2?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:t.color2,onClick:function(){return c("href_conversion",{target_href:t.colorHref2,target_value:1})}}),(0,o.createComponentVNode)(2,i.ColorBox,{verticalAlign:"top",width:"32px",height:"20px",color:t.color2,style:{border:"1px solid #fff"}})]}):null]},e)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body Markings",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Add Marking",onClick:function(){return c("href_conversion",{target_href:"marking_style",target_value:1})}}),(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",justify:"center",align:"center",children:Object.keys(d.markings).map((function(e){var t=d.markings[e];return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{mr:.2,fluid:!0,icon:"times",color:"red",onClick:function(){return c("href_conversion",{target_href:"marking_remove",target_value:e})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,backgroundColor:t,content:e,onClick:function(){return c("href_conversion",{target_href:"marking_color",target_value:e})}})})]})},e)}))})]})]})})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR: Record Not Found!"})})),"OOC Notes":(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.activeBodyRecord;return(0,o.createComponentVNode)(2,i.Section,{title:"Body OOC Notes (This is OOC!)",height:"100%",scrollable:!0,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("menu",{menu:"Specific Record"})}}),style:{"word-break":"break-all"},children:c&&c.booc||"ERROR: Body record not found!"})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["hasBorer","bad",function(e){return"Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."}],["hasVirus","bad",function(e){return"Viral pathogen detected in blood stream."}],["blind","average",function(e){return"Cataracts detected."}],["colourblind","average",function(e){return"Photoreceptor abnormalities detected."}],["nearsighted","average",function(e){return"Retinal misalignment detected."}],["humanPrey","average",function(e){return"Foreign Humanoid(s) detected: "+e.humanPrey}],["livingPrey","average",function(e){return"Foreign Creature(s) detected: "+e.livingPrey}],["objectPrey","average",function(e){return"Foreign Object(s) detected: "+e.objectPrey}]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.reduce((function(e,t){return null===e?t:(0,o.createFragment)([e,!!t&&(0,o.createComponentVNode)(2,i.Box,{children:t})],0)})):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,i=n.occupant,l=void 0===i?{}:i,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,y);return(0,o.createComponentVNode)(2,c.Window,{width:690,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{occupant:t}),(0,o.createComponentVNode)(2,v,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,k,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"}),(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Volume",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.blood.volume,0)})," units\xa0(",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(u.blood.percent,0)}),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Weight",children:(0,r.round)(d.occupant.weight)+"lbs, "+(0,r.round)(d.occupant.weight/2.20463)+"kgs"})]})})},N=function(e){var t=e.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Blood Reagents",children:t.reagents?(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reagent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Amount"})]}),t.reagents.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:[e.amount," Units ",e.overdose?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"OVERDOSING"}):null]})]},e.name)}))]}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"No Blood Reagents Detected"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Stomach Reagents",children:t.ingested?(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reagent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Amount"})]}),t.ingested.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:[e.amount," Units ",e.overdose?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"OVERDOSING"}):null]})]},e.name)}))]}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"No Stomach Reagents Detected"})})],4)},b=function(e){var t=e.occupant,n=t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus;return(n=n||t.humanPrey||t.livingPrey||t.objectPrey)?(0,o.createComponentVNode)(2,i.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,i.Box,{color:e[1],bold:"bad"===e[1],children:e[2](t)})}))}):(0,o.createComponentVNode)(2,i.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No abnormalities found."})})},g=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,i.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r0&&"0.5rem",value:e.totalLoss/100,ranges:s,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,i.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,i.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,i.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,i.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:"33%",children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",display:"inline",children:p([e.internalBleeding&&"Internal bleeding",!!e.status.bleeding&&"External bleeding",e.lungRuptured&&"Ruptured lung",e.destroyed&&"Destroyed",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:[p([!!e.status.splinted&&"Splinted",!!e.status.robotic&&"Robotic",!!e.status.dead&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"})]),p(e.implants.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},k=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,i.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,i.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"33%",children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/100,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:"33%",children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:p([1===e.robotic&&"Robotic",2===e.robotic&&"Assisted",!!e.dead&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"})])})]})]},t)}))]})})},y=function(){return(0,o.createComponentVNode)(2,i.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BombTester=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);n(24);t.BombTester=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.simulating,s=d.mode,m=d.tank1,p=d.tank1ref,h=d.tank2,f=d.tank2ref,C=d.canister,N=d.sim_canister_output;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:400,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:u&&(0,o.createComponentVNode)(2,c)||(0,o.createComponentVNode)(2,a.Section,{title:"Virtual Explosive Simulator v2.01",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:1})},selected:1===s,children:"Single Tank"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:2})},selected:2===s,children:"Transfer Valve"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("set_mode",{mode:3})},selected:3===s,children:"Canister"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Slot",children:m&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("remove_tank",{ref:p})},icon:"eject",children:m})||(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("add_tank",{slot:1})},icon:"upload",children:"Insert Tank"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Slot",children:h&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("remove_tank",{ref:f})},icon:"eject",children:h})||(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("add_tank",{slot:2})},icon:"upload",children:"Insert Tank"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connected Canister",buttons:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return l("canister_scan")},icon:"search",children:"Scan"}),children:C&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:C})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No tank connected."})}),C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Canister Release Pressure",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,value:N,maxValue:1013.25,onDrag:function(e,t){return l("set_can_pressure",{pressure:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:2,color:"red",icon:"bomb",fontSize:2,onClick:function(){return l("start_sim")},fluid:!0,children:"Begin Simulation"})]})})})};var c=function(e){var t,n;function r(t){var n;n=e.call(this,t)||this;var o=Math.random()>.5,r=Math.random()>.5;return n.state={x:o?340:0,y:r?205:0,reverseX:!1,reverseY:!1},n.process=setInterval((function(){n.setState((function(e){var t=Object.assign({},e);return t.reverseX?t.x-2<-5?(t.reverseX=!1,t.x+=2):t.x-=2:t.x+2>340?(t.reverseX=!0,t.x-=2):t.x+=2,t.reverseY?t.y-2<-20?(t.reverseY=!1,t.y+=2):t.y-=2:t.y+2>205?(t.reverseY=!0,t.y-=2):t.y+=2,t}))}),1),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){clearInterval(this.process)},i.render=function(){var e=this.state,t={position:"relative",left:e.x+"px",top:e.y+"px"};return(0,o.createComponentVNode)(2,a.Section,{title:"Simulation in progress!",fill:!0,children:(0,o.createComponentVNode)(2,a.Box,{position:"absolute",style:{overflow:"hidden",width:"100%",height:"100%"},children:(0,o.createComponentVNode)(2,a.Icon,{style:t,name:"bomb",size:10,color:"red"})})})},r}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.BotanyEditor=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.BotanyEditor=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.activity,u=l.degradation,s=l.disk,m=l.sourceName,p=l.locus,h=l.loaded;return d?(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Scanning..."})})}):(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Buffered Genetic Data",children:s&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Source",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gene Decay",children:[u,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Locus",children:p})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No disk loaded."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Loaded Material",children:h&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:h})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"cog",onClick:function(){return c("apply_gene")},children:"Apply Gene Mods"}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"eject",onClick:function(){return c("eject_packet")},children:"Eject Target"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No target seed packet loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotanyIsolator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.BotanyIsolator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.geneMasks,u=l.activity,s=l.degradation,m=l.disk,p=l.loaded,h=l.hasGenetics,f=l.sourceName;return u?(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Scanning..."})})}):(0,o.createComponentVNode)(2,i.Window,{width:470,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Buffered Genetic Data",children:h&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Source",children:f}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gene decay",children:[s,"%"]}),m&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.mask,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:"download",onClick:function(){return c("get_gene",{get_gene:e.tag})},children:"Extract"})},e.mask)}))||null]}),m&&(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",onClick:function(){return c("clear_buffer")},children:"Clear Genetic Buffer"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{mt:1,warning:!0,children:"No disk inserted."})]})||(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No Data Buffered."}),m&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_disk")},children:"Eject Loaded Disk"})||(0,o.createComponentVNode)(2,a.NoticeBox,{mt:1,warning:!0,children:"No disk inserted."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Loaded Material",children:p&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Packet Loaded",children:p})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"cog",onClick:function(){return c("scan_genome")},children:"Process Genome"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("eject_packet")},children:"Eject Packet"})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:"No packet loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.BrigTimer=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:138,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Cell Timer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"clock-o",content:u.timing?"Stop":"Start",selected:u.timing,onClick:function(){return d(u.timing?"stop":"start")}}),u.flash_found&&(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:u.flash_charging?"Recharging":"Flash",disabled:u.flash_charging,onClick:function(){return d("flash")}})||null],0),children:[(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,fluid:!0,value:u.time_left/10,minValue:0,maxValue:u.max_time_left/10,format:function(e){return(0,l.formatTime)((0,r.round)(e))},onDrag:function(e,t){return d("time",{time:t})}}),(0,o.createComponentVNode)(2,i.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_short/10),onClick:function(){return d("preset",{preset:"short"})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_medium/10),onClick:function(){return d("preset",{preset:"medium"})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"hourglass-start",content:"Add "+(0,l.formatTime)(u.preset_long/10),onClick:function(){return d("preset",{preset:"long"})}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Canister=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(21),l=n(3);t.Canister=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.connected,m=u.can_relabel,p=u.pressure,h=u.releasePressure,f=u.defaultReleasePressure,C=u.minReleasePressure,N=u.maxReleasePressure,b=u.valveOpen,g=u.holding;return(0,o.createComponentVNode)(2,l.Window,{width:360,height:242,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Canister",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",disabled:!m,content:"Relabel",onClick:function(){return d("relabel")}}),children:(0,o.createComponentVNode)(2,i.LabeledControls,{children:[(0,o.createComponentVNode)(2,i.LabeledControls.Item,{minWidth:"66px",label:"Tank Pressure",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:p,format:function(e){return e<1e4?(0,r.toFixed)(e)+" kPa":(0,c.formatSiUnit)(1e3*e,1,"Pa")}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Regulator",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",left:"-8px",children:[(0,o.createComponentVNode)(2,i.Knob,{forcedInputWidth:"60px",size:1.25,color:!!b&&"yellow",value:h,unit:"kPa",minValue:C,maxValue:N,stepPixelSize:1,onDrag:function(e,t){return d("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-20px",color:"transparent",icon:"fast-forward",onClick:function(){return d("pressure",{pressure:N})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-20px",color:"transparent",icon:"undo",onClick:function(){return d("pressure",{pressure:f})}})]})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Valve",children:(0,o.createComponentVNode)(2,i.Button,{my:.5,width:"50px",lineHeight:2,fontSize:"11px",color:b?g?"caution":"danger":null,content:b?"Open":"Closed",onClick:function(){return d("valve")}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{mr:1,label:"Port",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{size:1.25,name:s?"plug":"times",color:s?"good":"bad"}),(0,o.createComponentVNode)(2,i.Tooltip,{content:s?"Connected":"Disconnected",position:"top"})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Holding Tank",buttons:!!g&&(0,o.createComponentVNode)(2,i.Button,{icon:"eject",color:b&&"danger",content:"Eject",onClick:function(){return d("eject")}}),children:[!!g&&(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:g.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:g.pressure})," kPa"]})]}),!g&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No Holding Tank"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(184),c=n(3),l=[5,10,20,30,40,60],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:390,height:655,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.amount;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",selected:c===e,content:e+"u",m:"0",fluid:!0,onClick:function(){return i("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Custom Amount",children:(0,o.createComponentVNode)(2,a.Slider,{step:1,stepPixelSize:5,value:c,minValue:1,maxValue:120,onDrag:function(e,t){return i("amount",{amount:t})}})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:c.glass?"Drink Dispenser":"Chemical Dispenser",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"40%",height:"20px",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",width:"100%",height:"100%",align:"flex-start",content:e.title+" ("+e.amount+")",onClick:function(){return i("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flex:"content",minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return c("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return c("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return c("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return c("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";e.exports=n(487)()},function(e,t,n){"use strict";var o=n(488);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(184),l=n(45),d=[1,5,10,30,60];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,c=n.beaker,d=n.beaker_reagents,p=void 0===d?[]:d,h=n.buffer_reagents,f=void 0===h?[]:h,C=n.mode;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:500,resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u,{beaker:c,beakerReagents:p,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,s,{mode:C,bufferReagents:f}),(0,o.createComponentVNode)(2,m,{isCondiment:a,bufferNonEmpty:f.length>0})]})]})};var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=(n.data,e.beaker),s=e.beakerReagents,m=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:m?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!u,content:"Eject and Clear Buffer",onClick:function(){return i("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,content:"Eject and Clear Buffer",onClick:function(){return i("eject")}}),children:u?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,n){return(0,o.createComponentVNode)(2,a.Box,{mb:n0?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:s,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!c.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return i("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.Cleanbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Cleanbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.version,p=l.blood,h=(l.patrol,l.wet_floors),f=l.spray_blood,C=l.rgbpanel,N=l.red_switch,b=l.green_switch,g=l.blue_switch;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:400,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Station Cleaner "+m,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("start")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",selected:p,onClick:function(){return c("blood")},children:p?"Cleans Blood":"Ignores Blood"})})||null,!s&&u&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Panel",children:C&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:N?"toggle-on":"toggle-off",backgroundColor:N?"red":"maroon",onClick:function(){return c("red_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:b?"toggle-on":"toggle-off",backgroundColor:b?"green":"darkgreen",onClick:function(){return c("green_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:g?"toggle-on":"toggle-off",backgroundColor:g?"blue":"darkblue",onClick:function(){return c("blue_switch")}})]})||(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Odd Looking Screw Twiddled",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,selected:h,onClick:function(){return c("wet_floors")},icon:"screwdriver",children:h?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Weird Button Pressed",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"brown",selected:f,onClick:function(){return c("spray_blood")},icon:"screwdriver",children:f?"Yes":"No"})})]})})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(32),l=n(45),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,i.Box,{color:c.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disk",children:[(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!l.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return r("disk",{option:"load"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return r("disk",{option:"save",savetype:"ui"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return r("disk",{option:"save",savetype:"ue"})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return r("disk",{option:"save",savetype:"se"})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,i.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,i.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,i.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.records;return c.length?(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.scanner,d=c.numberofpods,u=c.autoallowed,s=c.autoprocess,m=c.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createFragment)([!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),(0,o.createComponentVNode)(2,i.Button,{disabled:!m,icon:"eject",content:"Eject Disk",onClick:function(){return r("disk",{option:"eject"})}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColorMate=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ColorMate=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.items,u=l.activecolor,s=Math.min(270+15*d.length,600);return(0,o.createComponentVNode)(2,i.Window,{width:300,height:s,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:d.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Paint",children:(0,o.createComponentVNode)(2,a.Flex,{justify:"center",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:u,width:"120px",height:"120px"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50% ",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eye-dropper",onClick:function(){return c("select")},children:"Select Color"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"fill-drip",onClick:function(){return c("paint")},children:"Paint Items"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"tint-slash",onClick:function(){return c("clear")},children:"Remove Paintjob"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",onClick:function(){return c("eject")},children:"Eject Items"})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Items",children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:["#",t+1,": ",e]},t)}))})],4)||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No items inserted."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ComputerFabricator=void 0;var o=n(0),r=(n(7),n(1)),a=n(2),i=n(3);t.ComputerFabricator=function(e,t){var n=(0,r.useBackend)(t),s=n.act,m=n.data;return(0,o.createComponentVNode)(2,i.Window,{title:"Personal Computer Vendor",width:500,height:420,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{italic:!0,fontSize:"20px",children:"Your perfect device, only three steps away..."}),0!==m.state&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mb:1,icon:"circle",content:"Clear Order",onClick:function(){return s("clean_order")}}),0===m.state&&(0,o.createComponentVNode)(2,c),1===m.state&&(0,o.createComponentVNode)(2,l),2===m.state&&(0,o.createComponentVNode)(2,d),3===m.state&&(0,o.createComponentVNode)(2,u)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 1",minHeight:"306px",children:[(0,o.createComponentVNode)(2,a.Box,{mt:5,bold:!0,textAlign:"center",fontSize:"40px",children:"Choose your Device"}),(0,o.createComponentVNode)(2,a.Box,{mt:3,children:(0,o.createComponentVNode)(2,a.Grid,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"laptop",content:"Laptop",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return i("pick_device",{pick:"1"})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"tablet-alt",content:"Tablet",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return i("pick_device",{pick:"2"})}})})]})})]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 2: Customize your device",minHeight:"282px",buttons:(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"good",children:[c.totalprice,"\u20ae"]}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Battery:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to operate without external utility power\nsource. Advanced batteries increase battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_battery,onClick:function(){return i("hw_battery",{battery:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===c.hw_battery,onClick:function(){return i("hw_battery",{battery:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===c.hw_battery,onClick:function(){return i("hw_battery",{battery:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Hard Drive:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Stores file on your device. Advanced drives can store more\nfiles, but use more power, shortening battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_disk,onClick:function(){return i("hw_disk",{disk:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===c.hw_disk,onClick:function(){return i("hw_disk",{disk:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===c.hw_disk,onClick:function(){return i("hw_disk",{disk:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Network Card:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to wirelessly connect to stationwide NTNet\nnetwork. Basic cards are limited to on-station use, while\nadvanced cards can operate anywhere near the station, which\nincludes asteroid outposts",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===c.hw_netcard,onClick:function(){return i("hw_netcard",{netcard:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_netcard,onClick:function(){return i("hw_netcard",{netcard:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===c.hw_netcard,onClick:function(){return i("hw_netcard",{netcard:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Nano Printer:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A device that allows for various paperwork manipulations,\nsuch as, scanning of documents or printing new ones.\nThis device was certified EcoFriendlyPlus and is capable of\nrecycling existing paper for printing purposes.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===c.hw_nanoprint,onClick:function(){return i("hw_nanoprint",{print:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_nanoprint,onClick:function(){return i("hw_nanoprint",{print:"1"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Secondary Card Reader:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Adds a secondary RFID card reader, for manipulating or\nreading from a second standard RFID card.\nPlease note that a primary card reader is necessary to\nallow the device to read your identification, but one\nis included in the base price.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===c.hw_card,onClick:function(){return i("hw_card",{card:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_card,onClick:function(){return i("hw_card",{card:"1"})}})})]}),2!==c.devtype&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Processor Unit:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A component critical for your device's functionality.\nIt allows you to run programs from your hard drive.\nAdvanced CPUs use more power, but allow you to run\nmore programs on background at once.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_cpu,onClick:function(){return i("hw_cpu",{cpu:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===c.hw_cpu,onClick:function(){return i("hw_cpu",{cpu:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Tesla Relay:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"An advanced wireless power relay that allows your device\nto connect to nearby area power controller to provide\nalternative power source. This component is currently\nunavailable on tablet computers due to size restrictions.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===c.hw_tesla,onClick:function(){return i("hw_tesla",{tesla:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===c.hw_tesla,onClick:function(){return i("hw_tesla",{tesla:"1"})}})})]})],4)]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:3,content:"Confirm Order",color:"good",textAlign:"center",fontSize:"18px",lineHeight:2,onClick:function(){return i("confirm_order")}})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Section,{title:"Step 3: Payment",minHeight:"282px",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,textAlign:"center",fontSize:"20px",children:"Your device is ready for fabrication..."}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:2,textAlign:"center",fontSize:"16px",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"Please swipe your ID now to authorize payment of:"}),"\xa0",(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"good",children:[i.totalprice,"\u20ae"]})]})]})},u=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{minHeight:"282px",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"28px",mt:10,children:"Thank you for your purchase!"}),(0,o.createComponentVNode)(2,a.Box,{italic:!0,mt:1,textAlign:"center",children:"If you experience any difficulties with your new device, please contact your local network administrator."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CookingAppliance=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.CookingAppliance=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.temperature,u=l.optimalTemp,s=l.temperatureEnough,m=l.efficiency,p=l.containersRemovable,h=l.our_contents;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:s?"good":"blue",value:d,maxValue:u+100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d}),"\xb0C / ",u,"\xb0C"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Efficiency",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m}),"%"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Containers",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:h.map((function(e,t){return e.empty?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot #"+(t+1),children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("slot",{slot:t+1})},children:"Empty"})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot #"+(t+1),verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,onClick:function(){return c("slot",{slot:t+1})},children:e.container||"No Container"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.progressText[0],value:e.progress,maxValue:1,children:e.progressText[1]})})]})},t)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:520,height:470,resizeable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return i("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return i("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=i.isBeakerLoaded,l=i.beakerLabel,d=i.beakerVolume;return c?(0,o.createFragment)([l||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No label"}),(0,o.createComponentVNode)(2,a.Box,{color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryoStorageItemsVr=t.CryoStorageVr=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(187);t.CryoStorageVr=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.real_name,s=d.allow_items,m=(0,r.useLocalState)(t,"tab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:"Crew"}),!!s&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:"Items"})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Welcome, ",u,"."]}),0===p&&(0,o.createComponentVNode)(2,c.CryoStorageCrew),!!s&&1===p&&(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.items);return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:i.length&&i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e},e)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No items stored."})})};t.CryoStorageItemsVr=l},function(e,t,n){"use strict";t.__esModule=!0,t.DNAForensics=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.DNAForensics=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.scan_progress,u=l.scanning,s=l.bloodsamp,m=l.bloodsamp_desc;return(0,o.createComponentVNode)(2,i.Window,{width:540,height:326,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{selected:u,disabled:!s,icon:"power-off",onClick:function(){return c("scanItem")},children:u?"Halt Scan":"Begin Scan"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",onClick:function(){return c("ejectItem")},children:"Eject Bloodsample"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[99,Infinity],violet:[-Infinity,99]},value:d,maxValue:100})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Blood Sample",children:s&&(0,o.createComponentVNode)(2,a.Box,{children:[s,(0,o.createComponentVNode)(2,a.Box,{color:"label",children:m})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No blood sample inserted."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(45),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,V,{duration:d})),(0,o.createComponentVNode)(2,i.Window,{width:660,height:700,resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal),n,(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,d=c.locked,u=c.hasOccupant,s=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return i("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return i("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,i=(0,r.useBackend)(t),c=i.act,l=i.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,g)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.selectedUIBlock,d=c.selectedUISubBlock,u=c.selectedUITarget,s=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return i("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return i("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.selectedSEBlock,d=c.selectedSESubBlock,u=c.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return i("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.radiationIntensity,d=c.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return i("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return i("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return i("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:i}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.id,d=e.name,u=e.buffer,s=c.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return i("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return i("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return i("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return i("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return i("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return i("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return i("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return i("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return i("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return i("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.hasDisk,d=c.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return i("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return i("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},g=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isBeakerLoaded,d=c.beakerVolume,s=c.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return i("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return i("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return i("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},V=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=c.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var c=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===c,content:m[e+r],mb:"0",onClick:function(){return i(s,{block:t,subblock:c})}}))},c=0;c1?"Dangerous!":null]},e.stage)}))||(0,o.createComponentVNode)(2,a.Box,{children:"No virus sample loaded."})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Affected Species",color:"label",children:[m&&m.length?null:"None",m.sort().join(", ")]}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Reverse Engineering",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",mb:1,children:(0,o.createVNode)(1,"i",null,"CAUTION: Reverse engineering will destroy the viral sample.",16)}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.stage,icon:"exchange-alt",onClick:function(){return i("grab",{grab:e.reference})}},e.stage)})),(0,o.createComponentVNode)(2,a.Button,{content:"Species",icon:"exchange-alt",onClick:function(){return i("affected_species")}})]})],4)]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.dish_inserted,c.buffer),d=c.species_buffer,u=(c.effects,c.info);c.growth,c.affected_species,c.busy;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Memory Buffer",children:l?(0,o.createComponentVNode)(2,a.Box,{children:[l.name," (",l.stage,")"]}):d?(0,o.createComponentVNode)(2,a.Box,{children:d}):"Empty"})}),(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"save",content:"Save To Disk",disabled:!l&&!d,onClick:function(){return i("disk")}}),l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #1",disabled:l.stage>1,onClick:function(){return i("splice",{splice:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #2",disabled:l.stage>2,onClick:function(){return i("splice",{splice:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #3",disabled:l.stage>3,onClick:function(){return i("splice",{splice:3})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice #4",disabled:l.stage>4,onClick:function(){return i("splice",{splice:4})}})]}):d?(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Splice Species",disabled:!d||u,onClick:function(){return i("splice",{splice:5})}})}):null]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DishIncubator=void 0;var o=n(0),r=(n(5),n(21)),a=n(1),i=n(2),c=n(3);t.DishIncubator=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.system_in_use,m=d.food_supply,p=d.radiation,h=d.growth,f=d.toxins,C=d.chemicals_inserted,N=d.can_breed_virus,b=d.chemical_volume,g=d.max_chemical_volume,V=d.dish_inserted,v=d.blood_already_infected,k=d.virus,y=d.analysed,_=d.infection_rate;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Environmental Conditions",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:u,content:u?"On":"Off",onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,i.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"radiation",content:"Add Radiation",onClick:function(){return l("rad")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{fluid:!0,color:"red",icon:"trash",confirmIcon:"trash",content:"Flush System",disabled:!s,onClick:function(){return l("flush")}})})]}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Virus Food",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{good:[40,Infinity],average:[20,40],bad:[-Infinity,20]},value:m})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,color:p>=50?"bad":h>=25?"average":"good",value:p,children:[(0,r.formatCommaNumber)(1e4*p)," \xb5Sv"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxicity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{bad:[50,Infinity],average:[25,50],good:[-Infinity,25]},value:f})})]})]}),(0,o.createComponentVNode)(2,i.Section,{title:N?"Vial":"Chemicals",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject "+(N?"Vial":"Chemicals"),disabled:!C,onClick:function(){return l("ejectchem")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"virus",content:"Breed Virus",disabled:!N,onClick:function(){return l("virus")}})],4),children:C&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:g,value:b,children:[b,"/",g]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Breeding Environment",color:N?"good":"average",children:[V?N?"Suitable":"No hemolytic samples detected":"N/A",v?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"CAUTION: Viral infection detected in blood sample."}):null]})]})})||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No chemicals inserted."})}),(0,o.createComponentVNode)(2,i.Section,{title:"Virus Dish",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Dish",disabled:!V,onClick:function(){return l("ejectdish")}}),children:V?k?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Growth Density",children:(0,o.createComponentVNode)(2,i.ProgressBar,{minValue:0,maxValue:100,ranges:{good:[50,Infinity],average:[25,50],bad:[-Infinity,25]},value:h})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Infection Rate",children:y?_:"Unknown."})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No virus detected."}):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No dish loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalBin=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.DisposalBin=function(e,t){var n,c,l=(0,r.useBackend)(t),d=l.act,u=l.data;return 2===u.mode?(n="good",c="Ready"):u.mode<=0?(n="bad",c="N/A"):1===u.mode?(n="average",c="Pressurizing"):(n="average",c="Idle"),(0,o.createComponentVNode)(2,i.Window,{width:300,height:250,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,m:1,children:"Status"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:n,children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[-Infinity,0],average:[0,99],good:[99,Infinity]},value:u.pressure,minValue:0,maxValue:100})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,m:1,children:"Controls"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Handle",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-off",disabled:u.isAI||u.panel_open,content:"Disengaged",selected:u.flushing?null:"selected",onClick:function(){return d("disengageHandle")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-on",disabled:u.isAI||u.panel_open,content:"Engaged",selected:u.flushing?"selected":null,onClick:function(){return d("engageHandle")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-off",disabled:-1===u.mode,content:"Off",selected:u.mode?null:"selected",onClick:function(){return d("pumpOff")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"toggle-on",disabled:-1===u.mode,content:"On",selected:u.mode?"selected":null,onClick:function(){return d("pumpOn")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Eject",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",disabled:u.isAI,content:"Eject Contents",onClick:function(){return d("eject")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DroneConsole=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.DroneConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.drones,u=l.areas,s=l.selected_area,m=l.fabricator,p=l.fabPower;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Drone Fabricator",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!m,selected:p,icon:"power-off",content:p?"Enabled":"Disabled",onClick:function(){return c("toggle_fab")}}),children:m?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Linked."}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Fabricator not detected.",(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Search for Fabricator",onClick:function(){return c("search_fab")}})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Request Drone",children:[(0,o.createComponentVNode)(2,a.Dropdown,{options:u?u.sort():null,selected:s,width:"100%",onSelected:function(e){return c("set_dcall_area",{area:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"share-square",content:"Send Ping",onClick:function(){return c("ping")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Units",children:d&&d.length?(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Resync",onClick:function(){return c("resync",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",color:"red",content:"Shutdown",onClick:function(){return c("shutdown",{ref:e.ref})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:e.loc}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:[e.charge," / ",e.maxCharge]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active",children:e.active?"Yes":"No"})]})},e.name)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No drones detected."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmbeddedController=void 0;var o=n(0),r=(n(7),n(5),n(1)),a=n(2),i=n(3),c=((0,n(24).createLogger)("fuck"),{});t.EmbeddedController=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.internalTemplateName),l=c[a];if(!l)throw Error("Unable to find Component for template name: "+a);return(0,o.createComponentVNode)(2,i.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=e.bars;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.color(e.value),minValue:e.minValue,maxValue:e.maxValue,value:e.value,children:e.textValue})},e.label)}))})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act,l=!0;i.interior_status&&"open"===i.interior_status.state?l=!1:i.external_pressure&&i.chamber_pressure&&(l=!(Math.abs(i.external_pressure-i.chamber_pressure)>5));var d=!0;return i.exterior_status&&"open"===i.exterior_status.state?d=!1:i.internal_pressure&&i.chamber_pressure&&(d=!(Math.abs(i.internal_pressure-i.chamber_pressure)>5)),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:i.airlock_disabled,icon:"arrow-left",content:"Cycle to Exterior",onClick:function(){return c("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:i.airlock_disabled,icon:"arrow-right",content:"Cycle to Interior",onClick:function(){return c("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:i.airlock_disabled,color:l?"":"bad",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Force Exterior Door",onClick:function(){return c("force_ext")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:i.airlock_disabled,color:d?"":"bad",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Force Interior Door",onClick:function(){return c("force_int")}})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=(n.act,{docked:(0,o.createComponentVNode)(2,s),undocking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"EJECTING-STAND CLEAR!"}),undocked:(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"POD EJECTED"}),docking:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"INITIALIZING..."})}),l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"ERROR"});return"open"===i.exterior_status.state?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"OPEN"}):"unlocked"===i.exterior_status.lock?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNSECURED"}):"locked"===i.exterior_status.lock&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SECURED"})),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Escape Pod Status",children:c[i.docking_status]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Docking Hatch",children:l})]})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.data;n.act;return i.armed?(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"ARMED"}):(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SYSTEMS OK"})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=n.act;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!i.override_enabled,icon:"exclamation-triangle",content:"Force Exterior Door",color:"docked"!==i.docking_status?"bad":"",onClick:function(){return c("force_door")}}),(0,o.createComponentVNode)(2,a.Button,{selected:i.override_enabled,color:"docked"!==i.docking_status?"bad":"average",icon:"exclamation-triangle",content:"Override",onClick:function(){return c("toggle_override")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),i=n.data,c=(n.act,{docked:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"DOCKED"}),docking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"DOCKING"}),undocking:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNDOCKING"}),undocked:(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"NOT IN USE"})}[i.docking_status]);return i.override_enabled&&(c=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[i.docking_status.toUpperCase(),"-OVERRIDE ENABLED"]})),c};c.AirlockConsoleAdvanced=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"},s=[{minValue:0,maxValue:202,value:c.external_pressure,label:"External Pressure",textValue:c.external_pressure+" kPa",color:u},{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:u},{minValue:0,maxValue:202,value:c.internal_pressure,label:"Internal Pressure",textValue:c.internal_pressure+" kPa",color:u}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:s}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Purge",onClick:function(){return i("purge")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock-open",content:"Secure",onClick:function(){return i("secure")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsoleSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsolePhoron=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}},{minValue:0,maxValue:100,value:c.chamber_phoron,label:"Chamber Phoron",textValue:c.chamber_phoron+" mol",color:function(e){return e>5?"bad":e>.5?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.AirlockConsoleDocking=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=[{minValue:0,maxValue:202,value:c.chamber_pressure,label:"Chamber Pressure",textValue:c.chamber_pressure+" kPa",color:function(e){return e<80||e>120?"bad":e<95||e>110?"average":"good"}}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Dock",buttons:c.airlock_disabled||c.override_enabled?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:c.override_enabled?"red":"",content:"Override",onClick:function(){return i("toggle_override")}}):null,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,l,{bars:u}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!c.processing,icon:"ban",color:"bad",content:"Abort",onClick:function(){return i("abort")}})})]})],4)};c.DockingConsoleSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"ERROR"});return"open"===c.exterior_status.state?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"OPEN"}):"unlocked"===c.exterior_status.lock?l=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"UNSECURED"}):"locked"===c.exterior_status.lock&&(l=(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"SECURED"})),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!c.override_enabled,content:"Force exterior door",onClick:function(){return i("force_door")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:c.override_enabled?"red":"",content:"Override",onClick:function(){return i("toggle_override")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dock Status",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Docking Hatch",children:l})]})})};c.DockingConsoleMulti=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Docking Status",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Section,{title:"Airlocks",children:n.airlocks.length?(0,o.createComponentVNode)(2,a.LabeledList,{children:n.airlocks.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:e.override_enabled?"bad":"good",label:e.name,children:e.override_enabled?"OVERRIDE ENABLED":"STATUS OK"},e.name)}))}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",mt:"0.5em",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"door-closed",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No airlocks found."]})})})],4)};c.DoorAccessConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l="open"===c.interior_status.state||"closed"===c.exterior_status.state,d="open"===c.exterior_status.state||"closed"===c.interior_status.state;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:l?"arrow-left":"exclamation-triangle",content:l?"Cycle To Exterior":"Lock Exterior Door",onClick:function(){i(l?"cycle_ext_door":"force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"arrow-right":"exclamation-triangle",content:d?"Cycle To Interior":"Lock Interior Door",onClick:function(){i(d?"cycle_int_door":"force_int")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Exterior Door Status",children:"closed"===c.exterior_status.state?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interior Door Status",children:"closed"===c.interior_status.state?"Locked":"Open"})]})})};c.EscapePodConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:c.armed,color:c.armed?"bad":"average",content:"ARM",onClick:function(){return i("manual_arm")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!c.can_force,color:"bad",content:"MANUAL EJECT",onClick:function(){return i("force_launch")}})]})]})],4)};c.EscapePodBerthConsole=function(e,t){(0,r.useBackend)(t).data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,m)})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ExonetNode=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ExonetNode=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.allowPDAs,s=l.allowCommunicators,m=l.allowNewscasters,p=l.logs;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,content:"Power "+(d?"On":"Off"),onClick:function(){return c("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming PDA Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:u,content:u?"Open":"Closed",onClick:function(){return c("toggle_PDA_port")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Communicators",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:s,content:s?"Open":"Closed",onClick:function(){return c("toggle_communicator_port")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Newscaster Content",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:m,content:m?"Open":"Closed",onClick:function(){return c("toggle_newscaster_port")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Logging",children:(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:[p.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{m:"2px",basis:"49%",grow:t%2,children:e},t)})),p&&0!==p.length?null:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No logs found."})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Farmbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Farmbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.locked,s=l.tank,m=l.tankVolume,p=l.tankMaxVolume,h=l.waters_trays,f=l.refills_water,C=l.uproots_weeds,N=l.replaces_nutriment;l.collects_produce,l.removes_dead;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:540,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Hyrdoponic Assisting Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Water Tank",children:s&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,maxValue:p,children:[m," / ",p]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No water tank detected."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:u?"good":"bad",children:u?"Locked":"Unlocked"})]})}),!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:[(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Watering Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Water plants",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("water")},children:h?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Refill watertank",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("refill")},children:f?"Yes":"No"})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Weeding controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Weed plants",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("weed")},children:C?"Yes":"No"})})})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Nutriment controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Replace fertilizer",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"toggle-on":"toggle-off",selected:N,onClick:function(){return c("replacenutri")},children:N?"Yes":"No"})})})})]})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FileCabinet=void 0;var o=n(0),r=n(17),a=n(1),i=n(2),c=n(3);t.FileCabinet=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.contents,u=(0,r.sortBy)((function(e){return e.name}))(d||[]);return(0,o.createComponentVNode)(2,c.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"file",content:e.name,onClick:function(){return l("retrieve",{ref:e.ref})}},e.ref)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Floorbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Floorbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.amount,p=l.possible_bmode,h=l.improvefloors,f=l.eattiles,C=l.maketiles,N=l.bmode;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:310,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Station Floor Repairer v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("start")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Improves Floors",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("improve")},children:h?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Finds Tiles",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("tiles")},children:f?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Makes Metal Sheets into Tiles",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("make")},children:C?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bridge Mode",children:(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,width:"100%",placeholder:"Disabled",selected:N,options:p,onSelected:function(e){return c("bridgemode",{dir:e})}})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasPump=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.GasPump=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.pressure_set,s=l.last_flow_rate,m=l.last_power_draw,p=l.max_power_draw;return(0,o.createComponentVNode)(2,i.Window,{width:470,height:290,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s/10})," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:p,color:m=100?s="Running":!d&&u>0&&(s="DISCHARGING"),(0,o.createComponentVNode)(2,i.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",color:"red",content:"Toggle Breaker",confirmContent:d?"This will disable gravity!":"This will enable gravity!",onClick:function(){return c("gentoggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Breaker Setting",children:d?"Generator Enabled":"Generator Disabled"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:["Generator ",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Status",children:[u,"%"]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.supportedPrograms,u=l.restrictedPrograms,s=l.currentProgram,m=l.isSilicon,p=l.safetyDisabled,h=l.emagged,f=l.gravity,C=d;return p&&(C=C.concat(u)),(0,o.createComponentVNode)(2,i.Window,{width:400,height:610,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{color:-1!==u.indexOf(e)?"bad":null,icon:"eye",content:e,selected:s===e,fluid:!0,onClick:function(){return c("program",{program:e})}},e)}))}),!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Override",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,disabled:h,color:p?"good":"bad",onClick:function(){return c("AIoverride")},children:[!!h&&"Error, unable to control. ",p?"Enable Safeties":"Disable Safeties"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:p?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"}):(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"ENABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity",children:(0,o.createComponentVNode)(2,a.Button,{icon:"user-astronaut",selected:f,onClick:function(){return c("gravity")},children:f?"Enabled":"Disabled"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICAssembly=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=(n(7),n(21));t.ICAssembly=function(e,t){var n=(0,a.useBackend)(t),u=(n.act,n.data),s=u.total_parts,m=u.max_components,p=u.total_complexity,h=u.max_complexity,f=u.battery_charge,C=u.battery_max,N=u.net_power,b=u.unremovable_circuits,g=u.removable_circuits;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:380,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Space in Assembly",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[0,.25],average:[.5,.75],bad:[.75,1]},value:s/m,maxValue:1,children:[s," / ",m," (",(0,r.round)(s/m*100,1),"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Complexity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[0,.25],average:[.5,.75],bad:[.75,1]},value:p/h,maxValue:1,children:[p," / ",h," (",(0,r.round)(p/h*100,1),"%)"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:f&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[0,.25],average:[.5,.75],good:[.75,1]},value:f/C,maxValue:1,children:[f," / ",C," (",(0,r.round)(f/C*100,1),"%)"]})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No cell detected."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Net Energy",children:0===N?"0 W/s":(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:N,format:function(e){return"-"+(0,l.formatPower)(Math.abs(e))+"/s"}})})]})}),b.length&&(0,o.createComponentVNode)(2,d,{title:"Built-in Components",circuits:b})||null,g.length&&(0,o.createComponentVNode)(2,d,{title:"Removable Components",circuits:g})||null]})})};var d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.title,c=e.circuits;return(0,o.createComponentVNode)(2,i.Section,{title:r,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("open_circuit",{ref:e.ref})},children:"View"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("rename_circuit",{ref:e.ref})},children:"Rename"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("scan_circuit",{ref:e.ref})},children:"Debugger Scan"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("remove_circuit",{ref:e.ref})},children:"Remove"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return n("bottom_circuit",{ref:e.ref})},children:"Move to Bottom"})]},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICCircuit=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7),l=n(21);t.ICCircuit=function(e,t){var n=(0,r.useBackend)(t),c=n.act,s=n.data,m=(s.name,s.desc),p=s.displayed_name,h=(s.removable,s.complexity),f=s.power_draw_idle,C=s.power_draw_per_use,N=s.extended_desc,b=s.inputs,g=s.outputs,V=s.activators;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:400,resizable:!0,title:p,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stats",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("rename")},children:"Rename"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("scan")},children:"Scan with Device"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("remove")},children:"Remove"})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:h}),f&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw (Idle)",children:(0,l.formatPower)(f)})||null,C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Draw (Active)",children:(0,l.formatPower)(C)})||null]}),N]}),(0,o.createComponentVNode)(2,a.Section,{title:"Circuit",children:[(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",spacing:1,children:[b.length&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Inputs",children:(0,o.createComponentVNode)(2,d,{list:b})})})||null,(0,o.createComponentVNode)(2,a.Flex.Item,{basis:b.length&&g.length?"33%":b.length||g.length?"45%":"100%",children:(0,o.createComponentVNode)(2,a.Section,{title:p,mb:1,children:(0,o.createComponentVNode)(2,a.Box,{children:m})})}),g.length&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Outputs",children:(0,o.createComponentVNode)(2,d,{list:g})})})||null]}),(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin_name",{pin:e.ref})},children:e.pulse_out?"":""}),(0,o.createComponentVNode)(2,u,{pin:e})]},e.name)}))})]})]})})};var d=function(e,t){var n=(0,r.useBackend)(t).act;return e.list.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_name",{pin:e.ref})},children:[(0,c.decodeHtmlEntities)(e.type),": ",e.name]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_data",{pin:e.ref})},children:e.data}),(0,o.createComponentVNode)(2,u,{pin:e})]},e.ref)}))},u=function(e,t){var n=(0,r.useBackend)(t).act,i=e.pin;return i.linked.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("pin_unwire",{pin:i.ref,link:e.ref})},children:e.name}),"@\xa0",(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return n("examine",{ref:e.holder_ref})},children:e.holder_name})]},e.ref)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.ICDetailer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(7);t.ICDetailer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.detail_color,s=d.color_list;return(0,o.createComponentVNode)(2,i.Window,{width:420,height:254,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:Object.keys(s).map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{ml:0,mr:0,mb:-.4,mt:0,tooltip:(0,c.toTitleCase)(e),tooltipPosition:t%6==5?"left":"right",height:"64px",width:"64px",onClick:function(){return l("change_color",{color:e})},style:s[e]===u?{border:"4px solid black","border-radius":0}:{"border-radius":0},backgroundColor:s[e]},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ICPrinter=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(17);n(24);t.ICPrinter=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=c.metal,u=c.max_metal,s=c.metal_per_sheet,m=(c.debug,c.upgraded),p=c.can_clone;c.assembly_to_clone,c.categories;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:630,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Metal",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l,maxValue:u,children:[l/s," / ",u/s," sheets"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Circuits Available",children:m?"Advanced":"Regular"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Assembly Cloning",children:p?"Available":"Unavailable"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Note: A red component name means that the printer must be upgraded to create that component."})]}),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){return!!e.can_build&&!(e.cost>t.metal)},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.categories,s=(d.debug,(0,r.useSharedState)(t,"categoryTarget",null)),m=s[0],p=s[1],h=(0,c.filter)((function(e){return e.name===m}))(u)[0];return(0,o.createComponentVNode)(2,a.Section,{title:"Circuits",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:(0,c.sortBy)((function(e){return e.name}))(u).map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:m===e.name,onClick:function(){return p(e.name)},children:e.name},e.name)}))}),h&&(0,o.createComponentVNode)(2,a.Section,{title:h.name,level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,c.sortBy)((function(e){return e.name}))(h.items).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,labelColor:e.can_build?"good":"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l(e,d),icon:"print",onClick:function(){return i("build",{build:e.path})},children:"Print"}),children:e.desc},e.name)}))})})||"No category selected."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.IDCard=void 0;var o=n(0),r=n(2),a=n(1),i=n(3),c=n(188);t.IDCard=function(e,t){var n=(0,a.useBackend)(t).data,l=n.registered_name,d=n.sex,u=n.age,s=n.assignment,m=n.fingerprint_hash,p=n.blood_type,h=n.dna_hash,f=n.photo_front,C=[{name:"Sex",val:d},{name:"Age",val:u},{name:"Blood Type",val:p},{name:"Fingerprint",val:m},{name:"DNA Hash",val:h}];return(0,o.createComponentVNode)(2,i.Window,{width:470,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Flex,{children:[(0,o.createComponentVNode)(2,r.Flex.Item,{basis:"25%",textAlign:"left",children:(0,o.createComponentVNode)(2,r.Box,{inline:!0,style:{width:"101px",height:"120px",overflow:"hidden",outline:"2px solid #4972a1"},children:f&&(0,o.createVNode)(1,"img",null,null,1,{src:f.substr(1,f.length-1),style:{width:"300px","margin-left":"-94px","-ms-interpolation-mode":"nearest-neighbor"}})||(0,o.createComponentVNode)(2,r.Icon,{name:"user",size:8,ml:1.5,mt:2.5})})}),(0,o.createComponentVNode)(2,r.Flex.Item,{basis:0,grow:1,children:(0,o.createComponentVNode)(2,r.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:e.name,children:e.val},e.name)}))})})]}),(0,o.createComponentVNode)(2,r.Flex,{className:"IDCard__NamePlate",align:"center",justify:"space-around",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:l})}),(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.RankIcon,{rank:s})})}),(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Box,{textAlign:"center",children:s})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InventoryPanel=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.InventoryPanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.slots,u=l.internalsValid;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:200,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act)},children:e.item||"Nothing"})},e.name)}))})}),u&&(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:u&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"lungs",onClick:function(){return c("internals")},children:"Set Internals"})||null})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InventoryPanelHuman=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.InventoryPanelHuman=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.slots,u=l.specialSlots,s=(l.internals,l.internalsValid),m=l.sensors,p=l.handcuffed,h=l.handcuffedParams,f=l.legcuffed,C=l.legcuffedParams,N=l.accessory;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d&&d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act,e.params)},children:e.item||"Nothing"})},e.name)})),(0,o.createComponentVNode)(2,a.LabeledList.Divider),u&&u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{mb:-1,icon:e.item?"hand-paper":"gift",onClick:function(){return c(e.act,e.params)},children:e.item||"Nothing"})},e.name)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"running",onClick:function(){return c("targetSlot",{slot:"splints"})},children:"Remove Splints"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"hand-paper",onClick:function(){return c("targetSlot",{slot:"pockets"})},children:"Empty Pockets"}),s&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"lungs",onClick:function(){return c("targetSlot",{slot:"internals"})},children:"Set Internals"})||null,m&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"book-medical",onClick:function(){return c("targetSlot",{slot:"sensors"})},children:"Set Sensors"})||null,p&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",h)},children:"Handcuffed"})||null,f&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",C)},children:"Legcuffed"})||null,N&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"bad",icon:"unlink",onClick:function(){return c("targetSlot",{slot:"tie"})},children:"Remove Accessory"})||null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.IsolationCentrifuge=void 0;var o=n(0),r=(n(5),n(21),n(1)),a=n(2),i=n(3);t.IsolationCentrifuge=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.busy,u=l.antibodies,s=l.pathogens,m=l.is_antibody_sample,p=l.sample_inserted,h=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No vial detected."});return p&&(h=u||s?(0,o.createFragment)([u?(0,o.createComponentVNode)(2,a.Section,{title:"Antibodies",children:u}):null,s.length?(0,o.createComponentVNode)(2,a.Section,{title:"Pathogens",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.spread_type},e.name)}))})}):null],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No antibodies or viral strains detected."})),(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:d?(0,o.createComponentVNode)(2,a.Section,{title:"The Centrifuge is currently busy.",color:"bad",children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:d}),2)}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:m?"Antibody Sample":"Blood Sample",children:[(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"print",content:"Print",disabled:!u&&!s.length,onClick:function(){return c("print")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Vial",disabled:!p,onClick:function(){return c("sample")}})})]}),h]}),u&&!m||s.length?(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&!m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Isolate Antibodies",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:u,onClick:function(){return c("antibody")}})}):null,s.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Isolate Strain",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:e.name,onClick:function(){return c("isolate",{isolate:e.reference})}},e.name)}))}):null]})}):null],0)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(5),a=n(17),i=n(1),c=n(2),l=n(3);t.Jukebox=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.playing,m=u.loop_mode,p=u.volume,h=u.current_track_ref,f=u.current_track,C=u.percent,N=u.tracks;return(0,o.createComponentVNode)(2,l.Window,{width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Currently Playing",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:s&&f&&(0,o.createComponentVNode)(2,c.Box,{children:[f.title," by ",f.artist||"Unkown"]})||(0,o.createComponentVNode)(2,c.Box,{children:"Stopped"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"play",disabled:s,onClick:function(){return d("play")},children:"Play"}),(0,o.createComponentVNode)(2,c.Button,{icon:"stop",disabled:!s,onClick:function(){return d("stop")},children:"Stop"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loop Mode",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"play",onClick:function(){return d("loopmode",{loopmode:1})},selected:1===m,children:"Next"}),(0,o.createComponentVNode)(2,c.Button,{icon:"random",onClick:function(){return d("loopmode",{loopmode:2})},selected:2===m,children:"Shuffle"}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",onClick:function(){return d("loopmode",{loopmode:3})},selected:3===m,children:"Repeat"}),(0,o.createComponentVNode)(2,c.Button,{icon:"step-forward",onClick:function(){return d("loopmode",{loopmode:4})},selected:4===m,children:"Once"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:C,maxValue:1,color:"good"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:0,step:.01,value:p,maxValue:1,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[0,.25]},format:function(e){return(0,r.round)(100*e,1)+"%"},onChange:function(e,t){return d("volume",{val:(0,r.round)(t,2)})}})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Available Tracks",children:N.length&&(0,a.sortBy)((function(e){return e.title}))(N).map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"play",selected:h===e.ref,onClick:function(){return d("change_track",{change_track:e.ref})},children:e.title},e.ref)}))||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Error: No songs loaded."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.isSlaved);return(0,o.createComponentVNode)(2,i.Window,{width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[l&&(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:["Law-synced to ",l]})||null,(0,o.createComponentVNode)(2,c)]})})};var c=function(e,t){var n=(0,r.useSharedState)(t,"lawsTabIndex",0),i=n[0],c=n[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return c(0)},children:"Law Management"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return c(1)},children:"Law Sets"})]}),0===i&&(0,o.createComponentVNode)(2,l)||null,1===i&&(0,o.createComponentVNode)(2,u)||null],0)},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.ion_law_nr,u=c.ion_law,s=c.zeroth_law,m=c.inherent_law,p=c.supplied_law,h=c.supplied_law_position,f=c.zeroth_laws,C=c.has_zeroth_laws,N=c.ion_laws,b=c.has_ion_laws,g=c.inherent_laws,V=c.has_inherent_laws,v=c.supplied_laws,k=c.has_supplied_laws,y=c.isAI,_=c.isMalf,B=c.isAdmin,L=c.channel,w=c.channels,x=f.map((function(e){return e.zero=!0,e})).concat(g);return(0,o.createComponentVNode)(2,a.Section,{children:[b&&(0,o.createComponentVNode)(2,d,{laws:N,title:l+" Laws:",mt:-2})||null,(C||V)&&(0,o.createComponentVNode)(2,d,{laws:x,title:"Inherent Laws",mt:-2})||null,k&&(0,o.createComponentVNode)(2,d,{laws:v,title:"Supplied Laws",mt:-2})||null,(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Controls",mt:-2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:w.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:L===e.channel,onClick:function(){return i("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",onClick:function(){return i("state_laws")},children:"State Laws"})}),y&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",onClick:function(){return i("notify_laws")},children:"Notify"})})||null]})}),_&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Add Laws",mt:-2,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Add"})]}),B&&!C&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:s,fluid:!0,onChange:function(e,t){return i("change_zeroth_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_zeroth_law")},children:"Add"})})]})||null,(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:u,fluid:!0,onChange:function(e,t){return i("change_ion_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_ion_law")},children:"Add"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:m,fluid:!0,onChange:function(e,t){return i("change_inherent_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_inherent_law")},children:"Add"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Input,{value:p,fluid:!0,onChange:function(e,t){return i("change_supplied_law",{val:t})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("change_supplied_law_position")},children:h})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_supplied_law")},children:"Add"})})]})]})})||null]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isMalf,d=c.isAdmin,u=e.laws,s=e.title,m=e.noButtons,p=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["laws","title","noButtons"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({level:2,title:s},p,{children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Law"}),!m&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"State"})||null,l&&!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Edit"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Delete"})],4)||null]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[e.index,"."]}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.zero?"bad":null,children:e.law}),!m&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"volume-up",selected:e.state,onClick:function(){return i("state_law",{ref:e.ref,state_law:!e.state})},children:e.state?"Yes":"No"})})||null,l&&!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.zero&&!d,icon:"pen",onClick:function(){return i("edit_law",{edit_law:e.ref})},children:"Edit"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.zero&&!d,color:"bad",icon:"trash",onClick:function(){return i("delete_law",{delete_law:e.ref})},children:"Delete"})})],4)||null]},e.index)}))]})})))},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.isMalf,u=c.law_sets;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Remember: Stating laws other than those currently loaded may be grounds for decommissioning! - NanoTrasen"}),u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"sync",onClick:function(){return i("transfer_laws",{transfer_laws:e.ref})},children:"Load Laws"}),(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",onClick:function(){return i("state_law_set",{state_law_set:e.ref})},children:"State Laws"})],4),children:[e.laws.has_ion_laws&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.ion_laws,title:e.laws.ion_law_nr+" Laws:"})||null,(e.laws.has_zeroth_laws||e.laws.has_inherent_laws)&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.zeroth_laws.concat(e.laws.inherent_laws),title:e.header})||null,e.laws.has_supplied_laws&&(0,o.createComponentVNode)(2,d,{noButtons:!0,laws:e.laws.supplied_laws,title:"Supplied Laws"})||null]},e.name)}))||null],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.LookingGlass=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.LookingGlass=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.supportedPrograms,u=l.currentProgram,s=l.immersion,m=l.gravity,p=Math.min(180+23*d.length,600);return(0,o.createComponentVNode)(2,i.Window,{width:300,height:p,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eye",selected:e===u,onClick:function(){return c("program",{program:e})},children:e},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"user-astronaut",selected:m,onClick:function(){return c("gravity")},children:m?"Enabled":"Disabled"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Full Immersion",children:(0,o.createComponentVNode)(2,a.Button,{mt:-1,fluid:!0,icon:"eye",selected:s,onClick:function(){return c("immersion")},children:s?"Enabled":"Disabled"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[s.length&&(0,o.createComponentVNode)(2,a.Modal,{children:(0,o.createComponentVNode)(2,a.Section,{height:"400px",style:{"overflow-y":"auto"},title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,") (",e.year,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,c.decodeHtmlEntities)(e.message)})]},e.time)}))})})||null,u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.ref})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.ref})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){return l("shock",{mt:e.ref})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,c.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Medbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Medbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.beaker,m=l.beaker_total,p=l.beaker_max,h=l.locked,f=l.heal_threshold,C=l.heal_threshold_max,N=l.injection_amount_min,b=l.injection_amount,g=l.injection_amount_max,V=l.use_beaker,v=l.declare_treatment,k=l.vocal;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Medical Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",onClick:function(){return c("eject")},children:"Eject"}),children:s&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,maxValue:p,children:[m," / ",p]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No beaker loaded."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:h?"good":"bad",children:h?"Locked":"Unlocked"})]})}),!h&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavioral Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{fluid:!0,minValue:0,maxValue:C,value:f,onDrag:function(e,t){return c("adj_threshold",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Amount",children:(0,o.createComponentVNode)(2,a.NumberInput,{fluid:!0,minValue:N,maxValue:g,value:b,onDrag:function(e,t){return c("adj_inject",{val:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c("use_beaker")},children:V?"Loaded Beaker (When available)":"Internal Synthesizer"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Treatment Report",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){return c("declaretreatment")},children:v?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speaker",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:k?"toggle-on":"toggle-off",selected:k,onClick:function(){return c("togglevoice")},children:k?"On":"Off"})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(1),a=n(2),i=n(45),c=n(3),l=n(131),d=n(132),u=n(62),s=(n(7),function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})});t.MedicalRecords=function(e,t){var n,s=(0,r.useBackend)(t).data,f=s.authenticated,C=s.screen;return f?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,p):4===C?n=(0,o.createComponentVNode)(2,h):5===C?n=(0,o.createComponentVNode)(2,N):6===C&&(n=(0,o.createComponentVNode)(2,b)),(0,o.createComponentVNode)(2,c.Window,{width:800,height:380,resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal,{maxHeight:"100%",maxWidth:"80%"}),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,u.TemporaryNotice),(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,a.Section,{height:"calc(100% - 5rem)",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{width:800,height:380,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return i("search",{t1:t})}}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.id+": "+e.name,onClick:function(){return i("d_rec",{d_rec:e.ref})}},t)}))})],4)},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all")}})],4)},h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.medical,d=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,f)}),(0,o.createComponentVNode)(2,a.Section,{title:"Medical Data",level:2,children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",color:"bad",onClick:function(){return i("del_r")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Entry",ml:"0.5rem",onClick:function(){return i("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return i("screen",{screen:2})}})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,a.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return s(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e.substr(1,e.length-1),style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[e.value,(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return s(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,a.Button,{icon:"comment-medical",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,i.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},N=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.virus;return c.sort((function(e,t){return e.name>t.name?1:-1})),c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return i("vir",{vir:e.D})}}),(0,o.createVNode)(1,"br")],4,t)}))},b=function(e,t){var n=(0,r.useBackend)(t).data.medbots;return 0===n.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Collapsible,{open:!0,title:e.name,children:(0,o.createComponentVNode)(2,a.Box,{px:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:e.on?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Online"}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Offline"})})]})})},t)}))},g=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:5===c,onClick:function(){return i("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:6===c,onClick:function(){return i("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=(0,r.useBackend)(t).act,i=e.args;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",title:i.name||"Virus",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",color:"red",onClick:function(){return n("modal_close")}}),children:(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Spread",children:[i.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Possible cure",children:i.antigen}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate of Progression",children:i.rate}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Antibiotic Resistance",children:[i.resistance,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species Affected",children:i.species}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Symptoms",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:i.symptoms.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.stage+". "+e.name,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",children:"Strength:"})," ",e.strength,"\xa0",(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",children:"Aggressiveness:"})," ",e.aggressiveness]},e.stage)}))})})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MessageMonitor=void 0;var o=n(0),r=(n(5),n(7)),a=n(1),i=n(2),c=n(3),l=n(62),d=n(61);t.MessageMonitor=function(e,t){var n,r=(0,a.useBackend)(t),d=(r.act,r.data),p=d.auth,h=d.linkedServer,f=(d.message,d.hacking),C=d.emag;return n=f||C?(0,o.createComponentVNode)(2,u):p?h?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"}):(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Window,{width:670,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.TemporaryNotice),n]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.isMalfAI);return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"ERROR",children:r?(0,o.createComponentVNode)(2,i.Box,{children:"Brute-forcing for server key. It will take 20 seconds for every character that the password has."}):(0,o.createComponentVNode)(2,i.Box,{children:["01000010011100100111010101110100011001010010110",(0,o.createVNode)(1,"br"),"10110011001101111011100100110001101101001011011100110011",(0,o.createVNode)(1,"br"),"10010000001100110011011110111001000100000011100110110010",(0,o.createVNode)(1,"br"),"10111001001110110011001010111001000100000011010110110010",(0,o.createVNode)(1,"br"),"10111100100101110001000000100100101110100001000000111011",(0,o.createVNode)(1,"br"),"10110100101101100011011000010000001110100011000010110101",(0,o.createVNode)(1,"br"),"10110010100100000001100100011000000100000011100110110010",(0,o.createVNode)(1,"br"),"10110001101101111011011100110010001110011001000000110011",(0,o.createVNode)(1,"br"),"00110111101110010001000000110010101110110011001010111001",(0,o.createVNode)(1,"br"),"00111100100100000011000110110100001100001011100100110000",(0,o.createVNode)(1,"br"),"10110001101110100011001010111001000100000011101000110100",(0,o.createVNode)(1,"br"),"00110000101110100001000000111010001101000011001010010000",(0,o.createVNode)(1,"br"),"00111000001100001011100110111001101110111011011110111001",(0,o.createVNode)(1,"br"),"00110010000100000011010000110000101110011001011100010000",(0,o.createVNode)(1,"br"),"00100100101101110001000000111010001101000011001010010000",(0,o.createVNode)(1,"br"),"00110110101100101011000010110111001110100011010010110110",(0,o.createVNode)(1,"br"),"10110010100101100001000000111010001101000011010010111001",(0,o.createVNode)(1,"br"),"10010000001100011011011110110111001110011011011110110110",(0,o.createVNode)(1,"br"),"00110010100100000011000110110000101101110001000000111001",(0,o.createVNode)(1,"br"),"00110010101110110011001010110000101101100001000000111100",(0,o.createVNode)(1,"br"),"10110111101110101011100100010000001110100011100100111010",(0,o.createVNode)(1,"br"),"10110010100100000011010010110111001110100011001010110111",(0,o.createVNode)(1,"br"),"00111010001101001011011110110111001110011001000000110100",(0,o.createVNode)(1,"br"),"10110011000100000011110010110111101110101001000000110110",(0,o.createVNode)(1,"br"),"00110010101110100001000000111001101101111011011010110010",(0,o.createVNode)(1,"br"),"10110111101101110011001010010000001100001011000110110001",(0,o.createVNode)(1,"br"),"10110010101110011011100110010000001101001011101000010111",(0,o.createVNode)(1,"br"),"00010000001001101011000010110101101100101001000000111001",(0,o.createVNode)(1,"br"),"10111010101110010011001010010000001101110011011110010000",(0,o.createVNode)(1,"br"),"00110100001110101011011010110000101101110011100110010000",(0,o.createVNode)(1,"br"),"00110010101101110011101000110010101110010001000000111010",(0,o.createVNode)(1,"br"),"00110100001100101001000000111001001101111011011110110110",(0,o.createVNode)(1,"br"),"10010000001100100011101010111001001101001011011100110011",(0,o.createVNode)(1,"br"),"10010000001110100011010000110000101110100001000000111010",(0,o.createVNode)(1,"br"),"001101001011011010110010100101110"]})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.isMalfAI;return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"Welcome",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"}),"Unauthorized"]}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["Decryption Key:",(0,o.createComponentVNode)(2,i.Input,{placeholder:"Decryption Key",ml:"0.5rem",onChange:function(e,t){return r("auth",{key:t})}})]}),!!c&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:"Hack",onClick:function(){return r("hack")}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Please authenticate with the server in order to show additional options."})]})},m=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.linkedServer,d=(0,a.useLocalState)(t,"tabIndex",0),u=d[0],s=d[1];return 0===u?n=(0,o.createComponentVNode)(2,p):1===u?n=(0,o.createComponentVNode)(2,h,{logs:l.pda_msgs,pda:!0}):2===u?n=(0,o.createComponentVNode)(2,h,{logs:l.rc_msgs,rc:!0}):3===u?n=(0,o.createComponentVNode)(2,f):4===u&&(n=(0,o.createComponentVNode)(2,C)),(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bars"})," Main Menu"]},"Main"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"font"})," Message Logs"]},"MessageLogs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"bold"})," Request Logs"]},"RequestLogs"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===u,onClick:function(){return s(3)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"comment-alt"})," Admin Messaging"]},"AdminMessage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:4===u,onClick:function(){return s(4)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"comment-slash"})," Spam Filter"]},"SpamFilter"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{color:"red",onClick:function(){return c("deauth")},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-out-alt"})," Log Out"]},"Logout")]}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:n})],4)},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.linkedServer;return(0,o.createComponentVNode)(2,i.Section,{title:"Main Menu",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"link",content:"Server Link",onClick:function(){return r("find")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"Server "+(c.active?"Enabled":"Disabled"),selected:c.active,onClick:function(){return r("active")}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Server Status",children:(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Good"})})}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"key",content:"Set Custom Key",onClick:function(){return r("pass")}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",confirmIcon:"exclamation-triangle",icon:"exclamation-triangle",content:"Clear Message Logs"}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",confirmIcon:"exclamation-triangle",icon:"exclamation-triangle",content:"Clear Request Logs"})]})},h=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=(n.data,e.logs),d=e.pda,u=e.rc;return(0,o.createComponentVNode)(2,i.Section,{title:d?"PDA Logs":u?"Request Logs":"Logs",buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",icon:"trash",confirmIcon:"trash",content:"Delete All",onClick:function(){return c(d?"del_pda":"del_rc")}}),children:(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{m:"2px",basis:"49%",grow:t%2,children:(0,o.createComponentVNode)(2,i.Section,{title:e.sender+" -> "+e.recipient,buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{confirmContent:"Delete Log?",color:"bad",icon:"trash",confirmIcon:"trash",onClick:function(){return c("delete",{id:e.ref,type:u?"rc":"pda"})}}),children:u?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",children:e.message}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Verification",color:"Unauthenticated"===e.id_auth?"bad":"good",children:(0,r.decodeHtmlEntities)(e.id_auth)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamp",children:e.stamp})]}):e.message})},e.ref)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.possibleRecipients,d=c.customsender,u=c.customrecepient,s=c.customjob,m=c.custommessage,p=Object.keys(l);return(0,o.createComponentVNode)(2,i.Section,{title:"Admin Messaging",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sender",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:d,onChange:function(e,t){return r("set_sender",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sender's Job",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:s,onChange:function(e,t){return r("set_sender_job",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Recipient",children:(0,o.createComponentVNode)(2,i.Dropdown,{value:u,options:p,width:"100%",mb:-.7,onSelected:function(e){return r("set_recipient",{val:l[e]})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",verticalAlign:"top",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,mb:.5,value:m,onChange:function(e,t){return r("set_message",{val:t})}})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"comment",content:"Send Message",onClick:function(){return r("send_message")}})]})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.linkedServer;return(0,o.createComponentVNode)(2,i.Section,{title:"Spam Filtering",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:c.spamFilter.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",color:"bad",content:"Delete",onClick:function(){return r("deltoken",{deltoken:e.index})}}),children:e.token},e.index)}))}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Add New Entry",onClick:function(){return r("addtoken")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Microwave=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Microwave=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.config,d=n.data,u=d.broken,s=d.operating,m=d.dirty,p=d.items;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:u&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Bzzzzttttt!!"})})||s&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"good",children:["Microwaving in progress!",(0,o.createVNode)(1,"br"),"Please wait...!"]})})||m&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["This microwave is dirty!",(0,o.createVNode)(1,"br"),"Please clean it before use!"]})})||p.length&&(0,o.createComponentVNode)(2,a.Section,{level:1,title:"Ingredients",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",onClick:function(){return c("cook")},children:"Microwave"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("dispose")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.amt," ",e.extra]},e.name)}))})})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[l.title," is empty."]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningOreProcessingConsole=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=(n(17),n(189));t.MiningOreProcessingConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.unclaimedPoints,s=(d.ores,d.showAllOres,d.power);return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,l.MiningUser,{insertIdText:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",mr:1,onClick:function(){return r("insert")},children:"Insert ID"}),"in order to claim points."]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,onClick:function(){return r("power")},children:s?"Smelting":"Not Smelting"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current unclaimed points",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:u<1,icon:"download",onClick:function(){return r("claim")},children:"Claim"}),children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:u})})})}),(0,o.createComponentVNode)(2,m)]})})};var d=["Not Processing","Smelting","Compressing","Alloying"],u=["verdantium","mhydrogen","diamond","platinum","uranium","gold","silver","rutile","phoron","marble","lead","sand","carbon","hematite"],s=function(e,t){return-1===u.indexOf(e.ore)||-1===u.indexOf(t.ore)?e.ore-t.ore:u.indexOf(t.ore)-u.indexOf(e.ore)},m=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,u=l.ores,m=l.showAllOres;l.power;return(0,o.createComponentVNode)(2,i.Section,{title:"Ore Processing Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:m?"toggle-on":"toggle-off",selected:m,onClick:function(){return c("showAllOres")},children:m?"All Ores":"Ores in Machine"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:u.length&&u.sort(s).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.name),buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"120px",color:(0===e.processing?"red":1===e.processing&&"green")||2===e.processing&&"blue"||3===e.processing&&"yellow",options:d,selected:d[e.processing],onSelected:function(t){return c("toggleSmelting",{ore:e.ore,set:d.indexOf(t)})}}),children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.amount})})},e.ore)}))||(0,o.createComponentVNode)(2,i.Box,{color:"bad",textAlign:"center",children:"No ores in machine."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningStackingConsole=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3);n(17);t.MiningStackingConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.stacktypes,s=d.stackingAmt;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stacker Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stacking",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,value:s,minValue:1,maxValue:50,stepPixelSize:5,onChange:function(e,t){return l("change_stack",{amt:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),u.length&&u.sort().map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.type),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return l("release_stack",{stack:e.type})},children:"Eject"}),children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.amt})},e.type)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Empty",color:"average",children:"No stacks in machine."})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=n(189);var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:400,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",scrollable:!0,children:[(0,o.createComponentVNode)(2,l.MiningUser,{insertIdText:"Please insert an ID in order to make purchases."}),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),l=(n.act,n.data),u=l.has_id,s=l.id,p=l.items,h=(0,a.useLocalState)(t,"search",""),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sort","Alphabetical")),N=C[0],b=(C[1],(0,a.useLocalState)(t,"descending",!1)),g=b[0],V=(b[1],(0,r.createSearch)(f,(function(e){return e[0]}))),v=!1,k=Object.entries(p).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=u&&s.points>=e[1].price,e[1]})).sort(d[N]);if(0!==n.length)return g&&(n=n.reverse()),v=!0,(0,o.createComponentVNode)(2,m,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,i.Section,{onClick:function(e){return(0,c.refocusLayout)()},children:v?k:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No items matching your criteria was found!"})})})},s=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,a.useLocalState)(t,"sort",""),l=(c[0],c[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,i.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.title,d=e.items,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Collapsible,Object.assign({open:!0,title:l},u,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,i.Button,{disabled:!c.has_id||c.id.pointsp?t+="0":t+="1";return t};return(0,o.createComponentVNode)(2,a.NtosWindow,{width:600,height:600,theme:"syndicate",children:(0,o.createComponentVNode)(2,a.NtosWindow.Content,{children:u&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:u})||s&&(0,o.createComponentVNode)(2,c.Section,{children:["Attempting to decrypt network access codes. Please wait. Rate: ",m," PHash/s",(0,o.createComponentVNode)(2,c.Box,{children:f(45)}),(0,o.createComponentVNode)(2,c.Box,{children:f(45)}),(0,o.createComponentVNode)(2,c.Box,{children:f(45)}),(0,o.createComponentVNode)(2,c.Box,{children:f(45)}),(0,o.createComponentVNode)(2,c.Box,{children:f(45)}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"ban",onClick:function(){return l("PRG_reset")},children:"Abort"})]})||(0,o.createComponentVNode)(2,c.Section,{title:"Pick access code to decrypt",children:h.length&&(0,o.createComponentVNode)(2,i.IdentificationComputerRegions,{actName:"PRG_execute"})||(0,o.createComponentVNode)(2,c.Box,{children:"Please insert ID card."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosArcade=void 0;var o=n(0),r=n(75),a=n(1),i=n(2),c=n(3);t.NtosArcade=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:450,height:350,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Outbomb Cuban Pete Ultra",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{size:2,children:[(0,o.createComponentVNode)(2,i.Box,{m:1}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Player Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.PlayerHitpoints,minValue:0,maxValue:30,ranges:{olive:[31,Infinity],good:[20,31],average:[10,20],bad:[-Infinity,10]},children:[d.PlayerHitpoints,"HP"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Player Magic",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.PlayerMP,minValue:0,maxValue:10,ranges:{purple:[11,Infinity],violet:[3,11],bad:[-Infinity,3]},children:[d.PlayerMP,"MP"]})})]}),(0,o.createComponentVNode)(2,i.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,i.Section,{backgroundColor:1===d.PauseState?"#1b3622":"#471915",children:d.Status})]}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:[(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.Hitpoints,minValue:0,maxValue:45,ranges:{good:[30,Infinity],average:[5,30],bad:[-Infinity,5]},children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.Hitpoints}),"HP"]}),(0,o.createComponentVNode)(2,i.Box,{m:1}),(0,o.createComponentVNode)(2,i.Section,{inline:!0,width:"156px",textAlign:"center",children:(0,o.createVNode)(1,"img",null,null,1,{src:(0,r.resolveAsset)(d.BossID)})})]})]}),(0,o.createComponentVNode)(2,i.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,i.Button,{icon:"fist-raised",tooltip:"Go in for the kill!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Attack")},content:"Attack!"}),(0,o.createComponentVNode)(2,i.Button,{icon:"band-aid",tooltip:"Heal yourself!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Heal")},content:"Heal!"}),(0,o.createComponentVNode)(2,i.Button,{icon:"magic",tooltip:"Recharge your magic!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Recharge_Power")},content:"Recharge!"})]}),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",tooltip:"One more game couldn't hurt.",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Start_Game")},content:"Begin Game"}),(0,o.createComponentVNode)(2,i.Button,{icon:"ticket-alt",tooltip:"Claim at your local Arcade Computer for Prizes!",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Dispense_Tickets")},content:"Claim Tickets"})]}),(0,o.createComponentVNode)(2,i.Box,{color:d.TicketCount>=1?"good":"normal",children:["Earned Tickets: ",d.TicketCount]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAtmosControl=void 0;var o=n(0),r=n(3),a=n(182);t.NtosAtmosControl=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:870,height:708,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.AtmosControlContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCameraConsole=void 0;var o=n(0),r=n(3),a=n(183);t.NtosCameraConsole=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:870,height:708,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.CameraConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCommunicationsConsole=void 0;var o=n(0),r=n(1),a=n(3),i=n(185);t.NtosCommunicationsConsole=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.NtosWindow,{width:400,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,a.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.CommunicationsConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosConfiguration=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosConfiguration=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.PC_device_theme,u=l.power_usage,s=l.battery_exists,m=l.battery,p=void 0===m?{}:m,h=l.disk_size,f=l.disk_used,C=l.hardware,N=void 0===C?[]:C;return(0,o.createComponentVNode)(2,i.NtosWindow,{theme:d,width:520,height:630,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Supply",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Draw: ",u,"W"]}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Battery Status",color:!s&&"average",children:s?(0,o.createComponentVNode)(2,a.ProgressBar,{value:p.charge,minValue:0,maxValue:p.max,ranges:{good:[p.max/2,Infinity],average:[p.max/4,p.max/2],bad:[-Infinity,p.max/4]},children:[p.charge," / ",p.max]}):"Not Available"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"File System",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:f,minValue:0,maxValue:h,color:"good",children:[f," GQ / ",h," GQ"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hardware Components",children:N.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createFragment)([!e.critical&&(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Enabled",checked:e.enabled,mr:1,onClick:function(){return c("PC_toggle_component",{name:e.name})}}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Usage: ",e.powerusage,"W"]})],0),children:e.desc},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCrewMonitor=void 0;var o=n(0),r=n(3),a=n(186);t.NtosCrewMonitor=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.CrewMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosDigitalWarrant=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(17);t.NtosDigitalWarrant=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=(a.warrantname,a.warrantcharges,a.warrantauth),d=(a.type,a.allwarrants,(0,o.createComponentVNode)(2,l));return c&&(d=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.NtosWindow,{width:500,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:d})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act;n.data.allwarrants;return(0,o.createComponentVNode)(2,a.Section,{title:"Warrants",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"plus",fluid:!0,onClick:function(){return i("addwarrant")},children:"Create New Warrant"}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Arrest Warrants",children:(0,o.createComponentVNode)(2,d,{type:"arrest"})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Search Warrants",children:(0,o.createComponentVNode)(2,d,{type:"search"})})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=e.type,u=l.allwarrants,s=(0,c.filter)((function(e){return e.arrestsearch===d}))(u);return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"arrest"===d?"Name":"Location"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"arrest"===d?"Charges":"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Edit"})]}),s.length&&s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.warrantname}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.charges}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.auth}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("editwarrant",{id:e.id})}})})]},e.id)}))||(0,o.createComponentVNode)(2,a.Table.Row,{children:(0,o.createComponentVNode)(2,a.Table.Cell,{colspan:"3",color:"bad",children:["No ",d," warrants found."]})})]})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.warrantname,d=c.warrantcharges,u=c.warrantauth,s=c.type,m="arrest"===s,p="arrest"===s?"Name":"Location",h="arrest"===s?"Charges":"Reason";return(0,o.createComponentVNode)(2,a.Section,{title:m?"Editing Arrest Warrant":"Editing Search Warrant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return i("savewarrant")},children:"Save"}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"trash",onClick:function(){return i("deletewarrant")},children:"Delete"}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return i("back")},children:"Back"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:p,buttons:m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"search",onClick:function(){return i("editwarrantname")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("editwarrantnamecustom")}})],4)||(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("editwarrantnamecustom")}}),children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:h,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("editwarrantcharges")}}),children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorized By",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"balance-scale",onClick:function(){return i("editwarrantauth")}}),children:u})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosEmailAdministration=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(190);t.NtosEmailAdministration=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.error,m=a.cur_title,p=a.current_account,h=(0,o.createComponentVNode)(2,l);return c?h=(0,o.createComponentVNode)(2,d):m?h=(0,o.createComponentVNode)(2,u):p&&(h=(0,o.createComponentVNode)(2,s)),(0,o.createComponentVNode)(2,i.NtosWindow,{width:600,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:h})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.accounts;return(0,o.createComponentVNode)(2,a.Section,{title:"Welcome to the NTNet Email Administration System",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,mb:1,children:"SECURE SYSTEM - Have your identification ready"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",onClick:function(){return i("newaccount")},children:"Create New Account"}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:1,mb:1,children:"Select account to administrate"}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eye",onClick:function(){return i("viewaccount",{viewaccount:e.uid})},children:e.login},e.uid)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.error;return(0,o.createComponentVNode)(2,a.Section,{title:"Message",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return i("back")},children:"Back"}),children:c})},u=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,c.NtosEmailClientViewMessage,{administrator:!0})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.error,c.msg_title,c.msg_body,c.msg_timestamp,c.msg_source,c.current_account),d=c.cur_suspended,u=c.messages;c.accounts;return(0,o.createComponentVNode)(2,a.Section,{title:"Viewing "+l+" in admin mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return i("back")},children:"Back"}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Status",children:(0,o.createComponentVNode)(2,a.Button,{color:d?"bad":"",icon:"ban",tooltip:(d?"Uns":"S")+"uspend Account?",onClick:function(){return i("ban")},children:d?"Suspended":"Normal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",onClick:function(){return i("changepass")},children:"Change Password"})})]}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Messages",children:u.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Source"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Received at"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.source}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return i("viewmail",{viewmail:e.uid})},children:"View"})})]},e.uid)}))]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No messages found in selected account."})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosFileManager=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);n(7);t.NtosFileManager=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.PC_device_theme,s=d.usbconnected,m=d.filename,p=d.filedata,h=d.error,f=d.files,C=void 0===f?[]:f,N=d.usbfiles,b=void 0===N?[]:N;return(0,o.createComponentVNode)(2,i.NtosWindow,{resizable:!0,theme:u,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:(m||h)&&(0,o.createComponentVNode)(2,a.Section,{title:"Viewing File "+m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Edit",onClick:function(){return l("PRG_edit")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",onClick:function(){return l("PRG_printfile")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Close",onClick:function(){return l("PRG_closefile")}})],4),children:[h||null,p&&(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:p}})]})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,c,{files:C,usbconnected:s,onUpload:function(e){return l("PRG_copytousb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onOpen:function(e){return l("PRG_openfile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",children:(0,o.createComponentVNode)(2,c,{usbmode:!0,files:b,usbconnected:s,onUpload:function(e){return l("PRG_copyfromusb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})})||null,(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("PRG_newtextfile")},children:"New Text File"})})],0)})})};var c=function(e){var t=e.files,n=void 0===t?[]:t,r=e.usbconnected,i=e.usbmode,c=e.onUpload,l=e.onDelete,d=e.onRename,u=e.onOpen;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"File"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Size"})]}),n.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.undeletable?e.name:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Input,{width:"80%",content:e.name,currentValue:e.name,tooltip:"Rename",onCommit:function(t,n){return d(e.name,n)}}),(0,o.createComponentVNode)(2,a.Button,{content:"Open",onClick:function(){return u(e.name)}})],4)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.size}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:!e.undeletable&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"times",confirmContent:"",tooltip:"Delete",onClick:function(){return l(e.name)}}),!!r&&(i?(0,o.createComponentVNode)(2,a.Button,{icon:"download",tooltip:"Download",onClick:function(){return c(e.name)}}):(0,o.createComponentVNode)(2,a.Button,{icon:"upload",tooltip:"Upload",onClick:function(){return c(e.name)}}))],0)})]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosIdentificationComputer=void 0;var o=n(0),r=(n(17),n(1)),a=(n(2),n(3)),i=(n(7),n(32),n(133));t.NtosIdentificationComputer=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.NtosWindow,{width:600,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,a.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.IdentificationComputerContent,{ntos:!0})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosMain=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c={compconfig:"cog",ntndownloader:"download",filemanager:"folder",smmonitor:"radiation",alarmmonitor:"bell",cardmod:"id-card",arcade:"gamepad",ntnrc_client:"comment-alt",nttransfer:"exchange-alt",powermonitor:"plug",job_manage:"address-book",crewmani:"clipboard-list",robocontrol:"robot",atmosscan:"thermometer-half",shipping:"tags"};t.NtosMain=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.device_theme,s=d.programs,m=void 0===s?[]:s,p=d.has_light,h=d.light_on,f=d.comp_light_color,C=d.removable_media,N=void 0===C?[]:C,b=d.login,g=void 0===b?[]:b;return(0,o.createComponentVNode)(2,i.NtosWindow,{title:"syndicate"===u?"Syndix Main Menu":"NtOS Main Menu",theme:u,width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:[!!p&&(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Button,{width:"144px",icon:"lightbulb",selected:h,onClick:function(){return l("PC_toggle_light")},children:["Flashlight: ",h?"ON":"OFF"]}),(0,o.createComponentVNode)(2,a.Button,{ml:1,onClick:function(){return l("PC_light_color")},children:["Color:",(0,o.createComponentVNode)(2,a.ColorBox,{ml:1,color:f})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"User Login",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",disabled:!g.IDName,onClick:function(){return l("PC_Eject_Disk",{name:"ID"})}}),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:["ID Name: ",g.IDName]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:["Assignment: ",g.IDJob]})]})}),!!N.length&&(0,o.createComponentVNode)(2,a.Section,{title:"Media Eject",children:(0,o.createComponentVNode)(2,a.Table,{children:N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:"eject",content:e,onClick:function(){return l("PC_Eject_Disk",{name:e})}})})},e)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:(0,o.createComponentVNode)(2,a.Table,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:c[e.name]||"window-maximize-o",content:e.desc,onClick:function(){return l("PC_runprogram",{name:e.name})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,width:"18px",children:!!e.running&&(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"times",tooltip:"Close program",tooltipPosition:"left",onClick:function(){return l("PC_killprogram",{name:e.name})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,width:"18px",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",tooltip:"Set Autorun",tooltipPosition:"left",selected:e.autorun,onClick:function(){return l("PC_setautorun",{name:e.name})},children:"AR"})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetChat=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosNetChat=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.can_admin,u=l.adminmode,s=l.authed,m=l.username,p=l.active_channel,h=l.is_operator,f=l.all_channels,C=void 0===f?[]:f,N=l.clients,b=void 0===N?[]:N,g=l.messages,V=void 0===g?[]:g,v=null!==p,k=s||u;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:900,height:675,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"600px",children:(0,o.createComponentVNode)(2,a.Table,{height:"580px",children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"200px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"560px",overflowY:"scroll",children:[(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"New Channel...",onCommit:function(e,t){return c("PRG_newchannel",{new_channel_name:t})}}),C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.chan,selected:e.id===p,color:"transparent",onClick:function(){return c("PRG_joinchannel",{id:e.id})}},e.chan)}))]}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,mt:1,content:m+"...",currentValue:m,onCommit:function(e,t){return c("PRG_changename",{new_name:t})}}),!!d&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"ADMIN MODE: "+(u?"ON":"OFF"),color:u?"bad":"good",onClick:function(){return c("PRG_toggleadmin")}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Box,{height:"560px",overflowY:"scroll",children:v&&(k?V.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.msg},e.msg)})):(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mt:4,fontSize:"40px"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,bold:!0,fontSize:"18px",children:"THIS CHANNEL IS PASSWORD PROTECTED"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"INPUT PASSWORD TO ACCESS"})]}))}),(0,o.createComponentVNode)(2,a.Input,{fluid:!0,selfClear:!0,mt:1,onEnter:function(e,t){return c("PRG_speak",{message:t})}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"150px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"465px",overflowY:"scroll",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.name},e.name)}))}),v&&k&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Save log...",defaultValue:"new_log",onCommit:function(e,t){return c("PRG_savelog",{log_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Leave Channel",onClick:function(){return c("PRG_leavechannel")}})],4),!!h&&s&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Delete Channel",onClick:function(){return c("PRG_deletechannel")}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Rename Channel...",onCommit:function(e,t){return c("PRG_renamechannel",{new_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Set Password...",onCommit:function(e,t){return c("PRG_setpassword",{new_password:t})}})],4)]})]})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDosContent=t.NtosNetDos=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosNetDos=function(e,t){return(0,o.createComponentVNode)(2,i.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.relays,d=void 0===l?[]:l,u=c.focus,s=c.target,m=c.speed,p=c.overload,h=c.capacity,f=c.error;if(f)return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:f}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Reset",textAlign:"center",onClick:function(){return i("PRG_reset")}})],4);var C=function(e){for(var t="",n=p/h;t.lengthn?t+="0":t+="1";return t};return s?(0,o.createComponentVNode)(2,a.Section,{fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{children:["CURRENT SPEED: ",m," GQ/s"]}),(0,o.createComponentVNode)(2,a.Box,{children:C(45)}),(0,o.createComponentVNode)(2,a.Box,{children:C(45)}),(0,o.createComponentVNode)(2,a.Box,{children:C(45)}),(0,o.createComponentVNode)(2,a.Box,{children:C(45)}),(0,o.createComponentVNode)(2,a.Box,{children:C(45)})]}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.id,selected:u===e.id,onClick:function(){return i("PRG_target_relay",{targid:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"EXECUTE",color:"bad",textAlign:"center",disabled:!u,mt:1,onClick:function(){return i("PRG_execute")}})]})};t.NtosNetDosContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDownloader=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.NtosNetDownloader=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.PC_device_theme,s=d.disk_size,m=d.disk_used,p=d.downloadable_programs,h=void 0===p?[]:p,f=d.error,C=d.hacked_programs,N=void 0===C?[]:C,b=d.hackedavailable;return(0,o.createComponentVNode)(2,c.NtosWindow,{theme:u,width:480,height:735,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[!!f&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:[(0,o.createComponentVNode)(2,i.Box,{mb:1,children:f}),(0,o.createComponentVNode)(2,i.Button,{content:"Reset",onClick:function(){return r("PRG_reseterror")}})]}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disk usage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:m,minValue:0,maxValue:s,children:m+" GQ / "+s+" GQ"})})})}),(0,o.createComponentVNode)(2,i.Section,{children:h.map((function(e){return(0,o.createComponentVNode)(2,l,{program:e},e.filename)}))}),!!b&&(0,o.createComponentVNode)(2,i.Section,{title:"UNKNOWN Software Repository",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{mb:1,children:"Please note that Nanotrasen does not recommend download of software from non-official servers."}),N.map((function(e){return(0,o.createComponentVNode)(2,l,{program:e},e.filename)}))]})]})})};var l=function(e,t){var n=e.program,c=(0,a.useBackend)(t),l=c.act,d=c.data,u=d.disk_size,s=d.disk_used,m=d.downloadcompletion,p=(d.downloading,d.downloadname),h=d.downloadsize,f=d.downloadspeed,C=d.downloads_queue,N=u-s;return(0,o.createComponentVNode)(2,i.Box,{mb:3,children:[(0,o.createComponentVNode)(2,i.Flex,{align:"baseline",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,grow:1,children:n.filedesc}),(0,o.createComponentVNode)(2,i.Flex.Item,{color:"label",nowrap:!0,children:[n.size," GQ"]}),(0,o.createComponentVNode)(2,i.Flex.Item,{ml:2,width:"94px",textAlign:"center",children:n.filename===p&&(0,o.createComponentVNode)(2,i.ProgressBar,{color:"green",minValue:0,maxValue:h,value:m,children:[(0,r.round)(m/h*100,1),"% (",f,"GQ/s)"]})||-1!==C.indexOf(n.filename)&&(0,o.createComponentVNode)(2,i.Button,{icon:"ban",color:"bad",onClick:function(){return l("PRG_removequeued",{filename:n.filename})},children:"Queued..."})||(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"download",content:"Download",disabled:n.size>N,onClick:function(){return l("PRG_downloadfile",{filename:n.filename})}})})]}),"Compatible"!==n.compatibility&&(0,o.createComponentVNode)(2,i.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{mx:1,color:"red",name:"times"}),"Incompatible!"]}),n.size>N&&(0,o.createComponentVNode)(2,i.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,i.Icon,{mx:1,color:"red",name:"times"}),"Not enough disk space!"]}),(0,o.createComponentVNode)(2,i.Box,{mt:1,italic:!0,color:"label",fontSize:"12px",children:n.fileinfo})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetMonitor=void 0;var o=n(0),r=n(2),a=n(1),i=n(3);t.NtosNetMonitor=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.ntnetrelays,u=l.ntnetstatus,s=l.config_softwaredownload,m=l.config_peertopeer,p=l.config_communication,h=l.config_systemcontrol,f=l.idsalarm,C=l.idsstatus,N=l.ntnetmaxlogs,b=l.maxlogs,g=l.minlogs,V=l.banned_nids,v=l.ntnetlogs,k=void 0===v?[]:v;return(0,o.createComponentVNode)(2,i.NtosWindow,{resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.NoticeBox,{children:"WARNING: Disabling wireless transmitters when using a wireless device may prevent you from reenabling them!"}),(0,o.createComponentVNode)(2,r.Section,{title:"Wireless Connectivity",buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:u?"power-off":"times",content:u?"ENABLED":"DISABLED",selected:u,onClick:function(){return c("toggleWireless")}}),children:d?(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Active NTNet Relays",children:d})}):"No Relays Connected"}),(0,o.createComponentVNode)(2,r.Section,{title:"Firewall Configuration",children:(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Software Downloads",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:s?"power-off":"times",content:s?"ENABLED":"DISABLED",selected:s,onClick:function(){return c("toggle_function",{id:"1"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Peer to Peer Traffic",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:m?"power-off":"times",content:m?"ENABLED":"DISABLED",selected:m,onClick:function(){return c("toggle_function",{id:"2"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Communication Systems",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:p?"power-off":"times",content:p?"ENABLED":"DISABLED",selected:p,onClick:function(){return c("toggle_function",{id:"3"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Remote System Control",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:h?"power-off":"times",content:h?"ENABLED":"DISABLED",selected:h,onClick:function(){return c("toggle_function",{id:"4"})}})})]})}),(0,o.createComponentVNode)(2,r.Section,{title:"Security Systems",children:[!!f&&(0,o.createFragment)([(0,o.createComponentVNode)(2,r.NoticeBox,{children:"NETWORK INCURSION DETECTED"}),(0,o.createComponentVNode)(2,r.Box,{italics:!0,children:"Abnormal activity has been detected in the network. Check system logs for more information"})],4),(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Banned NIDs",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,r.Button,{icon:"ban",onClick:function(){return c("ban_nid")},children:"Ban NID"}),(0,o.createComponentVNode)(2,r.Button,{icon:"balance-scale",onClick:function(){return c("unban_nid")},children:"Unban NID"})],4),children:V.join(", ")||"None"}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"IDS Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,r.Button,{icon:C?"power-off":"times",content:C?"ENABLED":"DISABLED",selected:C,onClick:function(){return c("toggleIDS")}}),(0,o.createComponentVNode)(2,r.Button,{icon:"sync",content:"Reset",color:"bad",onClick:function(){return c("resetIDS")}})],4)}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Max Log Count",buttons:(0,o.createComponentVNode)(2,r.NumberInput,{value:N,minValue:g,maxValue:b,width:"39px",onChange:function(e,t){return c("updatemaxlogs",{new_number:t})}})})]}),(0,o.createComponentVNode)(2,r.Section,{title:"System Log",level:2,buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:"trash",content:"Clear Logs",onClick:function(){return c("purgelogs")}}),children:k.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"candystripe",children:e.entry},e.entry)}))})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetTransfer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosNetTransfer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),m=a.error,p=a.downloading,h=a.uploading,f=a.upload_filelist,C=(0,o.createComponentVNode)(2,s);return m?C=(0,o.createComponentVNode)(2,c):p?C=(0,o.createComponentVNode)(2,l):h?C=(0,o.createComponentVNode)(2,d):f.length&&(C=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.NtosWindow,{width:575,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:C})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.error;return(0,o.createComponentVNode)(2,a.Section,{title:"An error has occured during operation.",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return i("PRG_reset")},children:"Reset"}),children:["Additional Information: ",c]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.download_name,d=c.download_progress,u=c.download_size,s=c.download_netspeed;return(0,o.createComponentVNode)(2,a.Section,{title:"Download in progress",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Downloaded File",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:[d," / ",u," GQ"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Speed",children:[s," GQ/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ban",onClick:function(){return i("PRG_reset")},children:"Cancel Download"})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.upload_clients,d=c.upload_filename,u=c.upload_haspassword;return(0,o.createComponentVNode)(2,a.Section,{title:"Server enabled",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Clients Connected",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Provided file",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Server Password",children:u?"Enabled":"Disabled"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Commands",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"lock",onClick:function(){return i("PRG_setpassword")},children:"Set Password"}),(0,o.createComponentVNode)(2,a.Button,{icon:"ban",onClick:function(){return i("PRG_reset")},children:"Cancel Upload"})]})]})})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.upload_filelist;return(0,o.createComponentVNode)(2,a.Section,{title:"File transfer server ready.",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return i("PRG_reset")},children:"Cancel"}),children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"lock",onClick:function(){return i("PRG_setpassword")},children:"Set Password"}),(0,o.createComponentVNode)(2,a.Section,{title:"Pick file to serve.",level:2,children:c.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"upload",onClick:function(){return i("PRG_uploadfile",{uid:e.uid})},children:[e.filename," (",e.size,"GQ)"]},e.uid)}))})]})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.servers;return(0,o.createComponentVNode)(2,a.Section,{title:"Available Files",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"upload",onClick:function(){return i("PRG_uploadmenu")},children:"Send File"}),children:c.length&&(0,o.createComponentVNode)(2,a.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.uid,children:[!!e.haspassword&&(0,o.createComponentVNode)(2,a.Icon,{name:"lock",mr:1}),e.filename,"\xa0 (",e.size,"GQ)\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"download",onClick:function(){return i("PRG_downloadfile",{uid:e.uid})},children:"Download"})]},e.uid)}))})||(0,o.createComponentVNode)(2,a.Box,{children:"No upload servers found."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNewsBrowser=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(75);t.NtosNewsBrowser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,s=n.data,m=s.article,p=s.download,h=s.message,f=(0,o.createComponentVNode)(2,d);return m?f=(0,o.createComponentVNode)(2,l):p&&(f=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.NtosWindow,{width:575,height:750,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:[h," ",(0,o.createComponentVNode)(2,a.Button,{icon:"times",onClick:function(){return c("PRG_clearmessage")}})]}),f]})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.article;if(!l)return(0,o.createComponentVNode)(2,a.Section,{children:"Error: Article not found."});var d=l.title,u=l.cover,s=l.content;return(0,o.createComponentVNode)(2,a.Section,{title:"Viewing: "+d,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return i("PRG_savearticle")},children:"Save"}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",onClick:function(){return i("PRG_reset")},children:"Close"})],4),children:[!!u&&(0,o.createVNode)(1,"img",null,null,1,{src:(0,c.resolveAsset)(u)}),(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:s}})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.showing_archived,d=c.all_articles;return(0,o.createComponentVNode)(2,a.Section,{title:"Articles List",buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{onClick:function(){return i("PRG_toggle_archived")},checked:l,children:"Show Archived"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"download",onClick:function(){return i("PRG_openarticle",{uid:e.uid})}}),children:[e.size," GQ"]},e.uid)}))||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Error",children:"There appear to be no outstanding news articles on NTNet today."})})})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.download,l=c.download_progress,d=c.download_maxprogress,u=c.download_rate;return(0,o.createComponentVNode)(2,a.Section,{title:"Downloading...",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",minValue:0,value:l,maxValue:d,children:[l," / ",d," GQ"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Download Speed",children:[u," GQ/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ban",fluid:!0,onClick:function(){return i("PRG_reset")},children:"Abort Download"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosOvermapNavigation=void 0;var o=n(0),r=n(3),a=n(191);t.NtosOvermapNavigation=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:380,height:530,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.OvermapNavigationContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosPowerMonitor=void 0;var o=n(0),r=n(3),a=n(192);t.NtosPowerMonitor=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:550,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.PowerMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRCON=void 0;var o=n(0),r=n(3),a=n(193);t.NtosRCON=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:630,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.RCONContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRevelation=void 0;var o=n(0),r=n(2),a=n(1),i=n(3);t.NtosRevelation=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Button.Input,{fluid:!0,content:"Obfuscate Name...",onCommit:function(e,t){return c("PRG_obfuscate",{new_name:t})},mb:1}),(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Payload Status",buttons:(0,o.createComponentVNode)(2,r.Button,{content:l.armed?"ARMED":"DISARMED",color:l.armed?"bad":"average",onClick:function(){return c("PRG_arm")}})})}),(0,o.createComponentVNode)(2,r.Button,{fluid:!0,bold:!0,content:"ACTIVATE",textAlign:"center",color:"bad",disabled:!l.armed})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosShutoffMonitor=void 0;var o=n(0),r=n(3),a=n(194);t.NtosShutoffMonitor=function(e,t){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:627,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.ShutoffMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosStationAlertConsole=void 0;var o=n(0),r=n(3),a=n(195);t.NtosStationAlertConsole=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:315,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.StationAlertConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosSupermatterMonitor=void 0;var o=n(0),r=n(3),a=n(196);t.NtosSupermatterMonitor=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:600,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.SupermatterMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosUAV=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosUAV=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.current_uav,u=l.signal_strength,s=l.in_use,m=l.paired_uavs;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:600,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Selected UAV",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"UAV",children:d&&d.status||"[Not Connected]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal",children:d&&u||"[Not Connected]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:d&&(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d.power,onClick:function(){return c("power_uav")},children:d.power?"Online":"Offline"})||"[Not Connected]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Camera",children:d&&(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:s,disabled:!d.power,onClick:function(){return c("view_uav")},children:d.power?"Available":"Unavailable"})||"[Not Connected]"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Paired UAVs",children:m.length&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"quidditch",onClick:function(){return c("switch_uav",{switch_uav:e.uavref})},children:e.name})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"times",onClick:function(){return c("del_uav",{del_uav:e.uavref})}})})]},e.uavref)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No UAVs Paired."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosWordProcessor=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.NtosWordProcessor=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.PC_device_theme,u=l.error,s=l.browsing,m=l.files,p=(l.usbconnected,l.usbfiles,l.filename),h=l.filedata;return(0,o.createComponentVNode)(2,i.NtosWindow,{resizable:!0,theme:d,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:u&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createVNode)(1,"h2",null,"An Error has occured:",16),"Additional Information: ",u,"Please try again. If the problem persists, contact your system administrator for assistance.",(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back to menu",onClick:function(){return c("PRG_backtomenu")}})]})||s&&(0,o.createComponentVNode)(2,a.Section,{title:"File Browser",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back to editor",onClick:function(){return c("PRG_closebrowser")}}),children:(0,o.createComponentVNode)(2,a.Section,{title:"Available documents (local)",level:2,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Size (GQ)"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0})]}),m.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.size}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{icon:"file-word",onClick:function(){return c("PRG_openfile",{PRG_openfile:e.name})},children:"Open"})})]},t)}))]})})})||(0,o.createComponentVNode)(2,a.Section,{title:"Document: "+p,children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_newfile")},children:"New"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_loadmenu")},children:"Load"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_savefile")},children:"Save"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_saveasfile")},children:"Save As"})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_editfile")},children:"Edit"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_txtrpeview")},children:"Preview"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("PRG_taghelp")},children:"Formatting Help"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!h,onClick:function(){return c("PRG_printfile")},children:"Print"})]}),(0,o.createComponentVNode)(2,a.Section,{mt:1,children:(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:h}})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OmniFilter=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=function(e){return e.input?"Input":e.output?"Output":e.f_type?e.f_type:"Disabled"};t.OmniFilter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.config,m=d.ports,p=d.set_flow_rate,h=d.last_flow_rate;return(0,o.createComponentVNode)(2,i.Window,{width:360,height:330,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:s?"Configuration":"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return l("power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",selected:s,onClick:function(){return l("configure")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:m?m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.dir+" Port",children:s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"IN",selected:e.input,icon:"compress-arrows-alt",onClick:function(){return l("switch_mode",{mode:"in",dir:e.dir})}}),(0,o.createComponentVNode)(2,a.Button,{content:"OUT",selected:e.output,icon:"expand-arrows-alt",onClick:function(){return l("switch_mode",{mode:"out",dir:e.dir})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:e.input||e.output,content:e.f_type||"None",onClick:function(){return l("switch_filter",{mode:e.f_type,dir:e.dir})}})],4):c(e)},e.dir)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Ports Detected"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Flow Rate",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Flow Rate",children:[h," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate Limit",children:s?(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:p/10+" L/s",onClick:function(){return l("set_flow_rate")}}):p/10+" L/s"})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OmniMixer=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=function(e){return e.input?"Input":e.output?"Output":e.f_type?e.f_type:"Disabled"};t.OmniMixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.power,s=d.config,m=d.ports,p=d.set_flow_rate,h=d.last_flow_rate;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:330,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:s?"Configuration":"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return c("power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",selected:s,onClick:function(){return c("configure")}})],4),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Port"}),s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Input"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Output"})],4):(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Mode"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Concentration"}),s?(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Lock"}):null]}),m?m.map((function(e){return(0,o.createComponentVNode)(2,l,{port:e,config:s},e.dir)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Ports Detected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Flow Rate",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Flow Rate",children:[h," L/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate Limit",children:s?(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:p/10+" L/s",onClick:function(){return c("set_flow_rate")}}):p/10+" L/s"})]})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t).act,i=e.port,l=e.config;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:i.dir+" Port"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:l?(0,o.createComponentVNode)(2,a.Button,{content:"IN",selected:i.input,disabled:i.output,icon:"compress-arrows-alt",onClick:function(){return n("switch_mode",{mode:i.input?"none":"in",dir:i.dir})}}):c(i)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:l?(0,o.createComponentVNode)(2,a.Button,{content:"OUT",selected:i.output,icon:"expand-arrows-alt",onClick:function(){return n("switch_mode",{mode:"out",dir:i.dir})}}):100*i.concentration+"%"}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",width:"20%",children:(0,o.createComponentVNode)(2,a.Button,{width:"100%",icon:"wrench",disabled:!i.input,content:i.input?100*i.concentration+" %":"-",onClick:function(){return n("switch_con",{dir:i.dir})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{icon:i.con_lock?"lock":"lock-open",disabled:!i.input,selected:i.con_lock,content:i.f_type||"None",onClick:function(){return n("switch_conlock",{dir:i.dir})}})})],4):null]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(5),a=n(1),i=n(3),c=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,i.Window,{width:650,height:455,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Current Procedure",level:"2",children:n.surgery&&n.surgery.length?(0,o.createComponentVNode)(2,c.LabeledList,{children:n.surgery.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current State",children:e.currentStage}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible Next Steps",children:e.nextSteps.map((function(e){return(0,o.createVNode)(1,"div",null,e,0,null,e)}))})]})},e.name)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.verbose,d=i.health,u=i.healthAlarm,s=i.oxy,m=i.oxyAlarm,p=i.crit;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,c.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:u,stepPixelSize:"5",ml:"0",format:function(e){return e+"%"},onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:m,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,c.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapDisperser=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(134);t.OvermapDisperser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:400,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.faillink,u=l.calibration,s=l.overmapdir,m=l.cal_accuracy,p=l.strength,h=l.range,f=l.next_shot,C=l.nopower,N=(l.skill,l.chargeload);return d?(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"Machine is incomplete, out of range, or misaligned!"}):(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"22%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Targeting",textAlign:"center",children:(0,o.createComponentVNode)(2,c.OvermapPanControls,{actToDo:"choose",selected:function(e){return e===s}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"74%",grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Charge",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Error",children:"At least one part of the machine is unpowered."})||null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Load Type",children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cooldown",children:0===f&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Ready"})||f>1&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," Seconds",(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Warning: Do not fire during cooldown."})]})||null})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",mt:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Calibration",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m}),"%",(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"exchange-alt",onClick:function(){return i("skill_calibration")},children:"Pre-Calibration"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:["Cal #",t,":",(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"random",onClick:function(){return i("calibration",{calibration:t})},children:e.toString()})]},t)}))})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",grow:1,mt:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Setup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"fist-raised",onClick:function(){return i("strength")},children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radius",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"expand-arrows-alt",onClick:function(){return i("range")},children:h})})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mt:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"red",icon:"bomb",onClick:function(){return i("fire")},children:"Fire ORB"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapEngines=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapEngines=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.global_state,u=l.global_limit,s=l.engines_info,m=l.total_thrust;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:530,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Engines",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("global_toggle")},children:d?"Shut All Engines Down":"Start All Engines"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Limit",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("global_limit",{global_limit:-.1})},icon:"minus"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("set_global_limit")},children:[u,"%"]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("global_limit",{global_limit:.1})},icon:"plus"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Thrust",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Engines",height:"340px",style:{"overflow-y":"auto"},children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mt:0!==t&&-1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"80%",children:(0,o.createComponentVNode)(2,a.Collapsible,{title:(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:["Engine #",t+1," | Thrust: ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.eng_thrust})," | Limit: ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.eng_thrust_limiter,format:function(e){return e+"%"}})]}),children:(0,o.createComponentVNode)(2,a.Section,{width:"127%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:e.eng_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Box,{color:e.eng_on?1===e.eng_on?"good":"average":"bad",children:e.eng_on?1===e.eng_on?"Online":"Booting":"Offline"}),e.eng_status.map((function(e){return Array.isArray(e)?(0,o.createComponentVNode)(2,a.Box,{color:e[1],children:e[0]}):(0,o.createComponentVNode)(2,a.Box,{children:e})}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Thrust",children:e.eng_thrust}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Limit",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("limit",{limit:-.1,engine:e.eng_reference})},icon:"minus"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("set_limit",{engine:e.eng_reference})},children:[e.eng_thrust_limiter,"%"]}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("limit",{limit:.1,engine:e.eng_reference})},icon:"plus"})]})]})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,iconSpin:-1===e.eng_on,color:-1===e.eng_on?"purple":null,selected:1===e.eng_on,icon:"power-off",onClick:function(){return c("toggle",{engine:e.eng_reference})},children:e.eng_on?1===e.eng_on?"Shutoff":"Booting":"Startup"})})]},t)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapFlightDataWrap=t.OvermapHelm=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(134);t.OvermapHelm=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{width:565,height:545,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"40%",height:"180px",children:(0,o.createComponentVNode)(2,l)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"25%",height:"180px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",height:"180px",children:(0,o.createComponentVNode)(2,u)})]}),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Flight Data",16),(0,o.createComponentVNode)(2,c.OvermapFlightData)],4,{style:{height:"100%",border:"1px solid #4972a1",margin:"none"}})};t.OvermapFlightDataWrap=l;var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.canburn,u=l.manual_control;return(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Manual Control",16),(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,c.OvermapPanControls,{disabled:!d,actToDo:"move"})})}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,underline:!0,children:"Direct Control"}),(0,o.createComponentVNode)(2,a.Button,{selected:u,onClick:function(){return i("manual")},icon:"compass",children:u?"Enabled":"Disabled"})]})],4,{style:{height:"100%",border:"1px solid #4972a1"}})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.dest,d=c.d_x,u=c.d_y,s=c.speedlimit,m=c.autopilot;return c.autopilot_disabled?(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Autopilot",16),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",color:"bad",fontSize:1.2,children:"AUTOPILOT DISABLED"}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",color:"average",children:"Warning: This vessel is equipped with a class I autopilot. Class I autopilots are unable to do anything but fly in a straight line directly towards the target, and may result in collisions."}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:1,color:"bad",content:"Unlock Autopilot",confirmContent:"ACCEPT RISKS?",icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",onClick:function(){return i("apilot_lock")}})})],4,{style:{height:"100%",border:"1px solid #4972a1"}}):(0,o.createVNode)(1,"fieldset","Section",[(0,o.createVNode)(1,"legend",null,"Autopilot",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("setcoord",{setx:!0})},children:d}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("setcoord",{sety:!0})},children:u})],4)||(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("setcoord",{setx:!0,sety:!0})},children:"None"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speed Limit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tachometer-alt",onClick:function(){return i("speedlimit")},children:[s," Gm/h"]})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,selected:m,disabled:!l,icon:"robot",onClick:function(){return i("apilot")},children:m?"Engaged":"Disengaged"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"good",icon:"exclamation-triangle",onClick:function(){return i("apilot_lock")},children:"Lock Autopilot"})],4,{style:{height:"100%",border:"1px solid #4972a1"}})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.sector,d=c.s_x,u=c.s_y,s=c.sector_info,m=c.landed,p=c.locations;return(0,o.createComponentVNode)(2,a.Section,{title:"Navigation Data",m:.3,mt:1,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coordinates",children:[d," : ",u]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Data",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:m})]}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",justify:"center",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"save",onClick:function(){return i("add",{add:"current"})},children:"Save Current Position"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"sticky-note",onClick:function(){return i("add",{add:"new"})},children:"Add New Entry"})})]}),(0,o.createComponentVNode)(2,a.Section,{mt:1,scrollable:!0,height:"130px",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Coordinates"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.x," : ",e.y]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",onClick:function(){return i("setds",{x:e.x,y:e.y})},children:"Plot Course"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",onClick:function(){return i("remove",{remove:e.reference})},children:"Remove"})]})]},e.name)}))]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapShieldGenerator=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapShieldGenerator=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:500,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,u=c.modes,s=c.offline_for;return s?(0,o.createComponentVNode)(2,a.Section,{title:"EMERGENCY SHUTDOWN",color:"bad",children:["An emergency shutdown has been initiated - generator cooling down. Please wait until the generator cools down before resuming operation. Estimated time left: ",s," seconds."]}):(0,o.createFragment)([(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:"Field Calibration",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:e.status,onClick:function(){return i("toggle_mode",{toggle_mode:e.flag})},children:e.status?"Enabled":"Disabled"}),children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:e.desc}),(0,o.createComponentVNode)(2,a.Box,{mt:.5,children:["Multiplier: ",e.multiplier]})]},e.name)}))})],4)},l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=i.running,l=i.overloaded,d=i.mitigation_max,u=i.mitigation_physical,s=i.mitigation_em,m=i.mitigation_heat,p=i.field_integrity,h=i.max_energy,f=i.current_energy,C=i.percentage_energy,N=i.total_segments,b=i.functional_segments,g=i.field_radius,V=i.target_radius,v=i.input_cap_kw,k=i.upkeep_power_usage,y=i.power_usage,_=i.spinup_counter;return(0,o.createComponentVNode)(2,a.Section,{title:"System Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generator is",children:1===c&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Shutting Down"})||2===c&&(l&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Overloaded"})||(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Running"}))||3===c&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Inactive"})||4===c&&(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:["Spinning Up\xa0",V!==g&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"(Adjusting Radius)"})||(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[2*_,"s"]})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Offline"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy Storage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:f,maxValue:h,children:[f," / ",h," MJ (",C,"%)"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shield Integrity",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:p}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mitigation",children:[s,"% EM / ",u,"% PH / ",m,"% HE / ",d,"% MAX"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upkeep Energy Use",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:k})," kW"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Energy Use",children:v&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:y,maxValue:v,children:[y," / ",v," kW"]})})||(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:y})," kW (No Limit)"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Field Size",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:b}),"\xa0/\xa0",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:N})," m\xb2 (radius ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),", target ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V}),")"]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.running,d=c.hacked,u=c.idle_multiplier,s=c.idle_valid_values;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([l>=2&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("begin_shutdown")},selected:!0,children:"Turn off"}),3===l&&(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("toggle_idle",{toggle_idle:0})},children:"Activate"})||(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("toggle_idle",{toggle_idle:1})},selected:!0,children:"Deactivate"})]})||(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return i("start_generator")},children:"Turn on"}),l&&d&&(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",onClick:function(){return i("emergency_shutdown")},color:"bad",children:"EMERGENCY SHUTDOWN"})||null],0),children:[(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",onClick:function(){return i("set_range")},children:"Set Field Range"}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",onClick:function(){return i("set_input_cap")},children:"Set Input Cap"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Set inactive power use intensity",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e===u,disabled:4===l,onClick:function(){return i("switch_idle",{switch_idle:e})},children:e},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.OvermapShipSensors=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.OvermapShipSensors=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.viewing,u=l.on,s=l.range,m=l.health,p=l.max_health,h=l.heat,f=l.critical_heat,C=l.status,N=l.contacts;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:545,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:d,onClick:function(){return c("viewing")},children:"Map View"}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:u,onClick:function(){return c("toggle")},children:u?"Sensors Enabled":"Sensors Disabled"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{icon:"signal",onClick:function(){return c("range")},children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*p,Infinity],average:[.25*p,.75*p],bad:[-Infinity,.25*p]},value:m,maxValue:p,children:[m," / ",p]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*f,Infinity],average:[.5*f,.75*f],good:[-Infinity,.5*f]},value:h,maxValue:f,children:h<.5*f&&(0,o.createComponentVNode)(2,a.Box,{children:"Temperature low."})||h<.75*f&&(0,o.createComponentVNode)(2,a.Box,{children:"Sensor temperature high!"})||(0,o.createComponentVNode)(2,a.Box,{children:"TEMPERATURE CRITICAL: Disable or reduce power immediately!"})})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contacts",children:N.length&&N.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"search",onClick:function(){return c("scan",{scan:e.ref})},children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,inline:!0,children:["Scan: ",e.name]}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[", bearing: ",e.bearing,"\xb0"]})]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No contacts on sensors."})}),"MISSING"===l.status&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wifi",onClick:function(){return c("link")},children:"Link up with sensor suite?"})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:185,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Run Scan",onClick:function(){return c("scan")}}),children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Ready - All parts in place":"Unable to detect all parts"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Particle Accelerator Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Particle Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d,onClick:function(){return c("remove_strength")}})," ",String(s).padStart(1,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d,onClick:function(){return c("add_strength")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PartsLathe=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7),l=n(130);t.PartsLathe=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(u.panelOpen,u.copyBoard),m=u.copyBoardReqComponents,p=u.queue,h=u.building,f=u.buildPercent,C=u.error,N=u.recipies;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[C&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:["Missing Materials: ",C]})||null,(0,o.createComponentVNode)(2,a.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,l.Materials,{displayAllMat:!0})}),h&&(0,o.createComponentVNode)(2,a.Section,{title:"Currently Building",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,c.toTitleCase)(h)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:f,maxValue:100})})]})})||null,s&&(0,o.createComponentVNode)(2,a.Section,{title:"Circuit Reader",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Loaded Circuit",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return d("ejectBoard")},children:"Eject"}),children:(0,c.toTitleCase)(s)})}),m&&m.length&&(0,o.createFragment)([m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.qty," x ",(0,c.toTitleCase)(e.name)]},e.name)})),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",onClick:function(){return d("queueBoard")},children:"Build All"})],0)||(0,o.createComponentVNode)(2,a.Box,{children:"Board has no required components."})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Queue",children:p.length&&p.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["#",t+1,": ",(0,c.toTitleCase)(e),(t>0||!h)&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"times",onClick:function(){return d("cancel",{cancel:t+1})},children:"Cancel"})||null]},e)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Queue Empty"})}),(0,o.createComponentVNode)(2,a.Section,{title:"Recipes",children:N.length&&N.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",onClick:function(){return d("queue",{queue:e.type})},children:(0,c.toTitleCase)(e.name)})},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PathogenicIsolator=void 0;var o=n(0),r=(n(5),n(21),n(1)),a=n(45),i=n(2),c=n(3),l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.can_print,l=e.args;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",title:l.name||"Virus",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{disabled:!c,icon:"print",content:"Print",onClick:function(){return a("print",{type:"virus_record",vir:l.record})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return a("modal_close")}})],4),children:(0,o.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[l.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:l.antigen}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate of Progression",children:l.rate}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Antibiotic Resistance",children:[l.resistance,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species Affected",children:l.species}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Symptoms",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.symptoms.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.stage+". "+e.name,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:"Strength:"})," ",e.strength,"\xa0"]}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:"Aggressiveness:"})," ",e.aggressiveness]})]},e.stage)}))})})]})})})};t.PathogenicIsolator=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.isolating),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1],f=null;return 0===p?f=(0,o.createComponentVNode)(2,d):1===p&&(f=(0,o.createComponentVNode)(2,u)),(0,a.modalRegisterBodyOverride)("virus",l),(0,o.createComponentVNode)(2,c.Window,{height:500,width:520,resizable:!0,children:[(0,o.createComponentVNode)(2,a.ComplexModal,{maxHeight:"100%",maxWidth:"95%"}),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,i.NoticeBox,{warning:!0,children:"The Isolator is currently isolating..."})||null,(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:"Home"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:"Database"})]}),f]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.syringe_inserted,d=c.pathogen_pool,u=c.can_print;return(0,o.createComponentVNode)(2,i.Section,{title:"Pathogens",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print",disabled:!u,onClick:function(){return a("print",{type:"patient_diagnosis"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Syringe",disabled:!l,onClick:function(){return a("eject")}})],4),children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:[(0,o.createVNode)(1,"u",null,[(0,o.createTextVNode)("Stamm #"),e.unique_id],0),e.is_in_database?" (Analyzed)":" (Not Analyzed)"]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"virus",content:"Isolate",onClick:function(){return a("isolate",{isolate:e.reference})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"search",content:"Database",disabled:!e.is_in_database,onClick:function(){return a("view_entry",{vir:e.record})}})]})]})}),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",mb:1,children:e.name}),e.dna]})]},e.unique_id)}))||(l?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No samples detected."}):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No syringe inserted."}))})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.database,d=c.can_print;return(0,o.createComponentVNode)(2,i.Section,{title:"Database",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print",disabled:!d,onClick:function(){return a("print",{type:"virus_list"})}}),children:l.length&&l.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"search",onClick:function(){return a("view_entry",{vir:e.record})},children:e.name},e.name)}))||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"The viral database is empty."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PipeDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(197);t.PipeDispenser=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.disposals,s=d.p_layer,m=d.pipe_layers,p=d.categories,h=void 0===p?[]:p,f=(0,r.useLocalState)(t,"categoryName"),C=f[0],N=f[1],b=h.find((function(e){return e.cat_name===C}))||h[0];return(0,o.createComponentVNode)(2,i.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Layer",children:(0,o.createComponentVNode)(2,a.Box,{children:Object.keys(m).map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m[e]===s,content:e,onClick:function(){return l("p_layer",{p_layer:m[e]})}},e)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Pipes",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:h.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{fluid:!0,icon:c.ICON_BY_CATEGORY_NAME[e.cat_name],selected:e.cat_name===b.cat_name,onClick:function(){return N(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==b?void 0:b.recipes.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.pipe_name,title:e.pipe_name,onClick:function(){return l("dispense_pipe",{ref:e.ref,bent:e.bent,category:b.cat_name})}},e.pipe_name)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PlantAnalyzer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PlantAnalyzer=function(e,t){var n=(0,r.useBackend)(t).data,a=250;return n.seed&&(a+=18*n.seed.trait_info.length),n.reagents&&n.reagents.length&&(a+=55,a+=20*n.reagents.length),(0,o.createComponentVNode)(2,i.Window,{width:400,height:a,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.no_seed,d=c.seed,u=c.reagents;return l?(0,o.createComponentVNode)(2,a.Section,{title:"Analyzer Unused",children:"You should go scan a plant! There is no data currently loaded."}):(0,o.createComponentVNode)(2,a.Section,{title:"Plant Information",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return i("print")},children:"Print Report"}),(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",color:"red",onClick:function(){return i("close")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Name",children:[d.name,"#",d.uid]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Endurance",children:d.endurance}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Yield",children:d.yield}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maturation Time",children:d.maturation_time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Production Time",children:d.production_time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Potency",children:d.potency})]}),u.length&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Plant Reagents",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.volume," unit(s)."]},e.name)}))})})||null,(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Other Data",children:d.trait_info.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"label",mb:.4,children:e},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PointDefenseControl=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PointDefenseControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.id,u=l.turrets;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Fire Assist Mainframe: "+(d||"[no tag]"),children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{level:2,title:e.id,buttons:(0,o.createComponentVNode)(2,a.Button,{selected:e.active,icon:"power-off",onClick:function(){return c("toggle_active",{target:e.ref})},children:e.active?"Online":"Offline"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Effective range",children:e.effective_range}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reaction wheel delay",children:e.reaction_wheel_delay}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recharge time",children:e.recharge_time})]})},e.id)}))||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Error: No weapon systems detected. Please check network connection."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableGenerator=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(5);t.PortableGenerator=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.fuel_stored/d.fuel_capacity,s=(u>=.5?"good":u>.15&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!d.anchored&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.active?"power-off":"times",onClick:function(){return l("toggle_power")},selected:d.active,disabled:!d.ready_to_boot,children:d.active?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel Type",buttons:d.fuel_stored>=1&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"eject",disabled:d.active,onClick:function(){return l("eject")},children:"Eject"}),children:(0,o.createComponentVNode)(2,a.Box,{color:s,children:[d.fuel_stored,"cm\xb3 ",d.sheet_name]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.fuel_stored/d.fuel_capacity,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[d.fuel_stored,"cm\xb3 / ",d.fuel_capacity,"cm\xb3"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel Usage",children:[d.fuel_usage," cm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.temperature_current,maxValue:d.temperature_max+30,color:d.temperature_overheat?"bad":"good",children:[(0,c.round)(d.temperature_current),"\xb0C"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current output",color:d.unsafe_output?"bad":null,children:d.power_output}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",onClick:function(){return l("lower_power")},children:d.power_generated}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("higher_power")},children:d.power_generated})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:!d.connected&&"bad",children:d.connected?d.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortablePump=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(198);t.PortablePump=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.direction,s=d.target_pressure,m=d.default_pressure,p=d.min_pressure,h=d.max_pressure;return(0,o.createComponentVNode)(2,i.Window,{width:330,height:375,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Pump",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-in-alt":"sign-out-alt",content:u?"In":"Out",selected:u,onClick:function(){return l("direction")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output",children:(0,o.createComponentVNode)(2,a.Slider,{mt:"0.4em",animated:!0,minValue:p,maxValue:h,value:s,unit:"kPa",stepPixelSize:.3,onChange:function(e,t){return l("pressure",{pressure:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",disabled:s===p,onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",disabled:s===m,onClick:function(){return l("pressure",{pressure:"reset"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",disabled:s===h,onClick:function(){return l("pressure",{pressure:"max"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableScrubber=void 0;var o=n(0),r=n(1),a=n(2),i=(n(32),n(3)),c=n(198);t.PortableScrubber=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.rate,s=d.minrate,m=d.maxrate;return(0,o.createComponentVNode)(2,i.Window,{width:320,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Power Regulator",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Rate",children:(0,o.createComponentVNode)(2,a.Slider,{mt:"0.4em",animated:!0,minValue:s,maxValue:m,value:u,unit:"L/s",onChange:function(e,t){return l("volume_adj",{vol:t})}})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PressureRegulator=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.PressureRegulator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.pressure_set,s=(l.max_pressure,l.input_pressure),m=l.output_pressure,p=l.regulate_mode,h=l.set_flow_rate,f=l.last_flow_rate;return(0,o.createComponentVNode)(2,i.Window,{width:470,height:370,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s/100})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m/100})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f/10})," L/s"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"Unlocked":"Closed",selected:d,onClick:function(){return c("toggle_valve")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Regulation",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Off",selected:0===p,onClick:function(){return c("regulate_mode",{mode:"off"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"Input",selected:1===p,onClick:function(){return c("regulate_mode",{mode:"input"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"Output",selected:2===p,onClick:function(){return c("regulate_mode",{mode:"output"})}})],4)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Output Pressure",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"MIN",onClick:function(){return c("set_press",{press:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"MAX",onClick:function(){return c("set_press",{press:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"SET",onClick:function(){return c("set_press",{press:"set"})}})],4),children:[u/100," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Flow Rate Limit",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"compress-arrows-alt",content:"MIN",onClick:function(){return c("set_flow_rate",{press:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"expand-arrows-alt",content:"MAX",onClick:function(){return c("set_flow_rate",{press:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"SET",onClick:function(){return c("set_flow_rate",{press:"set"})}})],4),children:[h/10," L/s"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PrisonerManagement=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);n(21);t.PrisonerManagement=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.locked,u=l.chemImplants,s=l.trackImplants;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:d&&(0,o.createComponentVNode)(2,a.Section,{title:"Locked",textAlign:"center",children:["This interface is currently locked.",(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",onClick:function(){return c("lock")},children:"Unlock"})})]})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Interface Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",onClick:function(){return c("lock")},children:"Lock Interface"})}),(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Implants",children:u.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Host"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Units Remaining"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Inject"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.host}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.units,"u remaining"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:1})},children:"(1)"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:5})},children:"(5)"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("inject",{imp:e.ref,val:10})},children:"(10)"})]})]},e.ref)}))]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No chemical implants found."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Tracking Implants",children:s.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Host"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Location"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Message"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.host," (",e.id,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.loc}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("warn",{imp:e.ref})},children:"Message"})})]},e.ref)}))]})||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No chemical implants found."})})],4)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RIGSuit=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7);t.RIGSuit=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),s=c.interfacelock,m=c.malf,p=c.aicontrol,h=c.ai,f=null;return s||m?f=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"--HARDSUIT INTERFACE OFFLINE--"}):!h&&p&&(f=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"-- HARDSUIT CONTROL OVERRIDDEN BY AI --"})),(0,o.createComponentVNode)(2,i.Window,{height:480,width:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:f||(0,o.createFragment)([(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.chargestatus,d=c.charge,u=c.maxcharge,s=c.aioverride,m=c.sealing,p=c.sealed,h=c.emagged,f=c.securitycheck,C=c.coverlock,N=(0,o.createComponentVNode)(2,a.Button,{content:"Suit "+(m?"seals working...":p?"is Active":"is Inactive"),icon:m?"redo":p?"power-off":"lock-open",iconSpin:m,disabled:m,selected:p,onClick:function(){return i("toggle_seals")}}),b=(0,o.createComponentVNode)(2,a.Button,{content:"AI Control "+(s?"Enabled":"Disabled"),selected:s,icon:"robot",onClick:function(){return i("toggle_ai_control")}});return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([N,b],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Supply",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,maxValue:50,value:l,ranges:{good:[35,Infinity],average:[15,35],bad:[-Infinity,15]},children:[d," / ",u]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Status",children:h||!f?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Error - Maintenance Lock Control Offline"}):(0,o.createComponentVNode)(2,a.Button,{icon:C?"lock":"lock-open",content:C?"Locked":"Unlocked",onClick:function(){return i("toggle_suit_lock")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sealing,u=l.helmet,s=l.helmetDeployed,m=l.gauntlets,p=l.gauntletsDeployed,h=l.boots,f=l.bootsDeployed,C=l.chest,N=l.chestDeployed;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:s?"sign-out-alt":"sign-in-alt",content:s?"Deployed":"Deploy",disabled:d,selected:s,onClick:function(){return i("toggle_piece",{piece:"helmet"})}}),children:(0,c.capitalize)(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:p?"sign-out-alt":"sign-in-alt",content:p?"Deployed":"Deploy",disabled:d,selected:p,onClick:function(){return i("toggle_piece",{piece:"gauntlets"})}}),children:(0,c.capitalize)(m)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:f?"sign-out-alt":"sign-in-alt",content:f?"Deployed":"Deploy",disabled:d,selected:f,onClick:function(){return i("toggle_piece",{piece:"boots"})}}),children:(0,c.capitalize)(h)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestpiece",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"sign-out-alt":"sign-in-alt",content:N?"Deployed":"Deploy",disabled:d,selected:N,onClick:function(){return i("toggle_piece",{piece:"chest"})}}),children:(0,c.capitalize)(C)})]})})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.sealed,u=l.sealing,s=l.primarysystem,m=l.modules;return!d||u?(0,o.createComponentVNode)(2,a.Section,{title:"Modules",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"HARDSUIT SYSTEMS OFFLINE"})}):(0,o.createComponentVNode)(2,a.Section,{title:"Modules",children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",mb:"0.2rem",fontSize:1.5,children:["Selected Primary: ",(0,c.capitalize)(s||"None")]}),m&&m.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{level:2,title:(0,c.toTitleCase)(e.name)+(e.damage?" (damaged)":""),buttons:(0,o.createFragment)([e.can_select?(0,o.createComponentVNode)(2,a.Button,{selected:e.name===s,content:e.name===s?"Selected":"Select",icon:"arrow-circle-right",onClick:function(){return i("interact_module",{module:e.index,module_mode:"select"})}}):null,e.can_use?(0,o.createComponentVNode)(2,a.Button,{content:e.engagestring,icon:"arrow-circle-down",onClick:function(){return i("interact_module",{module:e.index,module_mode:"engage"})}}):null,e.can_toggle?(0,o.createComponentVNode)(2,a.Button,{selected:e.is_active,content:e.is_active?e.deactivatestring:e.activatestring,icon:"arrow-circle-down",onClick:function(){return i("interact_module",{module:e.index,module_mode:"toggle"})}}):null],0),children:e.damage>=2?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"-- MODULE DESTROYED --"}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Engage: ",e.engagecost]}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Active: ",e.activecost]}),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["Passive: ",e.passivecost]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:e.desc}),e.charges?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Section,{title:"Module Charges",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected",children:(0,c.capitalize)(e.chargetype)}),e.charges.map((function(t,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.capitalize)(t.caption),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",onClick:function(){return i("interact_module",{module:e.index,module_mode:"select_charge_type",charge_type:n})}})},t.caption)}))]})})}):null]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Radio=void 0;var o=n(0),r=(n(17),n(5)),a=n(1),i=n(2),c=n(32),l=n(3);t.Radio=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.rawfreq,m=u.minFrequency,p=u.maxFrequency,h=u.listening,f=u.broadcasting,C=u.subspace,N=u.subspaceSwitchable,b=u.chan_list,g=u.loudspeaker,V=u.mic_cut,v=u.spk_cut,k=u.useSyndMode,y=c.RADIO_CHANNELS.find((function(e){return e.freq===Number(s)})),_=156;return b&&b.length>0?_+=28*b.length+6:_+=24,N&&(_+=38),(0,o.createComponentVNode)(2,l.Window,{width:310,height:_,resizable:!0,theme:k?"syndicate":"",children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},onDrag:function(e,t){return d("setFrequency",{freq:(0,r.round)(10*t)})}}),y&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:y.color,ml:2,children:["[",y.name,"]"]})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Audio",children:[(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:h?"volume-up":"volume-mute",selected:h,disabled:v,onClick:function(){return d("listen")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:f?"microphone":"microphone-slash",selected:f,disabled:V,onClick:function(){return d("broadcast")}}),!!N&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"bullhorn",selected:C,content:"Subspace Tx "+(C?"ON":"OFF"),onClick:function(){return d("subspace")}})}),!!N&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:g?"volume-up":"volume-mute",selected:g,content:"Loudspeaker",onClick:function(){return d("toggleLoudspeaker")}})})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Channels",children:[(!b||0===b.length)&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"No channels detected."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:b?b.map((function(e){var t=c.RADIO_CHANNELS.find((function(t){return t.freq===Number(e.freq)})),n="default";return t&&(n=t.color),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.display_name,labelColor:n,textAlign:"right",children:e.secure_channel&&C?(0,o.createComponentVNode)(2,i.Button,{icon:e.sec_channel_listen?"square-o":"check-square-o",selected:!e.sec_channel_listen,content:e.sec_channel_listen?"Off":"On",onClick:function(){return d("channel",{channel:e.chan})}}):(0,o.createComponentVNode)(2,i.Button,{content:"Switch",selected:e.chan===s,onClick:function(){return d("specFreq",{channel:e.chan})}})},e.chan)})):null})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RequestConsole=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t).act,r=e.dept_list,c=e.department;return(0,o.createComponentVNode)(2,i.LabeledList,{children:r.sort().map((function(e){return e!==c&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"envelope-open-text",onClick:function(){return n("write",{write:e,priority:1})},children:"Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",onClick:function(){return n("write",{write:e,priority:2})},children:"High Priority"})],4)})||null}))})},d={0:function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.silent;return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,i.Button,{selected:!c,icon:c?"volume-mute":"volume-up",onClick:function(){return r("toggleSilent")},children:["Speaker ",c?"OFF":"ON"]})})},1:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.assist_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Request assistance from another department",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},2:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.supply_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Supplies",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},3:function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.department,d=r.info_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Report Anonymous Information",children:(0,o.createComponentVNode)(2,l,{dept_list:d,department:c})})},4:function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:2,color:"good",children:"Message Sent Successfully"}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",onClick:function(){return r("setScreen",{setScreen:0})},children:"Continue"})})]})},5:function(e,t){var n=(0,a.useBackend)(t),r=n.act;n.data;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:1.5,bold:!0,color:"bad",children:"An error occured. Message Not Sent."}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",onClick:function(){return r("setScreen",{setScreen:0})},children:"Continue"})})]})},6:function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.message_log;return(0,o.createComponentVNode)(2,i.Section,{title:"Messages",children:l.length&&l.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.decodeHtmlEntities)(e[0]),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return c("print",{print:t+1})},children:"Print"}),children:(0,r.decodeHtmlEntities)(e[1])},t)}))||(0,o.createComponentVNode)(2,i.Box,{children:"No messages."})})},7:function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.message,u=l.recipient,s=l.priority,m=l.msgStamped,p=l.msgVerified;return(0,o.createComponentVNode)(2,i.Section,{title:"Message Authentication",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message for "+u,children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Priority",children:2===s?"High Priority":1===s?"Normal Priority":"Unknown"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated By",color:p?"good":"bad",children:(0,r.decodeHtmlEntities)(p)||"No Validation"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamped By",color:m?"good":"bad",children:(0,r.decodeHtmlEntities)(m)||"No Stamp"})]}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"share",onClick:function(){return c("department",{department:u})},children:"Send Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return c("setScreen",{setScreen:0})},children:"Back"})]})},8:function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=(c.department,c.screen,c.message_log,c.newmessagepriority,c.silent,c.announcementConsole,c.assist_dept,c.supply_dept,c.info_dept,c.message),d=(c.recipient,c.priority,c.msgStamped,c.msgVerified,c.announceAuth);return(0,o.createComponentVNode)(2,i.Section,{title:"Send Station-Wide Announcement",children:[d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"good",mb:1,children:"ID Verified. Authentication Accepted."}),(0,o.createComponentVNode)(2,i.Section,{title:"Message",mt:1,maxHeight:"200px",scrollable:!0,buttons:(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"pen",onClick:function(){return r("writeAnnouncement")},children:"Edit"}),children:l||"No Message"})],4)||(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mb:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l||!d,icon:"share",onClick:function(){return r("sendAnnouncement")},children:"Announce"}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return r("setScreen",{setScreen:0})},children:"Back"})]})}};t.RequestConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,u=l.screen,s=l.newmessagepriority,m=l.announcementConsole,p=d[u];return(0,o.createComponentVNode)(2,c.Window,{width:520,height:410,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:6===u,onClick:function(){return r("setScreen",{setScreen:6})},icon:"envelope-open-text",children:"Messages"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===u,onClick:function(){return r("setScreen",{setScreen:1})},icon:"share-square",children:"Assistance"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===u,onClick:function(){return r("setScreen",{setScreen:2})},icon:"share-square",children:"Supplies"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===u,onClick:function(){return r("setScreen",{setScreen:3})},icon:"share-square-o",children:"Report"}),m&&(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:8===u,onClick:function(){return r("setScreen",{setScreen:8})},icon:"volume-up",children:"Announce"})||null,(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===u,onClick:function(){return r("setScreen",{setScreen:0})},icon:"cog"})]}),s&&(0,o.createComponentVNode)(2,i.Section,{title:s>1?"NEW PRIORITY MESSAGES":"There are new messages!",color:s>1?"bad":"average",bold:s>1})||null,(0,o.createComponentVNode)(2,p)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResearchConsole=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t).data,o=e.title,r=n[e.target];return"number"==typeof r?o+" - Page "+(r+1):o},d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.target;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return n(r,{reset:!0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-left",onClick:function(){return n(r,{reverse:-1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",onClick:function(){return n(r,{reverse:1})}})],4)},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info.tech,l=e.disk;if(!l||!l.present)return null;var d=(0,a.useSharedState)(t,"saveDialogTech",!1),u=d[0],s=d[1];return u?(0,o.createComponentVNode)(2,i.Section,{title:"Load Technology to Disk",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return s(!1)}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){s(!1),r("copy_tech",{copy_tech_ID:e.id})},children:"Copy To Disk"})},e.name)}))})}):(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disk Contents",children:"(Technology Data Disk)"})}),l.stored&&(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:l.name}),(0,o.createComponentVNode)(2,i.Box,{children:["Level: ",l.level]}),(0,o.createComponentVNode)(2,i.Box,{children:["Description: ",l.desc]}),(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return r("updt_tech")},children:"Upload to Database"}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return r("clear_tech")},children:"Clear Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_tech")},children:"Eject Disk"})]})]})||(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"This disk has no data stored on it."}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return s(!0)},children:"Load Tech To Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_tech")},children:"Eject Disk"})]})]})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=c.info.designs,s=e.disk;if(!s||!s.present)return null;var m=(0,a.useSharedState)(t,"saveDialogData",!1),p=m[0],h=m[1];return p?(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{title:"Load Design to Disk",target:"design_page"}),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return h(!1)}}),(0,o.createComponentVNode)(2,d,{target:"design_page"})||null],0),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){h(!1),r("copy_design",{copy_design_ID:e.id})},children:"Copy To Disk"})},e.name)}))})]}):(0,o.createComponentVNode)(2,i.Box,{children:s.stored&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lathe Type",children:s.build_type}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Materials",children:Object.keys(s.materials).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e," x ",s.materials[e]]},e)}))})]}),(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return r("updt_design")},children:"Upload to Database"}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return r("clear_design")},children:"Clear Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_design")},children:"Eject Disk"})]})]})||(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{mb:.5,children:"This disk has no data stored on it."}),(0,o.createComponentVNode)(2,i.Button,{icon:"save",onClick:function(){return h(!0)},children:"Load Design To Disk"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_design")},children:"Eject Disk"})]})})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=e.target,s=e.designs,m=e.buildName,p=e.buildFiveName;return u?(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{target:"builder_page",title:"Designs"}),buttons:(0,o.createComponentVNode)(2,d,{target:"builder_page"}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),s.length?s.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex,{width:"100%",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",style:{"word-wrap":"break-all"},children:e.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"15%",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Button,{mb:-1,icon:"wrench",onClick:function(){return r(m,{build:e.id,imprint:e.id})},children:"Build"}),p&&(0,o.createComponentVNode)(2,i.Button,{mb:-1,onClick:function(){return r(p,{build:e.id,imprint:e.id})},children:"x5"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"45%",style:{"word-wrap":"break-all"},children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",children:e.mat_list.join(" ")}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"average",ml:1,children:e.chem_list.join(" ")})]})]}),(0,o.createComponentVNode)(2,i.Divider)],4,e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No items could be found matching the parameters (page or search)."})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Error"})},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=e.name,u=null,s=null;if("Protolathe"===d?(u=l.info.linked_lathe,s=l.lathe_designs):(u=l.info.linked_imprinter,s=l.imprinter_designs),!u||!u.present)return(0,o.createComponentVNode)(2,i.Section,{title:d,children:["No ",d," found."]});var p=u,h=p.total_materials,f=p.max_materials,C=p.total_volume,N=p.max_volume,b=p.busy,g=p.mats,V=p.reagents,v=p.queue,k=(0,a.useSharedState)(t,"protoTab",0),y=k[0],_=k[1];return(0,o.createComponentVNode)(2,i.Section,{title:d,buttons:b&&(0,o.createComponentVNode)(2,i.Icon,{name:"sync",spin:!0})||null,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Materials",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:h,maxValue:f,children:[h," cm\xb3 / ",f," cm\xb3"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Chemicals",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:C,maxValue:N,children:[C,"u / ",N,"u"]})})]}),(0,o.createComponentVNode)(2,i.Tabs,{mt:1,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"wrench",selected:0===y,onClick:function(){return _(0)},children:"Build"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"layer-group",iconSpin:b,color:b?"average":"transparent",selected:1===y,onClick:function(){return _(1)},children:"Queue"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"cookie-bite",selected:2===y,onClick:function(){return _(2)},children:"Mat Storage"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"flask",selected:3===y,onClick:function(){return _(3)},children:"Chem Storage"})]}),0===y&&(0,o.createComponentVNode)(2,m,{target:u,designs:s,buildName:"Protolathe"===d?"build":"imprint",buildFiveName:"Protolathe"===d?"buildfive":null})||1===y&&(0,o.createComponentVNode)(2,i.LabeledList,{children:v.length&&v.map((function(e){return 1===e.index?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,labelColor:"bad",children:b?(0,o.createComponentVNode)(2,i.Button,{disabled:!0,icon:"trash",children:"Remove"}):(0,o.createComponentVNode)(2,i.Box,{children:["(Awaiting Materials)",(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"trash",onClick:function(){return c("removeP",{removeP:e.index})},children:"Remove"})]})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return c("removeP",{removeP:e.index})},children:"Remove"})},e.name)}))||(0,o.createComponentVNode)(2,i.Box,{m:1,children:"Queue Empty."})})||2===y&&(0,o.createComponentVNode)(2,i.LabeledList,{children:g.map((function(e){var n=(0,a.useLocalState)(t,"ejectAmt"+e.name,0),l=n[0],d=n[1];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:(0,r.toTitleCase)(e.name),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.NumberInput,{minValue:0,width:"100px",value:l,maxValue:e.sheets,onDrag:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!e.removable,onClick:function(){d(0),c("lathe_ejectsheet",{lathe_ejectsheet:e.name,amount:l})},children:"Num"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!e.removable,onClick:function(){return c("lathe_ejectsheet",{lathe_ejectsheet:e.name,amount:50})},children:"All"})],4),children:[e.amount," cm\xb3"]},e.name)}))})||3===y&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:V.length&&V.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[e.volume,"u",(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eject",onClick:function(){return c("disposeP",{dispose:e.id})},children:"Purge"})]},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Empty",children:"No chems detected"})}),(0,o.createComponentVNode)(2,i.Button,{mt:1,icon:"trash",onClick:function(){return c("disposeallP")},children:"Disposal All Chemicals In Storage"})]})||(0,o.createComponentVNode)(2,i.Box,{children:"Error"})]})},h=[{name:"Protolathe",icon:"wrench",template:(0,o.createComponentVNode)(2,p,{name:"Protolathe"})},{name:"Circuit Imprinter",icon:"digital-tachograph",template:(0,o.createComponentVNode)(2,p,{name:"Circuit Imprinter"})},{name:"Destructive Analyzer",icon:"eraser",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info.linked_destroy;if(!c.present)return(0,o.createComponentVNode)(2,i.Section,{title:"Destructive Analyzer",children:"No destructive analyzer found."});var l=c.loaded_item,d=c.origin_tech;return(0,o.createComponentVNode)(2,i.Section,{title:"Destructive Analyzer",children:l&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Origin Tech",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[e.level,"\xa0\xa0",e.current&&"(Current: "+e.current+")"]},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Error",children:"No origin tech found."})})})]}),(0,o.createComponentVNode)(2,i.Button,{mt:1,color:"red",icon:"eraser",onClick:function(){return r("deconstruct")},children:"Deconstruct Item"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",onClick:function(){return r("eject_item")},children:"Eject Item"})]})||(0,o.createComponentVNode)(2,i.Box,{children:"No Item Loaded. Standing-by..."})})}))},{name:"Settings",icon:"cog",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.info,l=c.sync,d=c.linked_destroy,u=c.linked_imprinter,s=c.linked_lathe,m=(0,a.useSharedState)(t,"settingsTab",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"cogs",onClick:function(){return h(0)},selected:0===p,children:"General"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"link",onClick:function(){return h(1)},selected:1===p,children:"Device Linkages"})]}),0===p&&(0,o.createComponentVNode)(2,i.Box,{children:[l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"sync",onClick:function(){return r("sync")},children:"Sync Database with Network"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"unlink",onClick:function(){return r("togglesync")},children:"Disconnect from Research Network"})],4)||(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"link",onClick:function(){return r("togglesync")},children:"Connect to Research Network"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"lock",onClick:function(){return r("lock")},children:"Lock Console"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"red",icon:"trash",onClick:function(){return r("reset")},children:"Reset R&D Database"})]})||1===p&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"sync",mb:1,onClick:function(){return r("find_device")},children:"Re-sync with Nearby Devices"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[d.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destructive Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"destroy"})},children:"Disconnect"})})||null,s.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Protolathe",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"lathe"})},children:"Disconnect"})})||null,u.present&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Circuit Imprinter",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",onClick:function(){return r("disconnect",{disconnect:"imprinter"})},children:"Disconnect"})})||null]})]})||(0,o.createComponentVNode)(2,i.Box,{children:"Error"})]})}))},{name:"Research List",icon:"flask",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.tech;return(0,o.createComponentVNode)(2,i.Section,{title:"Current Research Levels",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return r("print",{print:1})},children:"Print This Page"}),children:(0,o.createComponentVNode)(2,i.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{children:[" - Level ",e.level]})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.desc})})]},e.name)}))})})}))},{name:"Design List",icon:"file",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,u=c.designs;return(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,l,{title:"Researched Technologies & Designs",target:"design_page"}),buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"print",onClick:function(){return r("print",{print:2})},children:"Print This Page"}),(0,o.createComponentVNode)(2,d,{target:"design_page"})||null],0),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",value:c.search,onInput:function(e,t){return r("search",{search:t})},mb:1}),(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:e.desc},e.name)}))})]})}))},{name:"Disk Operations",icon:"save",template:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.info),c=r.d_disk,l=r.t_disk;return c.present||l.present?(0,o.createComponentVNode)(2,i.Section,{title:"Disk Operations",children:[(0,o.createComponentVNode)(2,u,{disk:l}),(0,o.createComponentVNode)(2,s,{disk:c})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Disk Operations",children:"No disk inserted."})}))}];t.ResearchConsole=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.busy_msg,u=l.locked,s=(0,a.useSharedState)(t,"rdmenu",0),m=s[0],p=s[1],f=!1;return(d||u)&&(f=!0),(0,o.createComponentVNode)(2,c.Window,{width:850,height:630,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:h.map((function(e,t){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:e.icon,selected:m===t,disabled:f,onClick:function(){return p(t)},children:e.name},t)}))}),d&&(0,o.createComponentVNode)(2,i.Section,{title:"Processing...",children:d})||u&&(0,o.createComponentVNode)(2,i.Section,{title:"Console Locked",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("lock")},icon:"lock-open",children:"Unlock"})})||h[m].template]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResearchServerController=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(17);t.ResearchServerController=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:430,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),c=(i.badmin,i.servers),l=(i.consoles,(0,r.useSharedState)(t,"selectedServer",null)),u=l[0],s=l[1],m=c.find((function(e){return e.id===u}));return m?(0,o.createComponentVNode)(2,d,{setSelectedServer:s,server:m}):(0,o.createComponentVNode)(2,a.Section,{title:"Server Selection",children:c.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return s(e.id)},children:e.name})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.badmin),c=e.server,l=e.setSelectedServer,d=(0,r.useSharedState)(t,"tab",0),p=d[0],h=d[1];return(0,o.createComponentVNode)(2,a.Section,{title:c.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",onClick:function(){return l(null)},children:"Back"}),children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:"Access Rights"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:"Data Management"}),i&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},color:"red",children:"Server-to-Server Transfer"})||null]}),0===p&&(0,o.createComponentVNode)(2,u,{server:c})||null,1===p&&(0,o.createComponentVNode)(2,s,{server:c})||null,2===p&&i&&(0,o.createComponentVNode)(2,m,{server:c})||null]})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.server,d=c.consoles,u=function(e,t){return-1!==e.id_with_upload.indexOf(t.id)},s=function(e,t){return-1!==e.id_with_download.indexOf(t.id)};return(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Consoles",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name+" ("+e.loc+")",children:[(0,o.createComponentVNode)(2,a.Button,{icon:u(l,e)?"lock-open":"lock",selected:u(l,e),onClick:function(){return i("toggle_upload",{server:l.ref,console:e.ref})},children:u(l,e)?"Upload On":"Upload Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:s(l,e)?"lock-open":"lock",selected:s(l,e),onClick:function(){return i("toggle_download",{server:l.ref,console:e.ref})},children:s(l,e)?"Download On":"Download Off"})]},e.name)}))})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=(n.data,e.server);return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Research Levels",children:l.tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"trash",color:"red",content:"Reset",onClick:function(){return i("reset_tech",{server:l.ref,tech:e.id})}})},e.name)}))}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Designs",children:(0,c.filter)((function(e){return!!e.name}))(l.designs).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"trash",color:"red",content:"Delete",onClick:function(){return i("reset_design",{server:l.ref,design:e.id})}})},e.name)}))})],4)},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.server,d=c.badmin,u=c.servers;return d?(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Server Data Transfer",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,color:"bad",content:(0,o.createComponentVNode)(2,a.Box,{children:["Transfer from ",l.name," To ",e.name]}),onClick:function(){return i("transfer_data",{server:l.ref,target:e.ref})}})},e.name)}))}):null}},function(e,t,n){"use strict";t.__esModule=!0,t.ResleevingConsole=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=(n(32),n(45)),l=n(3),d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.args),l=c.activerecord,d=c.realname,u=c.obviously_dead,s=c.oocnotes,m=c.can_sleeve_active;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Mind Record ("+d+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return r("modal_close")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!m,icon:"user-plus",content:"Sleeve",onClick:function(){return r("sleeve",{ref:l,mode:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user-plus",content:"Card",onClick:function(){return r("sleeve",{ref:l,mode:2})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"OOC Notes",children:(0,o.createComponentVNode)(2,i.Section,{style:{"word-break":"break-all",height:"100px"},scrollable:!0,children:s})})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.args),l=c.activerecord,d=c.realname,u=c.species,s=c.sex,m=c.mind_compat,p=c.synthetic,h=c.oocnotes,f=c.can_grow_active;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:"Body Record ("+d+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return r("modal_close")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bio. Sex",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Compat",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Synthetic",children:p?"Yes":"No"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"OOC Notes",children:(0,o.createComponentVNode)(2,i.Section,{style:{"word-break":"break-all",height:"100px"},scrollable:!0,children:h})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{disabled:!f,icon:"user-plus",content:p?"Build":"Grow",onClick:function(){return r("create",{ref:l})}})})]})})};t.ResleevingConsole=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),f=(r.menu,r.coredumped),C=r.emergency,N=(0,o.createFragment)([(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,v),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})],4);return f&&(N=(0,o.createComponentVNode)(2,p)),C&&(N=(0,o.createComponentVNode)(2,h)),(0,c.modalRegisterBodyOverride)("view_b_rec",u),(0,c.modalRegisterBodyOverride)("view_m_rec",d),(0,o.createComponentVNode)(2,l.Window,{width:640,height:520,resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:N})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Body Records"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,icon:"folder",onClick:function(){return r("menu",{num:3})},children:"Mind Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data,i=r.menu,c=r.bodyrecords,l=r.mindrecords;return 1===i?n=(0,o.createComponentVNode)(2,f):2===i?n=(0,o.createComponentVNode)(2,g,{records:c,actToDo:"view_b_rec"}):3===i&&(n=(0,o.createComponentVNode)(2,g,{records:l,actToDo:"view_m_rec"})),n},p=function(e,t){return(0,o.createComponentVNode)(2,i.Dimmer,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",justify:"space-evenly",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Icon,{size:12,color:"bad",name:"exclamation-triangle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,color:"bad",mt:5,children:(0,o.createVNode)(1,"h2",null,"TransCore dump completed. Resleeving offline.",16)})]})})},h=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:(0,o.createVNode)(1,"h1",null,"TRANSCORE DUMP",16)}),(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:(0,o.createVNode)(1,"h2",null,"!!WARNING!!",16)}),(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"This will transfer all minds to the dump disk, and the TransCore will be made unusable until post-shift maintenance! This should only be used in emergencies!"}),(0,o.createComponentVNode)(2,i.Box,{mt:4,children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Disk",color:"good",onClick:function(){return n("ejectdisk")}})}),(0,o.createComponentVNode)(2,i.Box,{mt:4,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"exclamation-triangle",confirmIcon:"exclamation-triangle",content:"Core Dump",confirmContent:"Disable Transcore?",color:"bad",onClick:function(){return n("coredump")}})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);r.loading,r.scantemp,r.occupant,r.locked,r.can_brainscan,r.scan_mode,r.pods,r.selected_pod;return(0,o.createComponentVNode)(2,i.Section,{title:"Pods",level:"2",children:[(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,N)]})},C=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.pods,u=l.spods,s=l.selected_pod;return d&&d.length?d.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:s===e.pod,icon:s===e.pod&&"check",content:"Select",mt:u&&u.length?"2rem":"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):null},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.sleevers,d=c.spods,u=c.selected_sleever;return l&&l.length?l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"sleeve_"+(e.occupied?"occupied":"empty")+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:e.occupied?"label":"bad",children:e.name}),(0,o.createComponentVNode)(2,i.Button,{selected:u===e.sleever,icon:u===e.sleever&&"check",content:"Select",mt:d&&d.length?"3rem":"1.5rem",onClick:function(){return r("selectsleever",{ref:e.sleever})}})]},t)})):null},b=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.spods,u=l.selected_printer;return d&&d.length?d.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,i.Button,{selected:u===e.spod,icon:u===e.spod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectprinter",{ref:e.spod})}}),(0,o.createComponentVNode)(2,i.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"synthprinter"+(e.busy?"_working":"")+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.steel>=15e3?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.steel>=15e3?"circle":"circle-o"}),"\xa0",e.steel]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:e.glass>=15e3?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,i.Icon,{name:e.glass>=15e3?"circle":"circle-o"}),"\xa0",e.glass]}),n]},t)})):null},g=function(e,t){var n=(0,a.useBackend)(t).act,r=e.records,c=e.actToDo;return r.length?(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:r.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.name,onClick:function(){return n(c,{ref:e.recref})}},t)}))}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},V=function(e,t){var n,r=(0,a.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}},v=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.pods,l=r.spods,d=r.sleevers;r.autoallowed,r.autoprocess,r.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pods",children:c&&c.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[c.length," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"SynthFabs",children:l&&l.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[l.length," connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sleevers",children:d&&d.length?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[d.length," Connected"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ResleevingPod=void 0;var o=n(0),r=n(3),a=n(1),i=n(2);t.ResleevingPod=function(e,t){var n=(0,a.useBackend)(t).data,c=n.occupied,l=n.name,d=n.health,u=n.maxHealth,s=n.stat,m=n.mindStatus,p=n.mindName,h=n.resleeveSick,f=n.initialSick;return(0,o.createComponentVNode)(2,r.Window,{width:300,height:350,resizeable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",children:c?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:2===s?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DEAD"}):1===s?(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unconscious"}):(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},value:d/u,children:[d,"%"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Status",children:m?"Present":"Missing"}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mind Occupying",children:p}):""]}),h?(0,o.createComponentVNode)(2,i.Box,{color:"average",mt:3,children:["Warning: Resleeving Sickness detected.",f?(0,o.createFragment)([(0,o.createTextVNode)(" Motion Sickness also detected. Please allow the newly resleeved person a moment to get their bearings. This warning will disappear when Motion Sickness is no longer detected.")],4):""]}):""],0):(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Unoccupied."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_detonate_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:460,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Self Destruct",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",disabled:s,content:"Destroy ALL Cyborgs",color:"bad",onClick:function(){return l("nuke",{})}})]}),(0,o.createComponentVNode)(2,c,{cyborgs:h,can_hack:u})]})})};var c=function(e,t){var n=e.cyborgs,i=(e.can_hack,(0,r.useBackend)(t)),c=i.act,l=i.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return c("hackbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return c("stopbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",disabled:!l.auth,color:"bad",onClick:function(){return c("killbot",{ref:e.ref})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.RogueZones=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.RogueZones=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.timeout_percent,u=l.diffstep,s=l.difficulty,m=l.occupied,p=l.scanning,h=l.updated,f=l.debug,C=l.shuttle_location,N=l.shuttle_at_station,b=l.scan_ready,g=l.can_recall_shuttle;return(0,o.createComponentVNode)(2,i.Window,{width:360,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current Area",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mineral Content",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Location",buttons:g&&(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"rocket",onClick:function(){return c("recall_shuttle")},children:"Recall Shuttle"})||null,children:C}),m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"bad",labelColor:"bad",label:"Personnel",children:["WARNING: Area occupied by ",m," personnel!"]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Personnel",color:"good",children:"No personnel detected."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!b,fluid:!0,icon:"search",onClick:function(){return c("scan_for_new")},children:"Scan For Asteroids"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scn Ramestat Core",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:100,ranges:{good:[100,Infinity],average:[75,100],bad:[-Infinity,75]}})}),p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanning",children:"In progress."})||null,h&&!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Info",children:"Updated shuttle destination!"})||null,f&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Debug",labelColor:"bad",children:[(0,o.createComponentVNode)(2,a.Box,{children:["Timeout Percent: ",d]}),(0,o.createComponentVNode)(2,a.Box,{children:["Diffstep: ",u]}),(0,o.createComponentVNode)(2,a.Box,{children:["Difficulty: ",s]}),(0,o.createComponentVNode)(2,a.Box,{children:["Occupied: ",m]}),(0,o.createComponentVNode)(2,a.Box,{children:["Debug: ",f]}),(0,o.createComponentVNode)(2,a.Box,{children:["Shuttle Location: ",C]}),(0,o.createComponentVNode)(2,a.Box,{children:["Shuttle at station: ",N]}),(0,o.createComponentVNode)(2,a.Box,{children:["Scan Ready: ",b]})]})||null]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Secbot=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Secbot=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.open,s=l.locked,m=l.idcheck,p=l.check_records,h=l.check_arrest,f=l.arrest_type,C=l.declare_arrests,N=l.will_patrol;return(0,o.createComponentVNode)(2,i.Window,{width:390,height:320,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Automatic Security Unit v2.0",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,onClick:function(){return c("power")},children:d?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",color:u?"bad":"good",children:u?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Behavior Controls",color:s?"good":"bad",children:s?"Locked":"Unlocked"})]})}),!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Behavior Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check for Weapon Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"toggle-on":"toggle-off",selected:m,onClick:function(){return c("idcheck")},children:m?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check Security Records",children:(0,o.createComponentVNode)(2,a.Button,{icon:p?"toggle-on":"toggle-off",selected:p,onClick:function(){return c("ignorerec")},children:p?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Check Arrest Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("ignorearr")},children:h?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Operating Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("switchmode")},children:f?"Detain":"Arrest"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Report Arrests",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("declarearrests")},children:C?"Yes":"No"})}),N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Patrol",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"toggle-on":"toggle-off",selected:N,onClick:function(){return c("patrol")},children:N?"Yes":"No"})})]})})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(1),a=n(2),i=n(45),c=n(3),l=n(131),d=n(132),u=n(62),s=(n(7),function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})});t.SecurityRecords=function(e,t){var n,s=(0,r.useBackend)(t).data,f=s.authenticated,C=s.screen;return f?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,p):4===C&&(n=(0,o.createComponentVNode)(2,h)),(0,o.createComponentVNode)(2,c.Window,{width:700,height:680,resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal,{maxHeight:"100%",maxWidth:"400px"}),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,u.TemporaryNotice),(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,a.Section,{height:"89%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{width:700,height:680,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return i("search",{t1:t})}}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",color:e.color,content:e.id+": "+e.name+" (Criminal Status: "+e.criminal+")",onClick:function(){return i("d_rec",{d_rec:e.ref})}},t)}))})],4)},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Security Records",onClick:function(){return n("del_all")}})],4)},h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.security,d=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,f)}),(0,o.createComponentVNode)(2,a.Section,{title:"Security Data",level:2,children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Security Record",color:"bad",onClick:function(){return i("del_r")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Record (All)",color:"bad",onClick:function(){return i("del_r_2")}}),(0,o.createComponentVNode)(2,a.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Entry",ml:"0.5rem",onClick:function(){return i("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return i("screen",{screen:2})}})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.general;return c&&c.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:c.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,a.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return s(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{width:"50%",float:"right",textAlign:"right",children:[!!c.has_photos&&c.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e.substr(1,e.length-1),style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)})),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("photo_front")},children:"Update Front Photo"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("photo_side")},children:"Update Side Photo"})]})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,children:[e.value,(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return s(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,a.Button,{icon:"comment",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,i.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Security records lost!",(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},N=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedStorage=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7),l=n(17);t.SeedStorage=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(u.scanner,u.seeds),m=(0,l.sortBy)((function(e){return e.name.toLowerCase()}))(s);return(0,o.createComponentVNode)(2,i.Window,{width:600,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Seeds",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,mt:-1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"60%",children:(0,o.createComponentVNode)(2,a.Collapsible,{title:(0,c.toTitleCase)(e.name)+" #"+e.uid,children:(0,o.createComponentVNode)(2,a.Section,{width:"165%",title:"Traits",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:Object.keys(e.traits).map((function(t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,c.toTitleCase)(t),children:e.traits[t]},t)}))})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:.4,children:[e.amount," Remaining"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",onClick:function(){return d("vend",{id:e.id})},children:"Vend"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"trash",onClick:function(){return d("purge",{id:e.id})},children:"Purge"})})]},e.name+e.uid)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShieldCapacitor=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(5),l=n(21);t.ShieldCapacitor=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.time_since_fail,p=u.stored_charge,h=u.max_charge,f=u.charge_rate,C=u.max_charge_rate;return(0,o.createComponentVNode)(2,a.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,content:s?"Online":"Offline",onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitor Status",children:m>2?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"OK."}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Discharging!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stored Energy",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:p,format:function(e){return(0,l.formatSiUnit)(e,0,"J")}})," (",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:100*(0,c.round)(p/h,1)}),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:f,step:100,stepPixelSize:.2,minValue:1e4,maxValue:C,format:function(e){return(0,l.formatPower)(e)},onDrag:function(e,t){return d("charge_rate",{rate:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShieldGenerator=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(5),l=n(21),d=n(61);t.ShieldGenerator=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,a.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:i?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)})})};var u=function(e,t){return(0,o.createComponentVNode)(2,d.FullscreenNotice,{title:"Locked",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"})}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:"Swipe your ID to begin."})]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data.lockedData,u=d.capacitors,s=d.active,m=d.failing,p=d.radius,h=d.max_radius,f=d.z_range,C=d.max_z_range,N=d.average_field_strength,b=d.target_field_strength,g=d.max_field_strength,V=d.shields,v=d.upkeep,k=d.strengthen_rate,y=d.max_strengthen_rate,_=d.gen_power,B=(u||[]).length;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Field Status",children:m?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Unstable"}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Stable"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Overall Field Strength",children:[(0,c.round)(N,2)," Renwick (",b&&(0,c.round)(100*N/b,1)||"NA","%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Upkeep Power",children:(0,l.formatPower)(v)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shield Generation Power",children:(0,l.formatPower)(_)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Currently Shielded",children:[V," m\xb2"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:B?u.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitor #"+t,children:[e.active?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Offline"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge",children:[(0,l.formatSiUnit)(e.stored_charge,0,"J")," (",100*(0,c.round)(e.stored_charge/e.max_charge,2),"%)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.failing?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Discharging"}):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"OK."})})]})]},t)})):(0,o.createComponentVNode)(2,i.LabeledList.Item,{color:"bad",children:"No Capacitors Connected"})})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"Online":"Offline",selected:s,onClick:function(){return a("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Coverage Radius",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:6,minValue:0,maxValue:h,value:p,unit:"m",onDrag:function(e,t){return a("change_radius",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vertical Shielding",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:0,maxValue:C,value:f,unit:"vertical range",onDrag:function(e,t){return a("z_range",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:0,step:.1,maxValue:y,value:k,format:function(e){return(0,c.round)(e,1)},unit:"Renwick/s",onDrag:function(e,t){return a("strengthen_rate",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maximum Field Strength",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,stepPixelSize:12,minValue:1,maxValue:g,value:b,unit:"Renwick",onDrag:function(e,t){return a("target_field_strength",{val:t})}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleControl=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=function(e,t){var n="ERROR",r="bad",a=!1;return"docked"===e?(n="DOCKED",r="good"):"docking"===e?(n="DOCKING",r="average",a=!0):"undocking"===e?(n="UNDOCKING",r="average",a=!0):"undocked"===e&&(n="UNDOCKED",r="#676767"),a&&t&&(n+="-MANUAL"),(0,o.createComponentVNode)(2,i.Box,{color:r,children:n})},d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,d=e.engineName,u=void 0===d?"Bluespace Drive":d,s=c.shuttle_status,m=c.shuttle_state,p=c.has_docking,h=c.docking_status,f=c.docking_override,C=c.docking_codes;return(0,o.createComponentVNode)(2,i.Section,{title:"Shuttle Status",children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",mb:1,children:s}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u,children:"idle"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#676767",bold:!0,children:"IDLE"})||"warmup"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"SPINNING UP"})||"in_transit"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"ENGAGED"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"})}),p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Status",children:l(h,f)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Codes",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return r("set_codes")},children:C||"Not Set"})})],4)||null]})]})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_launch,d=c.can_cancel,u=c.can_force;return(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("move")},disabled:!l,icon:"rocket",fluid:!0,children:"Launch Shuttle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("cancel")},disabled:!d,icon:"ban",fluid:!0,children:"Cancel Launch"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("force")},color:"bad",disabled:!u,icon:"exclamation-triangle",fluid:!0,children:"Force Launch"})})]})})},s={ShuttleControlConsoleDefault:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleMulti:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_cloak,s=c.can_pick,m=c.legit,p=c.cloaked,h=c.destination_name;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.Section,{title:"Multishuttle Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:m?"ATC Inhibitor":"Cloaking",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"eye":"eye-o",onClick:function(){return r("toggle_cloaked")},children:p?"Enabled":"Disabled"})})||null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Destination",children:(0,o.createComponentVNode)(2,i.Button,{icon:"taxi",disabled:!s,onClick:function(){return r("pick")},children:h})})]})}),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleExploration:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.can_pick,s=c.destination_name,m=c.fuel_usage,p=c.fuel_span,h=c.remaining_fuel;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{engineName:"Engines"}),(0,o.createComponentVNode)(2,i.Section,{title:"Jump Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Destination",children:(0,o.createComponentVNode)(2,i.Button,{icon:"taxi",disabled:!l,onClick:function(){return r("pick")},children:s})}),m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Est. Delta-V Budget",color:p,children:[h," m/s"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Avg. Delta-V Per Maneuver",children:[m," m/s"]})],4)||null]})}),(0,o.createComponentVNode)(2,u)],4)})),ShuttleControlConsoleWeb:(0,o.createComponentVNode)(2,(function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.autopilot,s=d.can_rename,m=d.shuttle_state,p=d.is_moving,h=d.skip_docking,f=d.docking_status,C=d.docking_override,N=d.shuttle_location,b=d.can_cloak,g=d.cloaked,V=d.can_autopilot,v=d.routes,k=d.is_in_transit,y=d.travel_progress,_=d.time_left,B=d.doors,L=d.sensors;return(0,o.createFragment)([u&&(0,o.createComponentVNode)(2,i.Section,{title:"AI PILOT (CLASS D) ACTIVE",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,italic:!0,children:"This vessel will start and stop automatically. Ensure that all non-cycling capable hatches and doors are closed, as the automated system may not be able to control them. Docking and flight controls are locked. To unlock, disable the automated flight system."})})||null,(0,o.createComponentVNode)(2,i.Section,{title:"Shuttle Status",buttons:s&&(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return c("rename_command")},children:"Rename"})||null,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Engines",children:"idle"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#676767",bold:!0,children:"IDLE"})||"warmup"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"SPINNING UP"})||"in_transit"===m&&(0,o.createComponentVNode)(2,i.Box,{color:"#336699",children:"ENGAGED"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"ERROR"})}),!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Location",children:(0,r.toTitleCase)(N)}),!h&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Docking Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{selected:"docked"===f,disabled:"undocked"!==f&&"docked"!==f,onClick:function(){return c("dock_command")},children:"Dock"}),(0,o.createComponentVNode)(2,i.Button,{selected:"undocked"===f,disabled:"docked"!==f&&"undocked"!==f,onClick:function(){return c("undock_command")},children:"Undock"})],4),children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,inline:!0,children:l(f,C)})})||null,b&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cloaking",children:(0,o.createComponentVNode)(2,i.Button,{selected:g,icon:g?"eye":"eye-o",onClick:function(){return c("toggle_cloaked")},children:g?"Enabled":"Disabled"})})||null,V&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Autopilot",children:(0,o.createComponentVNode)(2,i.Button,{selected:u,icon:u?"eye":"eye-o",onClick:function(){return c("toggle_autopilot")},children:u?"Enabled":"Disabled"})})||null],0)||null]}),!p&&(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Available Destinations",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:v.length&&v.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{icon:"rocket",onClick:function(){return c("traverse",{traverse:e.index})},children:e.travel_time})},e.name)}))||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Error",color:"bad",children:"No routes found."})})})||null]}),k&&(0,o.createComponentVNode)(2,i.Section,{title:"Transit ETA",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Distance from target",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",minValue:0,maxValue:100,value:y,children:[_,"s"]})})})})||null,Object.keys(B).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Hatch Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(B).map((function(e){var t=B[e];return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[t.open&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"Open"})||(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Closed"}),"\xa0-\xa0",t.bolted&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Bolted"})||(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"Unbolted"})]},e)}))})})||null,Object.keys(L).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Sensors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(L).map((function(e){var t=L[e];return-1!==t.reading?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,color:"bad",children:"Unable to get sensor air reading."}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:[t.pressure,"kPa"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[t.temp,"\xb0C"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:[t.oxygen,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:[t.nitrogen,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:[t.carbon_dioxide,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Phoron",children:[t.phoron,"%"]}),t.other&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:[t.other,"%"]})||null]})},e)}))})})||null],0)}))};t.ShuttleControl=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.subtemplate);return(0,o.createComponentVNode)(2,c.Window,{width:470,height:"ShuttleControlConsoleWeb"===r?560:370,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:s[r]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.Signaler=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.code,s=d.frequency,m=d.minFrequency,p=d.maxFrequency;return(0,o.createComponentVNode)(2,c.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{size:1.4,color:"label",children:"Frequency:"}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}})})]}),(0,o.createComponentVNode)(2,i.Grid,{mt:.6,children:[(0,o.createComponentVNode)(2,i.Grid.Column,{size:1.4,color:"label",children:"Code:"}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}})})]}),(0,o.createComponentVNode)(2,i.Grid,{mt:.8,children:(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{mb:-.1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return l("signal")}})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=[["good","Alive"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,c.Window,{width:550,height:820,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:r})})};var m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=(r.occupant,r.dialysis),c=r.stomachpumping;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f,{title:"Dialysis",active:i,actToDo:"togglefilter"}),(0,o.createComponentVNode)(2,f,{title:"Stomach Pump",active:c,actToDo:"togglepump"}),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),c=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead,p=d.stasis;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,i.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}}),(0,o.createComponentVNode)(2,i.Button,{content:p,onClick:function(){return c("changestasis")}})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.isBeakerLoaded,d=c.beakerMaxSpace,u=c.beakerFreeSpace,s=e.active,m=e.actToDo,p=e.title,h=s&&u>0;return(0,o.createComponentVNode)(2,i.Section,{title:p,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{disabled:!l||u<=0,selected:h,icon:h?"toggle-on":"toggle-off",content:h?"Active":"Inactive",onClick:function(){return r(m)}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:l?(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:d,value:u/d,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[u,"u"]})})}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.occupant,d=c.chemicals,u=c.maxchem,s=c.amounts;return(0,o.createComponentVNode)(2,i.Section,{title:"Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,i.Box,{color:"average",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,i.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,i.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:t,mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.isBeakerLoaded;return(0,o.createComponentVNode)(2,i.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected.",c&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Remove Beaker",onClick:function(){return r("removebeaker")}})})||null]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(0),r=n(17),a=n(1),i=n(2),c=n(3);t.SmartVend=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.config,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Storage",children:[u.secure&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:-1===u.locked,info:-1!==u.locked,children:-1===u.locked?(0,o.createComponentVNode)(2,i.Box,{children:"Sec.re ACC_** //):securi_nt.diag=>##'or 1=1'%($..."}):(0,o.createComponentVNode)(2,i.Box,{children:"Secure Access: Please have your identification ready."})})||null,0===u.contents.length&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Unfortunately, this ",d.title," is empty."]})||(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Item"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:"Amount"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:"Dispense"})]}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," in stock"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,i.Button,{content:"1",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index,amount:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"5",disabled:e.amount<5,onClick:function(){return l("Release",{index:e.index,amount:5})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index})}}),(0,o.createComponentVNode)(2,i.Button,{content:"All",disabled:e.amount<1,onClick:function(){return l("Release",{index:e.index,amount:e.amount})}})]})]},t)}))(u.contents)]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),i=n(21),c=n(3),l=n(5);t.Smes=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.capacityPercent,m=u.capacity,p=u.charge,h=u.inputAttempt,f=u.inputting,C=u.inputLevel,N=u.inputLevelMax,b=u.inputAvailable,g=u.outputAttempt,V=u.outputting,v=u.outputLevel,k=u.outputLevelMax,y=u.outputUsed,_=(s>=100?"good":f&&"average")||"bad",B=(V?"good":p>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{width:340,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*s,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]},children:[(0,l.round)(p/6e4,1)," kWh / ",(0,l.round)(m/6e4)," kWh (",s,"%)"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:h?"sync-alt":"times",selected:h,onClick:function(){return d("tryinput")},children:h?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:(s>=100?"Fully Charged":f&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===C,onClick:function(){return d("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===C,onClick:function(){return d("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:C/1e3,fillValue:b/1e3,minValue:0,maxValue:N/1e3,step:5,stepPixelSize:4,format:function(e){return(0,i.formatPower)(1e3*e,1)},onDrag:function(e,t){return d("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:C===N,onClick:function(){return d("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:C===N,onClick:function(){return d("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,i.formatPower)(b)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return d("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:B,children:V?"Sending":p>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===v,onClick:function(){return d("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===v,onClick:function(){return d("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:v/1e3,minValue:0,maxValue:k/1e3,step:5,stepPixelSize:4,format:function(e){return(0,i.formatPower)(1e3*e,1)},onDrag:function(e,t){return d("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:v===k,onClick:function(){return d("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:v===k,onClick:function(){return d("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,i.formatPower)(y)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(5);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.generated,s=d.generated_ratio,m=d.sun_angle,p=d.array_angle,h=d.rotation_rate,f=d.max_rotation_rate,C=d.tracking_state,N=d.connected_panels,b=d.connected_tracker;return(0,o.createComponentVNode)(2,i.Window,{width:380,height:230,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return l("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:b?"good":"bad",children:b?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:N>0?"good":"bad",children:N})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:s,children:u+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Star orientation",children:[m,"\xb0"]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracking",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===C,onClick:function(){return l("tracking",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===C,onClick:function(){return l("tracking",{mode:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===C,disabled:!b,onClick:function(){return l("tracking",{mode:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Azimuth",children:[(0===C||1===C)&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"52px",unit:"\xb0",step:1,stepPixelSize:2,minValue:-360,maxValue:720,value:p,format:function(e){var t=Math.sign(e)>0?" (CW)":" (CCW)";return Math.abs((0,c.round)(e))+t},onDrag:function(e,t){return l("azimuth",{value:t})}}),1===C&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"80px",unit:"deg/h",step:1,minValue:-f-.01,maxValue:f+.01,value:h,format:function(e){var t=Math.sign(e)>0?" (CW)":" (CCW)";return Math.abs((0,c.round)(e))+t},onDrag:function(e,t){return l("azimuth_rate",{value:t})}}),2===C&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mt:"3px",children:[p+"\xb0"," (auto)"]})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpaceHeater=void 0;var o=n(0),r=n(32),a=n(1),i=n(2),c=n(3);t.SpaceHeater=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.temp,s=d.minTemp,m=d.maxTemp,p=d.cell,h=d.power;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Temperature",children:[u," K (",u-r.T0C,"\xb0 C)"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Charge",children:[h,"% ",!p&&"(No Cell Inserted)"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.LabeledControls,{children:[(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Thermostat",children:(0,o.createComponentVNode)(2,i.Knob,{animated:!0,value:u-r.T0C,minValue:s-r.T0C,maxValue:m-r.T0C,unit:"C",onChange:function(e,t){return l("temp",{newtemp:t+r.T0C})}})}),(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Cell",children:p?(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Cell",onClick:function(){return l("cellremove")}}):(0,o.createComponentVNode)(2,i.Button,{icon:"car-battery",content:"Insert Cell",onClick:function(){return l("cellinstall")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitCycler=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.SuitCycler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),s=a.active,m=a.locked,p=a.uv_active,h=(0,o.createComponentVNode)(2,c);return p?h=(0,o.createComponentVNode)(2,l):m?h=(0,o.createComponentVNode)(2,d):s&&(h=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.Window,{width:320,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:h})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.safeties,d=c.occupied,u=c.suit,s=c.helmet,m=c.departments,p=c.species,h=c.uv_level,f=c.max_uv_level,C=c.can_repair,N=c.damage;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Storage",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock",onClick:function(){return i("lock")}}),children:[!(!d||!l)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Biological entity detected in suit chamber. Please remove before continuing with operation.",(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",color:"red",content:"Eject Entity",onClick:function(){return i("eject_guy")}})]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"square":"square-o",content:s||"Empty",disabled:!s,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"square":"square-o",content:u||"Empty",disabled:!u,onClick:function(){return i("dispense",{item:"suit"})}})}),C&&N?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit Damage",children:[N,(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",content:"Repair",onClick:function(){return i("repair_suit")}})]}):null]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Customization",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Paintjob",children:(0,o.createComponentVNode)(2,a.Dropdown,{noscroll:!0,width:"100%",options:m,selected:m[0],onSelected:function(e){return i("department",{department:e})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Species",children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"100%",maxHeight:"160px",options:p,selected:p[0],onSelected:function(e){return i("species",{species:e})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,content:"Customize",onClick:function(){return i("apply_paintjob")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"UV Decontamination",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Level",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"50px",value:h,minValue:1,maxValue:f,stepPixelSize:30,onChange:function(e,t){return i("radlevel",{radlevel:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Decontaminate",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",disabled:d&&l,textAlign:"center",onClick:function(){return i("uv")}})})]})})],4)},l=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.model_text,d=c.userHasAccess;return(0,o.createComponentVNode)(2,a.Section,{title:"Locked",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:["The ",l," suit cycler is currently locked. Please contact your system administrator."]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",content:"[Unlock]",disabled:!d,onClick:function(){return i("lock")}})})]})},u=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being painted. Please wait."})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorageUnit=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.SuitStorageUnit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),s=a.panelopen,m=a.uv_active,p=a.broken,h=(0,o.createComponentVNode)(2,c);return s?h=(0,o.createComponentVNode)(2,l):m?h=(0,o.createComponentVNode)(2,d):p&&(h=(0,o.createComponentVNode)(2,u)),(0,o.createComponentVNode)(2,i.Window,{width:400,height:365,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:h})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.locked,d=c.open,u=c.safeties,s=c.occupied,m=c.suit,p=c.helmet,h=c.mask;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",minHeight:"260px",buttons:(0,o.createFragment)([!d&&(0,o.createComponentVNode)(2,a.Button,{icon:l?"unlock":"lock",content:l?"Unlock":"Lock",onClick:function(){return i("lock")}}),!l&&(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"sign-in-alt",content:d?"Close":"Open",onClick:function(){return i("door")}})],0),children:[!(!s||!u)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Biological entity detected in suit chamber. Please remove before continuing with operation.",(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",color:"red",content:"Eject Entity",onClick:function(){return i("eject_guy")}})]}),l&&(0,o.createComponentVNode)(2,a.Box,{mt:6,bold:!0,textAlign:"center",fontSize:"40px",children:[(0,o.createComponentVNode)(2,a.Box,{children:"Unit Locked"}),(0,o.createComponentVNode)(2,a.Icon,{name:"lock"})]})||d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:p?"square":"square-o",content:p||"Empty",disabled:!p,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"square":"square-o",content:m||"Empty",disabled:!m,onClick:function(){return i("dispense",{item:"suit"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"square":"square-o",content:h||"Empty",disabled:!h,onClick:function(){return i("dispense",{item:"mask"})}})})]})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",content:"Decontaminate",disabled:s&&u,textAlign:"center",onClick:function(){return i("uv")}})]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.safeties,d=c.uv_super;return(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Panel",children:[(0,o.createComponentVNode)(2,a.Box,{color:"grey",children:"The panel is ridden with controls, button and meters, labeled in strange signs and symbols that you cannot understand. Probably the manufactoring world's language. Among other things, a few controls catch your eye."}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{children:["A small dial with a biohazard symbol next to it. It's pointing towards a gauge that reads ",d?"15nm":"185nm",".",(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Knob,{size:2,inline:!0,value:d,minValue:0,maxValue:1,step:1,stepPixelSize:40,color:d?"red":"green",format:function(e){return e?"15nm":"185nm"},onChange:function(e,t){return i("toggleUV")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:"biohazard",size:3,color:"orange"})})]})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{children:["A thick old-style button, with 2 grimy LED lights next to it. The ",l?(0,o.createVNode)(1,"font",null,"GREEN",16,{color:"green"}):(0,o.createVNode)(1,"font",null,"RED",16,{color:"red"})," LED is on.",(0,o.createComponentVNode)(2,a.Flex,{mt:1,align:"center",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fontSize:"2rem",color:"grey",inline:!0,icon:"caret-square-right",style:{border:"4px solid #777","border-style":"outset"},onClick:function(){return i("togglesafeties")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"circle",color:l?"black":"red",mr:2}),(0,o.createComponentVNode)(2,a.Icon,{name:"circle",color:l?"green":"black"})]})]})]})]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})},u=function(e,t){return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance."})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupplyConsole=void 0;var o=n(0),r=n(17),a=(n(5),n(21)),i=n(1),c=n(2),l=n(45),d=n(3),u=n(44),s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supply_points,l=e.args,d=l.name,u=l.cost,s=l.manifest,m=l.ref,p=l.random;return(0,o.createComponentVNode)(2,c.Section,{width:"400px",level:2,m:"-1rem",pb:"1rem",title:d,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"shopping-cart",content:"Buy - "+u+" points",disabled:u>a,onClick:function(){return r("request_crate",{ref:m})}}),children:(0,o.createComponentVNode)(2,c.Section,{title:"Contains"+(p?" any "+p+" of:":""),scrollable:!0,height:"200px",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e},e)}))})})};t.SupplyConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,l.modalRegisterBodyOverride)("view_crate",s),(0,o.createComponentVNode)(2,d.Window,{width:700,height:620,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"100%"}),(0,o.createComponentVNode)(2,c.Section,{title:"Supply Records",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})]})})};var m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.supply_points,u=l.shuttle,s=null,m=!1;return l.shuttle_auth&&(1===u.launch&&0===u.mode?s=(0,o.createComponentVNode)(2,c.Button,{icon:"rocket",content:"Send Away",onClick:function(){return r("send_shuttle",{mode:"send_away"})}}):2!==u.launch||3!==u.mode&&1!==u.mode?1===u.launch&&5===u.mode&&(s=(0,o.createComponentVNode)(2,c.Button,{icon:"rocket",content:"Send Shuttle",onClick:function(){return r("send_shuttle",{mode:"send_to_station"})}})):s=(0,o.createComponentVNode)(2,c.Button,{icon:"ban",content:"Cancel Launch",onClick:function(){return r("send_shuttle",{mode:"cancel_shuttle"})}}),u.force&&(m=!0)),(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Supply Points",children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Supply Shuttle",mt:2,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",buttons:(0,o.createFragment)([s,m?(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-triangle",content:"Force Launch",onClick:function(){return r("send_shuttle",{mode:"force_shuttle"})}}):null],0),children:u.location}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Engine",children:u.engine}),4===u.mode?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"ETA",children:u.time>1?(0,a.formatTime)(u.time):"LATE"}):null]})})]})},p=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.order_auth,(0,i.useLocalState)(t,"tabIndex",0)),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"box",selected:0===a,onClick:function(){return l(0)},children:"Request"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"check-circle-o",selected:1===a,onClick:function(){return l(1)},children:"Accepted"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"circle-o",selected:2===a,onClick:function(){return l(2)},children:"Requests"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"book",selected:3===a,onClick:function(){return l(3)},children:"Order history"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"book",selected:4===a,onClick:function(){return l(4)},children:"Export history"})]}),0===a?(0,o.createComponentVNode)(2,h):null,1===a?(0,o.createComponentVNode)(2,f,{mode:"Approved"}):null,2===a?(0,o.createComponentVNode)(2,f,{mode:"Requested"}):null,3===a?(0,o.createComponentVNode)(2,f,{mode:"All"}):null,4===a?(0,o.createComponentVNode)(2,C):null]})},h=function(e,t){var n=(0,i.useBackend)(t),a=n.act,l=n.data,d=l.categories,s=l.supply_packs,m=l.contraband,p=l.supply_points,h=(0,i.useLocalState)(t,"activeCategory",null),f=h[0],C=h[1],N=(0,u.flow)([(0,r.filter)((function(e){return e.group===f})),(0,r.filter)((function(e){return!e.contraband||m})),(0,r.sortBy)((function(e){return e.name})),(0,r.sortBy)((function(e){return e.cost>p}))])(s);return(0,o.createComponentVNode)(2,c.Section,{level:2,children:(0,o.createComponentVNode)(2,c.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"25%",children:(0,o.createComponentVNode)(2,c.Section,{title:"Categories",scrollable:!0,fill:!0,height:"290px",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:e,selected:e===f,onClick:function(){return C(e)}},e)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Section,{title:"Contents",scrollable:!0,fill:!0,height:"290px",children:N.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",justify:"flex-start",spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"70%",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"shopping-cart",ellipsis:!0,content:e.name,color:e.cost>p?"red":null,onClick:function(){return a("request_crate",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{content:"#",color:e.cost>p?"red":null,onClick:function(){return a("request_crate_multi",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{content:"C",color:e.cost>p?"red":null,onClick:function(){return a("view_crate",{crate:e.ref})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:[e.cost," points"]})]})},e.name)}))})})]})})},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=e.mode,d=a.orders,u=a.order_auth,s=a.supply_points,m=d.filter((function(e){return e.status===l||"All"===l}));return m.length?(0,o.createComponentVNode)(2,c.Section,{level:2,children:["Requested"===l&&u?(0,o.createComponentVNode)(2,c.Button,{mt:-1,mb:1,fluid:!0,color:"red",icon:"trash",content:"Clear all requests",onClick:function(){return r("clear_all_requests")}}):null,m.map((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{title:"Order "+(t+1),buttons:"All"===l&&u?(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"trash",content:"Delete Record",onClick:function(){return r("delete_order",{ref:e.ref})}}):null,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[e.entries.map((function(t){return t.entry?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.field,buttons:u?(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){r("edit_order_value",{ref:e.ref,edit:t.field,"default":t.entry})}}):null,children:t.entry}):null})),"All"===l?(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:e.status}):null]}),u&&"Requested"===l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"check",content:"Approve",disabled:e.cost>s,onClick:function(){return r("approve_order",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Deny",onClick:function(){return r("deny_order",{ref:e.ref})}})],4):null]},t)}))]}):(0,o.createComponentVNode)(2,c.Section,{level:2,children:"No orders found."})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.receipts,d=a.order_auth;return l.length?(0,o.createComponentVNode)(2,c.Section,{level:2,children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[e.title.map((function(t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.field,buttons:d?(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){return r("export_edit",{ref:e.ref,edit:t.field,"default":t.entry})}}):null,children:t.entry},t.field)})),e.error?(0,o.createComponentVNode)(2,c.LabeledList.Item,{labelColor:"red",label:"Error",children:e.error}):e.contents.map((function(t,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t.object,buttons:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Edit",onClick:function(){return r("export_edit_field",{ref:e.ref,index:n+1,edit:"meow","default":t.object})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"red",content:"Delete",onClick:function(){return r("export_delete_field",{ref:e.ref,index:n+1})}})],4):null,children:[t.quantity,"x -> ",t.value," points"]},n)}))]}),d?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"plus",content:"Add Item To Record",onClick:function(){return r("export_add_field",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete Record",onClick:function(){return r("export_delete",{ref:e.ref})}})],4):null]},t)}))}):(0,o.createComponentVNode)(2,c.Section,{level:2,children:"No receipts found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEGenerator=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(21);t.TEGenerator=function(e,t){var n=(0,a.useBackend)(t).data,r=n.totalOutput,u=n.maxTotalOutput,s=n.thermalOutput,m=n.primary,p=n.secondary;return(0,o.createComponentVNode)(2,c.Window,{width:550,height:310,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Output",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:r,maxValue:u,children:(0,l.formatPower)(r)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermal Output",children:(0,l.formatPower)(s)})]})}),m&&p?(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,grow:1,children:(0,o.createComponentVNode)(2,d,{name:"Primary Circulator",values:m})}),(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,grow:1,children:(0,o.createComponentVNode)(2,d,{name:"Secondary Circulator",values:p})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning! Both circulators must be connected in order to operate this machine."})]})})};var d=function(e,t){var n=e.name,a=e.values,c=a.dir,d=a.output,u=a.flowCapacity,s=a.inletPressure,m=a.inletTemperature,p=a.outletPressure,h=a.outletTemperature;return(0,o.createComponentVNode)(2,i.Section,{title:n+" ("+c+")",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Turbine Output",children:(0,l.formatPower)(d)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Flow Capacity",children:[(0,r.round)(u,2),"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inlet Pressure",children:(0,l.formatSiUnit)(1e3*s,0,"Pa")}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inlet Temperature",children:[(0,r.round)(m,2)," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outlet Pressure",children:(0,l.formatSiUnit)(1e3*p,0,"Pa")}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outlet Temperature",children:[(0,r.round)(h,2)," K"]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Tank=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.connected,u=l.maskConnected,s=l.tankPressure,m=l.releasePressure,p=l.defaultReleasePressure,h=l.minReleasePressure,f=l.maxReleasePressure;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:320,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"air-freshener":"lock-open",selected:d,disabled:!u,content:"Mask Release Valve",onClick:function(){return c("toggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask Connected",children:u?"Yes":"No"})})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:l.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:m===h,onClick:function(){return c("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(m),width:"65px",unit:"kPa",minValue:h,maxValue:f,onChange:function(e,t){return c("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:m===f,onClick:function(){return c("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:m===p,onClick:function(){return c("pressure",{pressure:"reset"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:275,height:103,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Phoron",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.plasma?"square":"square-o",content:"Dispense",disabled:!l.plasma,onClick:function(){return c("plasma")}}),children:l.plasma}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.oxygen?"square":"square-o",content:"Dispense",disabled:!l.oxygen,onClick:function(){return c("oxygen")}}),children:l.oxygen})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsLogBrowser=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3);t.TelecommsLogBrowser=function(e,t){var n=(0,a.useBackend)(t),r=n.act,u=n.data,s=u.universal_translate,m=u.network,p=u.temp,h=u.servers,f=u.selectedServer;return(0,o.createComponentVNode)(2,c.Window,{width:575,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p&&p.length?(0,o.createComponentVNode)(2,i.NoticeBox,{warning:!0,children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-box",verticalAlign:"middle",children:p}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return r("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]}):null,(0,o.createComponentVNode)(2,i.Section,{title:"Network Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Network",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"search",content:"Refresh",onClick:function(){return r("scan")}}),(0,o.createComponentVNode)(2,i.Button,{color:"bad",icon:"exclamation-triangle",content:"Flush Buffer",disabled:0===h.length,onClick:function(){return r("release")}})],4),children:(0,o.createComponentVNode)(2,i.Button,{content:m,icon:"pen",onClick:function(){return r("network")}})})})}),f?(0,o.createComponentVNode)(2,d,{network:m,server:f,universal_translate:s}):(0,o.createComponentVNode)(2,l,{network:m,servers:h})]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=(n.data,e.network,e.servers);return c&&c.length?(0,o.createComponentVNode)(2,i.Section,{title:"Detected Telecommunication Servers",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name+" ("+e.id+")",children:(0,o.createComponentVNode)(2,i.Button,{content:"View",icon:"eye",onClick:function(){return r("view",{id:e.id})}})},e.id)}))})}):(0,o.createComponentVNode)(2,i.Section,{title:"Detected Telecommunications Servers",children:[(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No servers detected."}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Scan",icon:"search",onClick:function(){return r("scan")}})]})},d=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=(n.data,e.network,e.server),d=e.universal_translate;return(0,o.createComponentVNode)(2,i.Section,{title:"Server ("+l.id+")",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Return",icon:"undo",onClick:function(){return c("mainmenu")}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Recorded Traffic",children:l.totalTraffic>=1024?(0,r.round)(l.totalTraffic/1024)+" Terrabytes":l.totalTraffic+" Gigabytes"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Stored Logs",mt:"4px",children:(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:l.logs&&l.logs.length?l.logs.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{m:"2px",basis:"49%",grow:e.id%2,children:(0,o.createComponentVNode)(2,i.Section,{title:d||e.parameters.uspeech||e.parameters.intelligible||"Execution Error"===e.input_type?e.input_type:"Audio File",buttons:(0,o.createComponentVNode)(2,i.Button.Confirm,{confirmContent:"Delete Log?",color:"bad",icon:"trash",confirmIcon:"trash",onClick:function(){return c("delete",{id:e.id})}}),children:"Execution Error"===e.input_type?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data type",children:"Error"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output",children:e.parameters.message}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Delete",children:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",onClick:function(){return c("delete",{id:e.id})}})})]}):d||e.parameters.uspeech||e.parameters.intelligible?(0,o.createComponentVNode)(2,u,{log:e}):(0,o.createComponentVNode)(2,u,{error:!0})})},e.id)})):"No Logs Detected."})})]})},u=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data,e.log),c=e.error,l=r&&r.parameters||{none:"none"},d=l.timecode,u=l.name,s=l.race,m=l.job,p=l.message;return c?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Recieved",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Source",children:"Unidentifiable"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Class",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",children:"Unintelligible"})]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Recieved",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Source",children:[u," (Job: ",m,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Class",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",className:"LabeledList__breakContents",children:p})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsMachineBrowser=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.TelecommsMachineBrowser=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.network,s=d.temp,m=d.machinelist,p=d.selectedMachine;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[s&&s.length?(0,o.createComponentVNode)(2,a.NoticeBox,{warning:!0,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-box",verticalAlign:"middle",children:s}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return l("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]}):null,(0,o.createComponentVNode)(2,a.Section,{title:"Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Network",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Probe Network",onClick:function(){return l("scan")}}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"exclamation-triangle",content:"Flush Buffer",disabled:0===m.length,onClick:function(){return l("release")}})],4),children:(0,o.createComponentVNode)(2,a.Button,{content:u,icon:"pen",onClick:function(){return l("network")}})})})}),m&&m.length?(0,o.createComponentVNode)(2,c,{title:p?p.name+" ("+p.id+")":"Detected Network Entities",list:p?p.links:m,showBack:p}):(0,o.createComponentVNode)(2,a.Section,{title:"No Devices Found",children:(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Probe Network",onClick:function(){return l("scan")}})})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.list),l=e.title,d=e.showBack;return(0,o.createComponentVNode)(2,a.Section,{title:l,buttons:d&&(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"Back to Main Menu",onClick:function(){return i("mainmenu")}}),children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"u",null,"Linked entities",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:c.length?c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name+" ("+e.id+")",children:(0,o.createComponentVNode)(2,a.Button,{content:"View",icon:"eye",onClick:function(){return i("view",{id:e.id})}})},e.id)})):(0,o.createComponentVNode)(2,a.LabeledList.Item,{color:"bad",children:"No links detected."})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelecommsMultitoolMenu=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(62),c=n(3);t.TelecommsMultitoolMenu=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),u=(a.temp,a.on,a.id,a.network,a.autolinkers,a.shadowlink,a.options);a.linked,a.filter,a.multitool,a.multitool_buffer;return(0,o.createComponentVNode)(2,c.Window,{width:520,height:540,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.TemporaryNotice),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d,{options:u})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.temp,c.on),d=c.id,u=c.network,s=c.autolinkers,m=c.shadowlink,p=(c.options,c.linked),h=c.filter,f=c.multitool,C=c.multitool_buffer;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:l,content:l?"On":"Off",onClick:function(){return i("toggle")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Identification String",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:d,onClick:function(){return i("id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:u,onClick:function(){return i("network")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prefabrication",children:s?"TRUE":"FALSE"}),m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shadow Link",children:"Active."}):null,f?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Multitool Buffer",children:[C?(0,o.createFragment)([C.name,(0,o.createTextVNode)(" ("),C.id,(0,o.createTextVNode)(")")],0):null,(0,o.createComponentVNode)(2,a.Button,{color:C?"green":null,content:C?"Link ("+C.id+")":"Add Machine",icon:C?"link":"plus",onClick:C?function(){return i("link")}:function(){return i("buffer")}}),C?(0,o.createComponentVNode)(2,a.Button,{color:"red",content:"Flush",icon:"trash",onClick:function(){return i("flush")}}):null]}):null]}),(0,o.createComponentVNode)(2,a.Section,{title:"Linked network Entities",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.ref+" "+e.name+" ("+e.id+")",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",icon:"trash",onClick:function(){return i("unlink",{unlink:e.index})}})},e.ref)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Filtering Frequencies",mt:1,children:[h.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{content:e.name+" GHz",confirmContent:"Delete?",confirmColor:"red",confirmIcon:"trash",onClick:function(){return i("delete",{"delete":e.freq})}},e.index)})),h&&0!==h.length?null:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No filters."})]})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.options),l=c.use_listening_level,d=c.use_broadcasting,u=c.use_receiving,s=c.listening_level,m=c.broadcasting,p=c.receiving,h=c.use_change_freq,f=c.change_freq,C=c.use_broadcast_range,N=c.use_receive_range,b=c.range,g=c.minRange,V=c.maxRange;return l||d||u||h||C||N?(0,o.createComponentVNode)(2,a.Section,{title:"Options",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[l?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Locked to Station",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock-closed":"lock-open",content:s?"Yes":"No",onClick:function(){return i("change_listening")}})}):null,d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Broadcasting",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:m,content:m?"Yes":"No",onClick:function(){return i("broadcast")}})}):null,u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receving",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:p,content:p?"Yes":"No",onClick:function(){return i("receive")}})}):null,h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Signal Frequency",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wave-square",selected:!!f,content:f?"Yes ("+f+")":"No",onClick:function(){return i("change_freq")}})}):null,C||N?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(C?"Broadcast":"Receive")+" Range",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:b,minValue:g,maxValue:V,unit:"gigameters",stepPixelSize:4,format:function(e){return e+1},onDrag:function(e,t){return i("range",{range:t})}})}):null]})}):(0,o.createComponentVNode)(2,a.Section,{title:"No Options Found"})}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeClock=void 0;var o=n(0),r=n(5),a=n(1),i=n(2),c=n(3),l=n(188);t.TimeClock=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.department_hours,m=u.user_name,p=u.card,h=u.assignment,f=u.job_datum,C=u.allow_change_job,N=u.job_choices;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:520,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"OOC",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:"OOC Note: PTO acquired is account-wide and shared across all characters. Info listed below is not IC information."}),(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Time Off Balance for "+m,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,color:s[e]>6?"good":s[e]>1?"average":"bad",children:[(0,r.toFixed)(s[e],1)," ",1===s[e]?"hour":"hours"]},e)}))})})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Employee Info",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Employee ID",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"user",onClick:function(){return d("id")},children:p||"Insert ID"})}),!!f&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:f.selection_color,p:.8,children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{ml:1,children:(0,o.createComponentVNode)(2,l.RankIcon,{color:"white",rank:f.title})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{fontSize:1.5,inline:!0,mr:1,children:f.title})})]})})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Departments",children:f.departments}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pay Scale",children:f.economic_modifier}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"PTO Elegibility",children:f.timeoff_factor>0&&(0,o.createComponentVNode)(2,i.Box,{children:["Earns PTO - ",f.pto_department]})||f.timeoff_factor<0&&(0,o.createComponentVNode)(2,i.Box,{children:["Requires PTO - ",f.pto_department]})||(0,o.createComponentVNode)(2,i.Box,{children:"Neutral"})})],4)]})}),!(!C||!f||0===f.timeoff_factor||"Dismissed"===h)&&(0,o.createComponentVNode)(2,i.Section,{title:"Employment Actions",children:f.timeoff_factor>0&&(s[f.pto_department]>0&&(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"exclamation-triangle",onClick:function(){return d("switch-to-offduty")},children:"Go Off-Duty"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning: You do not have enough accrued time off to go off-duty."}))||Object.keys(N).length&&Object.keys(N).map((function(e){return N[e].map((function(t){return(0,o.createComponentVNode)(2,i.Button,{icon:"suitcase",onClick:function(){return d("switch-to-onduty-rank",{"switch-to-onduty-rank":e,"switch-to-onduty-assignment":t})},children:t},t)}))}))||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No Open Positions - See Head Of Personnel"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return c("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return c("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return c("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return c("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return c("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Turbolift=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.Turbolift=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.floors,u=l.doors_open,s=l.fire_mode;return(0,o.createComponentVNode)(2,i.Window,{width:480,height:260+25*s,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Floor Selection",className:s?"Section--elevator--fire":null,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:u?"door-open":"door-closed",content:u?s?"Close Doors (SAFETY OFF)":"Doors Open":"Doors Closed",selected:u&&!s,color:s?"red":null,onClick:function(){return c("toggle_doors")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",color:"bad",content:"Emergency Stop",onClick:function(){return c("emergency_stop")}})],4),children:[!s||(0,o.createComponentVNode)(2,a.Section,{className:"Section--elevator--fire",textAlign:"center",title:"FIREFIGHTER MODE ENGAGED"}),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"22%",textAlign:"right",mr:"3px",children:e.label||"Floor #"+e.id}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"8%",textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"circle",color:e.current?"red":e.target?"green":e.queued?"yellow":null,onClick:function(){return c("move_to_floor",{ref:e.ref})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"50%",grow:1,children:e.name})]})},e.id)}))})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VendingMaintenance=t.VendingProducts=t.Vending=void 0;var o=n(0),r=n(9),a=n(1),i=n(2),c=n(3),l=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.actively_vending,d=e.product;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:d.isatom&&(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",d.path]),null,1,{style:{"vertical-align":"middle","horizontal-align":"middle"}})||null}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,color:d.color,children:d.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Box,{color:(d.amount<=0?"bad":d.amount<=d.max_amount/2&&"average")||"good",children:[d.amount," in stock"]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:d.price?"credit-card":"download",iconSpin:l===d.name,disabled:0===d.amount,content:d.price?"Buy ("+d.price+"\u20ae)":"Vend",onClick:function(){return c("vend",{vend:d.key})}})})]})};t.Vending=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.panel);return(0,o.createComponentVNode)(2,c.Window,{width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),r?(0,o.createComponentVNode)(2,u):null]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,d=c.coin,u=c.chargesMoney,s=c.user,m=c.userMoney,p=c.guestNotice,h=c.products.filter((function(e){return!!e}));return(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,i.Section,{title:"User",children:s&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),","," ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)("\u20ae Thalers")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-grey",children:p})}),(0,o.createComponentVNode)(2,i.Section,{title:"Products",children:(0,o.createComponentVNode)(2,i.Table,{children:h.map((function(e){return(0,o.createComponentVNode)(2,l,{product:e},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,i.Section,{title:d+" deposited",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Coin",onClick:function(){return r("remove_coin")}})})],0)};t.VendingProducts=d;var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.speaker;return(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Section,{title:"Speaker",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:c?"volume-up":"volume-off",content:c?"Enabled":"Disabled",selected:c,onClick:function(){return r("togglevoice")}})})})};t.VendingMaintenance=u},function(e,t,n){"use strict";t.__esModule=!0,t.VolumePanel=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.VolumePanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.volume_channels;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Volume Levels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:Object.keys(l).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Slider,{width:"88%",minValue:0,maxValue:200,value:100*l[e],onChange:function(t,n){return c("adjust_volume",{channel:e,vol:n/100})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"undo",onClick:function(){return c("adjust_volume",{channel:e,vol:1})}})]},e)}))})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VorePanel=void 0;var o=n(0),r=(n(5),n(7)),a=n(1),i=n(2),c=n(3),l=n(9),d=[null,"average","bad"],u={Hold:null,Digest:"red",Absorb:"purple",Unabsorb:"purple",Drain:"purple",Shrink:"purple",Grow:"purple","Size Steal":"purple",Heal:"purple","Encase In Egg":"purple",Transform:"purple","Transform (Hair and eyes)":"purple","Transform (Male)":"purple","Transform (Female)":"purple","Transform (Keep Gender)":"purple","Transform (Replica Of Self)":"purple","Transform (Change Species and Taur)":"purple","Transform (Change Species and Taur) (EGG)":"purple","Transform (Replica Of Self) (EGG)":"purple","Transform (Keep Gender) (EGG)":"purple","Transform (Male) (EGG)":"purple","Transform (Female) (EGG)":"purple"},s={Hold:"being held.",Digest:"being digested.",Absorb:"being absorbed.",Unabsorb:"being unabsorbed.",Drain:"being drained.",Shrink:"being shrunken.",Grow:"being grown.","Size Steal":"having your size stolen.",Heal:"being healed.","Encase In Egg":"being encased in an egg.",Transform:"being transformed.","Transform (Hair and eyes)":"being transformed.","Transform (Male)":"being transformed.","Transform (Female)":"being transformed.","Transform (Keep Gender)":"being transformed.","Transform (Replica Of Self)":"being transformed.","Transform (Change Species and Taur)":"being transformed.","Transform (Change Species and Taur) (EGG)":"being transformed.","Transform (Replica Of Self) (EGG)":"being transformed.","Transform (Keep Gender) (EGG)":"being transformed.","Transform (Male) (EGG)":"being transformed.","Transform (Female) (EGG)":"being transformed."};t.VorePanel=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:700,height:660,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[l.unsaved_changes&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:!0,children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"90%",children:"Warning: Unsaved Changes!"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Save Prefs",icon:"save",onClick:function(){return r("saveprefs")}})})]})})||null,(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,C)]})})};var m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.inside),c=r.absorbed,l=r.belly_name,d=r.belly_mode,m=r.desc,p=r.pred,h=r.contents,C=r.ref;return l?(0,o.createComponentVNode)(2,i.Section,{title:"Inside",children:[(0,o.createComponentVNode)(2,i.Box,{color:"green",inline:!0,children:["You are currently ",c?"absorbed into":"inside"]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"yellow",inline:!0,children:[p,"'s"]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"red",inline:!0,children:l}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"yellow",inline:!0,children:"and you are"}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:u[d],inline:!0,children:s[d]}),"\xa0",(0,o.createComponentVNode)(2,i.Box,{color:"label",children:m}),h.length&&(0,o.createComponentVNode)(2,i.Collapsible,{title:"Belly Contents",children:(0,o.createComponentVNode)(2,f,{contents:h,belly:C})})||"There is nothing else around you."]}):(0,o.createComponentVNode)(2,i.Section,{title:"Inside",children:"You aren't inside anyone."})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.our_bellies,d=c.selected;return(0,o.createComponentVNode)(2,i.Section,{title:"My Bellies",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[l.map((function(e){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{color:e.selected?"green":u[e.digest_mode],onClick:function(){return r("bellypick",{bellypick:e.ref})},children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:e.selected&&u[e.digest_mode]||null,children:[e.name," (",e.contents,")"]})},e.name)})),(0,o.createComponentVNode)(2,i.Tabs.Tab,{onClick:function(){return r("newbelly")},children:["New",(0,o.createComponentVNode)(2,i.Icon,{name:"plus",ml:.5})]})]}),d&&(0,o.createComponentVNode)(2,h,{belly:d})]})},h=function(e,t){var n=(0,a.useBackend)(t).act,c=e.belly,d=c.belly_name,s=c.is_wet,m=c.wet_loop,p=c.mode,h=c.item_mode,C=c.verb,N=c.desc,b=c.fancy,g=c.sound,V=c.release_sound,v=c.can_taste,k=c.nutrition_percent,y=c.digest_brute,_=c.digest_burn,B=c.bulge_size,L=c.shrink_grow_size,w=c.addons,x=c.contaminates,S=c.contaminate_flavor,I=c.contaminate_color,T=c.escapable,E=c.interacts,A=c.contents,P=c.belly_fullscreen,M=c.possible_fullscreens,O=c.disable_hud,F=(0,a.useLocalState)(t,"tabIndex",0),D=F[0],R=F[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===D,onClick:function(){return R(0)},children:"Controls"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===D,onClick:function(){return R(1)},children:"Options"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===D,onClick:function(){return R(2)},children:["Contents (",A.length,")"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===D,onClick:function(){return R(3)},children:"Interactions"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:4===D,onClick:function(){return R(4)},children:"Belly Styles"})]}),0===D&&(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",tooltipPosition:"left",tooltip:"Move this belly tab left.",onClick:function(){return n("move_belly",{dir:-1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",tooltipPosition:"left",tooltip:"Move this belly tab right.",onClick:function(){return n("move_belly",{dir:1})}})],4),children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_name"})},content:d})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,i.Button,{color:u[p],onClick:function(){return n("set_attribute",{attribute:"b_mode"})},content:p})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Flavor Text",buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_desc"})},icon:"pen"}),children:N}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode Addons",children:[w.length&&w.join(", ")||"None",(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_addons"})},ml:1,icon:"plus"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Item Mode",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_item_mode"})},content:h})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vore Verb",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_verb"})},content:C})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Belly Messages",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"dmp"})},content:"Digest Message (to prey)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"dmo"})},content:"Digest Message (to you)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"smo"})},content:"Struggle Message (outside)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"smi"})},content:"Struggle Message (inside)"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"em"})},content:"Examine Message (when full)"}),(0,o.createComponentVNode)(2,i.Button,{color:"red",onClick:function(){return n("set_attribute",{attribute:"b_msgs",msgtype:"reset"})},content:"Reset Messages"})]})]})||1===D&&(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Brute Damage",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_brute_dmg"})},content:y})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Burn Damage",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_burn_dmg"})},content:_})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nutritional Gain",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_nutritionpercent"})},content:k+"%"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contaminates",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contaminates"})},icon:x?"toggle-on":"toggle-off",selected:x,content:x?"Yes":"No"})}),x&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contamination Flavor",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contamination_flavor"})},icon:"pen",content:S})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contamination Color",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_contamination_color"})},icon:"pen",content:(0,r.capitalize)(I)})})],4)||null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Can Taste",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_tastes"})},icon:v?"toggle-on":"toggle-off",selected:v,content:v?"Yes":"No"})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fleshy Belly",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_wetness"})},icon:s?"toggle-on":"toggle-off",selected:s,content:s?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Loop",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_wetloop"})},icon:m?"toggle-on":"toggle-off",selected:m,content:m?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Use Fancy Sounds",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_fancy_sound"})},icon:b?"toggle-on":"toggle-off",selected:b,content:b?"Yes":"No"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vore Sound",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_sound"})},content:g}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_soundtest"})},icon:"volume-up"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Release Sound",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_release"})},content:V}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_releasesoundtest"})},icon:"volume-up"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Examine Size",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_bulge_size"})},content:100*B+"%"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shrink/Grow Size",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_grow_shrink"})},content:100*L+"%"})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"100%",mt:1,children:(0,o.createComponentVNode)(2,i.Button.Confirm,{fluid:!0,icon:"exclamation-triangle",confirmIcon:"trash",color:"red",content:"Delete Belly",confirmContent:"This is irreversable!",onClick:function(){return n("set_attribute",{attribute:"b_del"})}})})]})||2===D&&(0,o.createComponentVNode)(2,f,{outside:!0,contents:A})||3===D&&(0,o.createComponentVNode)(2,i.Section,{title:"Belly Interactions",buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_escapable"})},icon:T?"toggle-on":"toggle-off",selected:T,content:T?"Interactions On":"Interactions Off"}),children:T?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Escape Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.escapechance+"%",onClick:function(){return n("set_attribute",{attribute:"b_escapechance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Escape Time",children:(0,o.createComponentVNode)(2,i.Button,{content:E.escapetime/10+"s",onClick:function(){return n("set_attribute",{attribute:"b_escapetime"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.transferchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_transferchance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer Location",children:(0,o.createComponentVNode)(2,i.Button,{content:E.transferlocation?E.transferlocation:"Disabled",onClick:function(){return n("set_attribute",{attribute:"b_transferlocation"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Absorb Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.absorbchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_absorbchance"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Digest Chance",children:(0,o.createComponentVNode)(2,i.Button,{content:E.digestchance+"%",onClick:function(){return n("set_attribute",{attribute:"b_digestchance"})}})})]}):"These options only display while interactions are turned on."})||4===D&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Vore FX",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Disable Prey HUD",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return n("set_attribute",{attribute:"b_disable_hud"})},icon:O?"toggle-on":"toggle-off",selected:O,content:O?"Yes":"No"})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Belly Fullscreens",children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,selected:""===P||null===P,onClick:function(){return n("set_attribute",{attribute:"b_fullscreen",val:null})},children:"Disabled"}),Object.keys(M).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{width:"256px",height:"256px",selected:e===P,onClick:function(){return n("set_attribute",{attribute:"b_fullscreen",val:e})},children:(0,o.createComponentVNode)(2,i.Box,{className:(0,l.classes)(["vore240x240",e]),style:{transform:"translate(0%, 4%)"}})},e)}))]})],4)||"Error"],0)},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data.show_pictures,l=e.contents,u=e.belly,s=e.outside,m=void 0!==s&&s;return(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",fluid:!0,mb:1,onClick:function(){return r("pick_from_outside",{pickall:!0})},children:"All"})||null,c&&(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",justify:"center",align:"center",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:[(0,o.createComponentVNode)(2,i.Button,{width:"64px",color:e.absorbed?"purple":d[e.stat],style:{"vertical-align":"middle","margin-right":"5px","border-radius":"20px"},onClick:function(){return r(e.outside?"pick_from_outside":"pick_from_inside",{pick:e.ref,belly:u})},children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64, "+e.icon,width:"64px",height:"64px",style:{"-ms-interpolation-mode":"nearest-neighbor","margin-left":"-5px"}})}),e.name]},e.name)}))})||(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:-1,mb:-1,color:e.absorbed?"purple":d[e.stat],onClick:function(){return r(e.outside?"pick_from_outside":"pick_from_inside",{pick:e.ref,belly:u})},children:"Interact"})},e.ref)}))})],0)},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.prefs,d=l.digestable,u=l.devourable,s=l.feeding,m=l.absorbable,p=l.digest_leave_remains,h=l.allowmobvore,f=l.permit_healbelly,C=l.show_vore_fx,N=l.can_be_drop_prey,b=l.can_be_drop_pred,g=l.noisy,V=c.show_pictures;return(0,o.createComponentVNode)(2,i.Section,{title:"Preferences",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eye",selected:V,onClick:function(){return r("show_pictures")},children:["Contents Preference: ",V?"Show Pictures":"Show List"]}),children:[(0,o.createComponentVNode)(2,i.Flex,{spacing:1,wrap:"wrap",justify:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_digest")},icon:d?"toggle-on":"toggle-off",selected:d,fluid:!0,tooltip:"This button is for those who don't like being digested. It can make you undigestable."+(d?" Click here to prevent digestion.":" Click here to allow digestion."),content:d?"Digestion Allowed":"No Digestion"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_absorbable")},icon:m?"toggle-on":"toggle-off",selected:m,fluid:!0,tooltip:"This button allows preds to know whether you prefer or don't prefer to be absorbed. "+(m?"Click here to disallow being absorbed.":"Click here to allow being absorbed."),content:m?"Absorption Allowed":"No Absorption"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_devour")},icon:u?"toggle-on":"toggle-off",selected:u,fluid:!0,tooltip:"This button is to toggle your ability to be devoured by others. "+(u?"Click here to prevent being devoured.":"Click here to allow being devoured."),content:u?"Devouring Allowed":"No Devouring"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_mobvore")},icon:h?"toggle-on":"toggle-off",selected:h,fluid:!0,tooltip:"This button is for those who don't like being eaten by mobs. "+(h?"Click here to prevent being eaten by mobs.":"Click here to allow being eaten by mobs."),content:h?"Mobs eating you allowed":"No Mobs eating you"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_feed")},icon:s?"toggle-on":"toggle-off",selected:s,fluid:!0,tooltip:"This button is to toggle your ability to be fed to or by others vorishly. "+(s?"Click here to prevent being fed to/by other people.":"Click here to allow being fed to/by other people."),content:s?"Feeding Allowed":"No Feeding"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_healbelly")},icon:f?"toggle-on":"toggle-off",selected:f,fluid:!0,tooltipPosition:"top",tooltip:"This button is for those who don't like healbelly used on them as a mechanic. It does not affect anything, but is displayed under mechanical prefs for ease of quick checks. "+(f?"Click here to prevent being heal-bellied.":"Click here to allow being heal-bellied."),content:f?"Heal-bellies Allowed":"No Heal-bellies"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_dropnom_prey")},icon:N?"toggle-on":"toggle-off",selected:N,fluid:!0,tooltip:"This toggle is for spontaneous, environment related vore as prey, including drop-noms, teleporters, etc. "+(N?"Click here to allow being spontaneous prey.":"Click here to disable being spontaneous prey."),content:N?"Spontaneous Prey Enabled":"Spontaneous Prey Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_dropnom_pred")},icon:b?"toggle-on":"toggle-off",selected:b,fluid:!0,tooltip:"This toggle is for spontaneous, environment related vore as a predator, including drop-noms, teleporters, etc. "+(b?"Click here to allow being spontaneous pred.":"Click here to disable being spontaneous pred."),content:b?"Spontaneous Pred Enabled":"Spontaneous Pred Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"32%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_noisy")},icon:g?"toggle-on":"toggle-off",selected:g,fluid:!0,tooltip:"Toggle audible hunger noises. "+(g?"Click here to turn off hunger noises.":"Click here to turn on hunger noises."),content:g?"Hunger Noises Enabled":"Hunger Noises Disabled"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_leaveremains")},icon:p?"toggle-on":"toggle-off",selected:p,fluid:!0,tooltipPosition:"top",tooltip:p?"Your Predator must have this setting enabled in their belly modes to allow remains to show up,if they do not, they will not leave your remains behind, even with this on. Click to disable remains":"Regardless of Predator Setting, you will not leave remains behind. Click this to allow leaving remains.",content:p?"Allow Leaving Remains Behind":"Do Not Allow Leaving Remains Behind"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return r("toggle_fx")},icon:C?"toggle-on":"toggle-off",selected:C,fluid:!0,tooltipPosition:"top",tooltip:C?"This setting controls whether or not a pred is allowed to mess with your HUD and fullscreen overlays.Click to disable all FX.":"Regardless of Predator Setting, you will not see their FX settings. Click this to enable showing FX.",content:C?"Show Vore FX":"Do Not Show Vore FX"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Set Taste",icon:"grin-tongue",onClick:function(){return r("setflavor")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Set Smell",icon:"wind",onClick:function(){return r("setsmell")}})})]}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Save Prefs",icon:"save",onClick:function(){return r("saveprefs")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"49%",grow:1,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Reload Prefs",icon:"undo",onClick:function(){return r("reloadprefs")}})})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,i.Window,{width:350,height:150+30*d.length,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchArtifactAnalyzer=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.XenoarchArtifactAnalyzer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{width:250,height:140,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.owned_scanner,d=c.scan_in_progress;return l?d?(0,o.createComponentVNode)(2,i.Section,{title:"Scan In Progress",children:["Scanning...",(0,o.createComponentVNode)(2,i.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return a("scan")},children:"Cancel Scan"})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Artifact Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"search",onClick:function(){return a("scan")},children:"Begin Scan"})}):(0,o.createComponentVNode)(2,i.Section,{title:"No Scanner Detected",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Warning: No scanner was detected. This machine requires a scanner to operate."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchArtifactHarvester=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchArtifactHarvester=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.info,u=d.no_scanner,s=d.harvesting,m=d.inserted_battery;return(0,o.createComponentVNode)(2,i.Window,{width:450,height:200,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:u&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Warning: No scanner detected."})||(0,o.createComponentVNode)(2,a.Section,{children:s>0&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",mb:1,children:"Please wait. Harvesting in progress."}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return l("stopharvest")},children:"Stop Early"})]})||s<0&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",mb:1,children:"Please wait. Energy dump in progress."}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"stop",onClick:function(){return l("stopharvest")},children:"Stop Early"})]})||Object.keys(m).length&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:m.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy Signature ID",children:m.artifact_id})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"eject",onClick:function(){return l("ejectbattery")},children:"Eject Battery"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"bolt",onClick:function(){return l("drainbattery")},children:"Drain Battery"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"star",onClick:function(){return l("harvest")},children:"Begin Harvest"})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted."})})})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.info.inserted_battery);return Object.keys(i).length?(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:i.stored_charge,maxValue:i.capacity}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted."})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchDepthScanner=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchDepthScanner=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.current,u=l.positive_locations;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[Object.keys(d).length&&(0,o.createComponentVNode)(2,a.Section,{title:"Selected",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"bad",icon:"trash",confirmIcon:"trash",content:"Delete Entry",onClick:function(){return c("clear",{index:d.index})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time",children:d.time}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coords",children:d.coords}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Depth",children:[d.depth," cm"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Size",children:[d.clearance," cm"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dissonance Spread",children:d.dissonance_spread}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomaly Material",children:d.material})]})})||null,(0,o.createComponentVNode)(2,a.Section,{title:"Entries",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",icon:"trash",confirmIcon:"trash",content:"Delete All",onClick:function(){return c("clear")}}),children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return c("select",{select:e.index})},children:[e.time,", ",e.coords]},e.index)}))||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No traces found."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchHandheldPowerUtilizer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchHandheldPowerUtilizer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.inserted_battery,u=l.anomaly,s=l.charge,m=l.capacity,p=l.timeleft,h=l.activated,f=l.duration,C=l.interval;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Anomaly Power Utilizer",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"eject",onClick:function(){return c("ejectbattery")},children:"Eject Battery"}),children:d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Battery",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Anomalies Detected",children:u||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s,maxValue:m,children:[s," / ",m]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left Activated",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"power-off",onClick:function(){return c("startup")},children:h?"Activated":"Deactivated"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Duration",children:(0,o.createComponentVNode)(2,a.NumberInput,{unit:"s",fluid:!0,minValue:0,value:f,stepPixelSize:4,maxValue:30,onDrag:function(e,t){return c("changeduration",{duration:10*t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Interval",children:(0,o.createComponentVNode)(2,a.NumberInput,{unit:"s",fluid:!0,minValue:0,value:C,stepPixelSize:10,maxValue:10,onDrag:function(e,t){return c("changeinterval",{interval:10*t})}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No battery inserted. Please insert a cell."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchReplicator=void 0;var o=n(0),r=(n(5),n(7),n(1)),a=n(2),i=n(3);t.XenoarchReplicator=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.tgui_construction;return(0,o.createComponentVNode)(2,i.Window,{theme:"abductor",width:400,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{color:e.background,icon:e.icon,iconColor:e.foreground,fontSize:4,onClick:function(){return c("construct",{key:e.key})}},e.key)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchSpectrometer=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(7);t.XenoarchSpectrometer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.scanned_item,s=d.scanned_item_desc,m=d.last_scan_data,p=d.scan_progress,h=d.scanning,f=d.scanner_seal_integrity,C=d.scanner_rpm,N=d.scanner_temperature,b=d.coolant_usage_rate,g=d.coolant_usage_max,V=(d.unused_coolant_abs,d.unused_coolant_per),v=d.coolant_purity,k=d.optimal_wavelength,y=d.maser_wavelength,_=d.maser_wavelength_max,B=d.maser_efficiency,L=d.radiation,w=(d.t_left_radspike,d.rad_shield_on);return(0,o.createComponentVNode)(2,i.Window,{width:900,height:825,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"signal",selected:h,onClick:function(){return l("scanItem")},children:h?"HALT SCAN":"Begin Scan"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,onClick:function(){return l("ejectItem")},children:"Eject Item"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Item",children:u||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No item inserted."})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heuristic Analysis",children:s||"None found."})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:100,color:"good"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Vacuum Seal Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:f,minValue:0,maxValue:100,ranges:{good:[66,100],average:[33,66],bad:[0,33]}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"MASER",buttons:(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Match wavelengths to progress the scan."}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"MASER Efficiency",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:B,minValue:0,maxValue:100,ranges:{good:[66,100],average:[33,66],bad:[0,33]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wavelength",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,value:y,fillValue:k,minValue:1,maxValue:_,format:function(e){return e+" MHz"},step:10,onDrag:function(e,t){return l("maserWavelength",{wavelength:t})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Environment / Internal",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Centrifuge Speed",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:C,minValue:0,maxValue:1e3,color:"good",children:[C," RPM"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:N,maxValue:1273,ranges:{bad:[1e3,Infinity],average:[250,1e3],good:[0,250]},children:[N," K"]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radiation",buttons:(0,o.createComponentVNode)(2,a.Button,{selected:w,icon:"radiation",onClick:function(){return l("toggle_rad_shield")},children:w?"Disable Radiation Shielding":"Enable Radiation Shielding"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ambient Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:L,maxValue:100,ranges:{bad:[65,Infinity],average:[15,65],good:[0,15]},children:[L," mSv"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cooling",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Remaining",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:10*V,maxValue:1e3,ranges:{good:[65,Infinity],average:[15,65],bad:[0,15]},children:[10*V," u"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Flow Rate",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,value:b,maxValue:g,stepPixelSize:50,format:function(e){return e+" u/s"},onDrag:function(e,t){return l("coolantRate",{coolant:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Purity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{minValue:0,value:v,maxValue:100,ranges:{good:[66,Infinity],average:[33,66],bad:[0,33]}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Latest Results",children:(0,c.decodeHtmlEntities)(m).split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.XenoarchSuspension=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.XenoarchSuspension=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.cell,u=l.cellCharge,s=l.cellMaxCharge,m=l.locked,p=l.suspension_field;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:150,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:'Triple-phase S.F.G. MK III "Reliant"',buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"lock":"lock-open",selected:!m,onClick:function(){return c("lock")},children:m?"Locked":"Unlocked"}),children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"This interface is locked. Swipe an ID card to unlock it."})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:d&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*s,Infinity],average:[.5*s,.75*s],bad:[-Infinity,.5*s]},value:u,maxValue:s})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No cell inserted."})})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,icon:"meteor",selected:p,onClick:function(){return c("toggle_field")},children:p?"Disengage Suspension Field":"Engage Suspension Field"})],4)})})})}}]); \ No newline at end of file diff --git a/tgui/packages/tgui/styles/components/Input.scss b/tgui/packages/tgui/styles/components/Input.scss index 57d74e4ba8..537cf2e0be 100644 --- a/tgui/packages/tgui/styles/components/Input.scss +++ b/tgui/packages/tgui/styles/components/Input.scss @@ -1,6 +1,8 @@ @use '../base.scss'; @use '../functions.scss' as *; +$text-color: base.$color-fg !default; +$background-color: #0a0a0a !default; $border-color: #88bfff !default; $border-radius: base.$border-radius !default; diff --git a/vorestation.dme b/vorestation.dme index e5112bfc0e..6b5153f039 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1189,6 +1189,7 @@ #include "code\game\objects\items\stacks\rods.dm" #include "code\game\objects\items\stacks\stack.dm" #include "code\game\objects\items\stacks\telecrystal.dm" +#include "code\game\objects\items\stacks\tickets.dm" #include "code\game\objects\items\stacks\sheets\leather.dm" #include "code\game\objects\items\stacks\tiles\fifty_spawner_tiles.dm" #include "code\game\objects\items\stacks\tiles\tile_types.dm" @@ -3524,6 +3525,7 @@ #include "code\modules\tgui\modules\appearance_changer.dm" #include "code\modules\tgui\modules\atmos_control.dm" #include "code\modules\tgui\modules\camera.dm" +#include "code\modules\tgui\modules\communications.dm" #include "code\modules\tgui\modules\crew_monitor.dm" #include "code\modules\tgui\modules\law_manager.dm" #include "code\modules\tgui\modules\overmap.dm" @@ -3531,6 +3533,10 @@ #include "code\modules\tgui\modules\rcon.dm" #include "code\modules\tgui\modules\shutoff_monitor.dm" #include "code\modules\tgui\modules\supermatter_monitor.dm" +#include "code\modules\tgui\modules\ntos-only\cardmod.dm" +#include "code\modules\tgui\modules\ntos-only\configurator.dm" +#include "code\modules\tgui\modules\ntos-only\email.dm" +#include "code\modules\tgui\modules\ntos-only\uav.dm" #include "code\modules\tgui\states\admin.dm" #include "code\modules\tgui\states\always.dm" #include "code\modules\tgui\states\conscious.dm"