diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index fcc81509c88..9e454ed6d68 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -2,7 +2,7 @@
Contains helper procs for airflow, handled in /connection_group.
*/
-/mob/var/tmp/last_airflow_stun = 0
+/mob/var/last_airflow_stun = 0
/mob/proc/airflow_stun()
if(stat == 2)
return 0
@@ -64,10 +64,10 @@ Contains helper procs for airflow, handled in /connection_group.
else
if(n < vsc.airflow_dense_pressure) return 0
-/atom/movable/var/tmp/turf/airflow_dest
-/atom/movable/var/tmp/airflow_speed = 0
-/atom/movable/var/tmp/airflow_time = 0
-/atom/movable/var/tmp/last_airflow = 0
+/atom/movable/var/turf/airflow_dest
+/atom/movable/var/airflow_speed = 0
+/atom/movable/var/airflow_time = 0
+/atom/movable/var/last_airflow = 0
/atom/movable/proc/AirflowCanMove(n)
return 1
diff --git a/code/ZAS/ConnectionManager.dm b/code/ZAS/ConnectionManager.dm
index 3890cd85f5c..30f71d1680b 100644
--- a/code/ZAS/ConnectionManager.dm
+++ b/code/ZAS/ConnectionManager.dm
@@ -34,7 +34,7 @@ Macros:
// macro-ized to cut down on proc calls
#define check(c) (c && c.valid())
-/turf/var/tmp/connection_manager/connections
+/turf/var/connection_manager/connections
/connection_manager/var/connection/N
/connection_manager/var/connection/S
diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm
index 5d8af083658..7f16b34978d 100644
--- a/code/ZAS/Debug.dm
+++ b/code/ZAS/Debug.dm
@@ -9,7 +9,7 @@ var/global/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")
/connection_edge/var/dbg_out = 0
-/turf/var/tmp/dbg_img
+/turf/var/dbg_img
/turf/proc/dbg(image/img, d = 0)
if(d > 0) img.dir = d
cut_overlay(dbg_img)
@@ -17,4 +17,4 @@ var/global/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")
dbg_img = img
/proc/soft_assert(thing,fail)
- if(!thing) message_admins(fail)
\ No newline at end of file
+ if(!thing) message_admins(fail)
diff --git a/code/controllers/subsystems/ai.dm b/code/controllers/subsystems/ai.dm
index 870f76bcfce..7708b596810 100644
--- a/code/controllers/subsystems/ai.dm
+++ b/code/controllers/subsystems/ai.dm
@@ -6,10 +6,10 @@ SUBSYSTEM_DEF(ai)
wait = 2 SECONDS
/// The list of AI datums to be processed.
- var/static/tmp/list/queue = list()
+ var/static/list/queue = list()
/// The list of AI datums currently being processed.
- var/static/tmp/list/current = list()
+ var/static/list/current = list()
/datum/controller/subsystem/ai/stat_entry(msg_prefix)
diff --git a/code/controllers/subsystems/aifast.dm b/code/controllers/subsystems/aifast.dm
index 7859e8e6798..e668302beff 100644
--- a/code/controllers/subsystems/aifast.dm
+++ b/code/controllers/subsystems/aifast.dm
@@ -6,10 +6,10 @@ SUBSYSTEM_DEF(aifast)
wait = 0.25 SECONDS
/// The list of AI datums to be processed.
- var/static/tmp/list/queue = list()
+ var/static/list/queue = list()
/// The list of AI datums currently being processed.
- var/static/tmp/list/current = list()
+ var/static/list/current = list()
/datum/controller/subsystem/aifast/stat_entry(msg_prefix)
diff --git a/code/controllers/subsystems/airflow.dm b/code/controllers/subsystems/airflow.dm
index c4d8d554b4b..791fdda7fe9 100644
--- a/code/controllers/subsystems/airflow.dm
+++ b/code/controllers/subsystems/airflow.dm
@@ -101,11 +101,11 @@ SUBSYSTEM_DEF(airflow)
#undef CLEAR_OBJECT
/atom/movable
- var/tmp/airflow_xo
- var/tmp/airflow_yo
- var/tmp/airflow_od
- var/tmp/airflow_process_delay
- var/tmp/airflow_skip_speedcheck
+ var/airflow_xo
+ var/airflow_yo
+ var/airflow_od
+ var/airflow_process_delay
+ var/airflow_skip_speedcheck
/atom/movable/proc/prepare_airflow(n)
if (!airflow_dest || airflow_speed < 0 || last_airflow > world.time - vsc.airflow_delay)
diff --git a/code/controllers/subsystems/alarm.dm b/code/controllers/subsystems/alarm.dm
index 9dc14a741b4..2de43e74078 100644
--- a/code/controllers/subsystems/alarm.dm
+++ b/code/controllers/subsystems/alarm.dm
@@ -5,13 +5,13 @@ SUBSYSTEM_DEF(alarm)
init_order = INIT_ORDER_ALARM
/// The list of alarm handlers this subsystem processes
- var/static/tmp/list/datum/alarm_handler/handlers
+ var/static/list/datum/alarm_handler/handlers
/// The list of alarm handlers currently being processed
- var/static/tmp/list/current = list()
+ var/static/list/current = list()
/// The list of active alarms
- var/static/tmp/list/active = list()
+ var/static/list/active = list()
/datum/controller/subsystem/alarm/Initialize(timeofday)
diff --git a/code/controllers/subsystems/events.dm b/code/controllers/subsystems/events.dm
index 50fae383cf3..ef291e18cf1 100644
--- a/code/controllers/subsystems/events.dm
+++ b/code/controllers/subsystems/events.dm
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(events)
name = "Events (Legacy)"
wait = 2 SECONDS
- var/tmp/list/currentrun = null
+ var/list/currentrun = null
var/list/datum/event/active_events = list()
var/list/datum/event/finished_events = list()
diff --git a/code/controllers/subsystems/inactivity.dm b/code/controllers/subsystems/inactivity.dm
index d05f8c10f78..123920c6f13 100644
--- a/code/controllers/subsystems/inactivity.dm
+++ b/code/controllers/subsystems/inactivity.dm
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(inactivity)
name = "Inactivity"
wait = 60 SECONDS
flags = SS_NO_INIT | SS_BACKGROUND
- var/tmp/list/client_list
+ var/list/client_list
var/number_kicked = 0
/datum/controller/subsystem/inactivity/fire(resumed, no_mc_tick)
diff --git a/code/controllers/subsystems/overlays.dm b/code/controllers/subsystems/overlays.dm
index a9eb3c4e26d..58e2753957a 100644
--- a/code/controllers/subsystems/overlays.dm
+++ b/code/controllers/subsystems/overlays.dm
@@ -6,16 +6,16 @@ SUBSYSTEM_DEF(overlays)
init_order = INIT_ORDER_OVERLAY
/// The queue of atoms that need overlay updates.
- var/static/tmp/list/queue = list()
+ var/static/list/queue = list()
/// A list([icon] = list([state] = [appearance], ...), ...) cache of appearances.
- var/static/tmp/list/state_cache = list()
+ var/static/list/state_cache = list()
/// A list([icon] = [appearance], ...) cache of appearances.
- var/static/tmp/list/icon_cache = list()
+ var/static/list/icon_cache = list()
/// The number of appearances currently cached.
- var/static/tmp/cache_size = 0
+ var/static/cache_size = 0
/datum/controller/subsystem/overlays/Recover()
diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm
index 58925d82f47..85ce8909f2b 100644
--- a/code/controllers/subsystems/radiation.dm
+++ b/code/controllers/subsystems/radiation.dm
@@ -7,9 +7,9 @@ SUBSYSTEM_DEF(radiation)
var/list/sources_assoc = list() // Sources indexed by turf for de-duplication.
var/list/resistance_cache = list() // Cache of turf's radiation resistance.
- var/tmp/list/current_sources = list()
- var/tmp/list/current_res_cache = list()
- var/tmp/list/listeners = list()
+ var/list/current_sources = list()
+ var/list/current_res_cache = list()
+ var/list/listeners = list()
/datum/controller/subsystem/radiation/fire(resumed, no_mc_tick)
if (!resumed)
diff --git a/code/controllers/subsystems/shuttles.dm b/code/controllers/subsystems/shuttles.dm
index ccc64bbe2ef..ae031be7151 100644
--- a/code/controllers/subsystems/shuttles.dm
+++ b/code/controllers/subsystems/shuttles.dm
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(shuttles)
var/list/sectors_to_initialize // Used to find all sector objects at the appropriate time.
var/block_init_queue = TRUE // Block initialization of new shuttles/sectors
- var/tmp/list/current_run // Shuttles remaining to process this fire() tick
+ var/list/current_run // Shuttles remaining to process this fire() tick
/datum/controller/subsystem/shuttles/OnNew()
global.shuttle_controller = src // TODO - Remove this! Change everything to point at SSshuttles instead
diff --git a/code/controllers/subsystems/tgui.dm b/code/controllers/subsystems/tgui.dm
index 51fb7865c54..90e552fdafb 100644
--- a/code/controllers/subsystems/tgui.dm
+++ b/code/controllers/subsystems/tgui.dm
@@ -6,16 +6,16 @@ SUBSYSTEM_DEF(tgui)
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
/// The current queue of UIs to be processed
- var/static/tmp/list/current = list()
+ var/static/list/current = list()
/// The whole set of open UIs
- var/static/tmp/list/open_uis = list()
+ var/static/list/open_uis = list()
/// The whole set of open UIs as ("\ref[owner]" = /datum/tgui?)
- var/static/tmp/list/open_uis_by_src = list()
+ var/static/list/open_uis_by_src = list()
/// The template document used by all tgui instances
- var/static/tmp/base_html
+ var/static/base_html
/datum/controller/subsystem/tgui/Recover()
@@ -346,4 +346,4 @@ SUBSYSTEM_DEF(tgui)
target.tgui_open_uis.Add(ui)
// Clear the old list.
source.tgui_open_uis.Cut()
- return TRUE
\ No newline at end of file
+ return TRUE
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 21e9c247e7f..3a61bff21e2 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -14,8 +14,8 @@
var/datum_flags = EMPTY_BITFIELD
#ifdef TESTING
- var/tmp/running_find_references
- var/tmp/last_find_references = 0
+ var/running_find_references
+ var/last_find_references = 0
#endif
// Default implementation of clean-up code.
diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm
deleted file mode 100644
index 0ee38f3b120..00000000000
--- a/code/defines/procs/radio.dm
+++ /dev/null
@@ -1,91 +0,0 @@
-#define TELECOMMS_RECEPTION_NONE 0
-#define TELECOMMS_RECEPTION_SENDER 1
-#define TELECOMMS_RECEPTION_RECEIVER 2
-#define TELECOMMS_RECEPTION_BOTH 3
-
-/proc/register_radio(source, old_frequency, new_frequency, radio_filter)
- if(old_frequency)
- radio_controller.remove_object(source, old_frequency)
- if(new_frequency)
- return radio_controller.add_object(source, new_frequency, radio_filter)
-
-/proc/unregister_radio(source, frequency)
- if(radio_controller)
- radio_controller.remove_object(source, frequency)
-
-/proc/get_frequency_name(var/display_freq)
- var/freq_text
-
- // the name of the channel
- if(display_freq in ANTAG_FREQS)
- freq_text = "#unkn"
- else
- for(var/channel in radiochannels)
- if(radiochannels[channel] == display_freq)
- freq_text = channel
- break
-
- // --- If the frequency has not been assigned a name, just use the frequency as the name ---
- if(!freq_text)
- freq_text = format_frequency(display_freq)
-
- return freq_text
-
-/datum/reception
- var/obj/machinery/message_server/message_server = null
- var/telecomms_reception = TELECOMMS_RECEPTION_NONE
- var/message = ""
-
-/datum/receptions
- var/obj/machinery/message_server/message_server = null
- var/sender_reception = TELECOMMS_RECEPTION_NONE
- var/list/receiver_reception = new
-
-/proc/get_message_server()
- if(message_servers)
- for (var/obj/machinery/message_server/MS in message_servers)
- if(MS.active)
- return MS
- return null
-
-/proc/check_signal(var/datum/signal/signal)
- return signal && signal.data["done"]
-
-/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal)
- return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE
-
-/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
- if(receiver && check_signal(signal))
- var/turf/pos = get_turf(receiver)
- if(pos && (pos.z in signal.data["level"]))
- return TELECOMMS_RECEPTION_RECEIVER
- return TELECOMMS_RECEPTION_NONE
-
-/proc/get_reception(var/atom/sender, var/receiver, var/message = "", var/do_sleep = 1)
- var/datum/reception/reception = new
-
- // check if telecomms I/O route 1459 is stable
- reception.message_server = get_message_server()
-
- var/datum/signal/signal = sender.telecomms_process(do_sleep) // Be aware that this proc calls sleep, to simulate transmition delays
- reception.telecomms_reception |= get_sender_reception(sender, signal)
- reception.telecomms_reception |= get_receiver_reception(receiver, signal)
- reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message
-
- return reception
-
-/proc/get_receptions(var/atom/sender, var/list/atom/receivers, var/do_sleep = 1)
- var/datum/receptions/receptions = new
- receptions.message_server = get_message_server()
-
- var/datum/signal/signal
- if(sender)
- signal = sender.telecomms_process(do_sleep)
- receptions.sender_reception = get_sender_reception(sender, signal)
-
- for(var/atom/receiver in receivers)
- if(!signal)
- signal = receiver.telecomms_process()
- receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal)
-
- return receptions
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 242130cf8e6..992b49346c6 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -540,3 +540,16 @@ Class Procs:
// Stub for above proc. Implemented on exosuit fabricators and prosthetics fabricators.
/obj/machinery/proc/refresh_queue()
return
+
+
+/obj/machinery/proc/get_multitool(mob/user)
+ var/obj/item/multitool/P = null
+ if (!issilicon(user) && istype(user.get_active_hand(), /obj/item/multitool))
+ P = user.get_active_hand()
+ else if (isAI(user))
+ var/mob/living/silicon/ai/U = user
+ P = U.aiMulti
+ else if (isrobot(user) && in_range(user, src))
+ if (istype(user.get_active_hand(), /obj/item/multitool))
+ P = user.get_active_hand()
+ return P
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 00922020f59..59ab9b6b2f4 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -103,22 +103,6 @@
NEWSCASTER.newsAlert(annoncement)
NEWSCASTER.update_icon()
- // var/list/receiving_pdas = new
- // for (var/obj/item/pda/P in PDAs)
- // if(!P.owner)
- // continue
- // if(P.toff)
- // continue
- // receiving_pdas += P
-
- // spawn(0) // get_receptions sleeps further down the line, spawn of elsewhere
- // var/datum/receptions/receptions = get_receptions(null, receiving_pdas) // datums are not atoms, thus we have to assume the newscast network always has reception
-
- // for(var/obj/item/pda/PDA in receiving_pdas)
- // if(!(receptions.receiver_reception[PDA] & TELECOMMS_RECEPTION_RECEIVER))
- // continue
-
- // PDA.new_news(annoncement)
var/global/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list.
diff --git a/code/game/machinery/telecomms/allinone.dm b/code/game/machinery/telecomms/allinone.dm
new file mode 100644
index 00000000000..2aebff9226d
--- /dev/null
+++ b/code/game/machinery/telecomms/allinone.dm
@@ -0,0 +1,122 @@
+/* All In One Telecomms Machine
+* Basically just an empty shell for receiving and broadcasting radio messages. Not
+* very flexible, but it gets the job done. Listens on *every* zlevel unless subtyped.
+*/
+
+/obj/machinery/telecomms/allinone
+ name = "Telecommunications Mainframe"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "allinone"
+ desc = "A compact machine used for portable subspace telecommuniations processing."
+ density = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 20
+ anchored = TRUE
+ machinetype = 6
+ produces_heat = FALSE
+ var/list/linked_radios_weakrefs = list()
+ var/intercept = FALSE // if nonzero, broadcasts all messages to syndicate channel
+ var/overmap_range = 0
+
+
+/obj/machinery/telecomms/allinone/proc/link_radio(obj/item/radio/radio)
+ if (!istype(radio))
+ return
+ linked_radios_weakrefs |= weakref(radio)
+
+
+/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
+ if (!on)
+ return
+ if (!using_map.use_overmap)
+ return
+ if (signal.data["done"])
+ return
+ var/map_levels = using_map.get_map_levels(z, TRUE, overmap_range)
+ if (signal.transmission_method != TRANSMISSION_BLUESPACE)
+ var/list/signal_levels = list()
+ signal_levels += signal.data["level"]
+ var/list/overlap = map_levels & signal_levels
+ if (!length(overlap))
+ return
+ if(!is_freq_listening(signal))
+ return
+ signal.data["done"] = TRUE
+ signal.data["compression"] = 0
+ var/datum/signal/original = signal.data["original"]
+ if (original)
+ original.data["done"] = TRUE
+ signal.data["level"] = map_levels
+ if (signal.data["slow"] > 0)
+ sleep(signal.data["slow"])
+ var/datum/radio_frequency/connection = signal.data["connection"]
+ var/list/forced_radios
+ for (var/weakref/wr in linked_radios_weakrefs)
+ var/obj/item/radio/radio = wr.resolve()
+ if (istype(radio))
+ LAZYDISTINCTADD(forced_radios, radio)
+ Broadcast_Message(
+ signal.data["connection"],
+ signal.data["mob"],
+ signal.data["vmask"],
+ signal.data["vmessage"],
+ signal.data["radio"],
+ signal.data["message"],
+ signal.data["name"],
+ signal.data["job"],
+ signal.data["realname"],
+ signal.data["vname"],
+ DATA_NORMAL,
+ signal.data["compression"],
+ signal.data["level"],
+ connection.frequency,
+ signal.data["verb"],
+ signal.data["language"],
+ forced_radios
+ )
+
+
+/obj/machinery/telecomms/allinone/antag
+ use_power = USE_POWER_OFF
+ idle_power_usage = 0
+
+
+/obj/machinery/telecomms/allinone/antag/receive_signal(datum/signal/signal)
+ if (!on)
+ return
+ if (!is_freq_listening(signal))
+ return
+ signal.data["done"] = TRUE
+ signal.data["compression"] = 0
+ var/datum/signal/original = signal.data["original"]
+ if (original)
+ original.data["done"] = TRUE
+ signal.data["level"] = using_map.contact_levels.Copy()
+ if (signal.data["slow"] > 0)
+ sleep(signal.data["slow"])
+ var/datum/radio_frequency/connection = signal.data["connection"]
+ var/list/forced_radios
+ for (var/weakref/wr in linked_radios_weakrefs)
+ var/obj/item/radio/radio = wr.resolve()
+ if (istype(radio))
+ LAZYDISTINCTADD(forced_radios, radio)
+ if (connection.frequency in ANTAG_FREQS)
+ Broadcast_Message(
+ signal.data["connection"], signal.data["mob"],
+ signal.data["vmask"], signal.data["vmessage"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], signal.data["vname"], DATA_NORMAL,
+ signal.data["compression"], list(0), connection.frequency,
+ signal.data["verb"], forced_radios
+ )
+ else if(intercept)
+ Broadcast_Message(
+ signal.data["connection"], signal.data["mob"],
+ signal.data["vmask"], signal.data["vmessage"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], signal.data["vname"], DATA_ANTAG,
+ signal.data["compression"], list(0), connection.frequency,
+ signal.data["verb"], forced_radios
+ )
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 5261b3bc195..304cde0a661 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -1,748 +1,112 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/*
- The broadcaster sends processed messages to all radio devices in the game. They
- do not have to be headsets; intercoms and station-bounced radios suffice.
-
- They receive their message from a server after the message has been logged.
+/* Telecomms Broadcaster
+* The broadcaster sends processed messages to all radio devices in the game. They
+* do not have to be headsets; intercoms and station-bounced radios suffice. They
+* receive their message from a server after the message has been logged.
*/
-var/global/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam
-var/global/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync
-
/obj/machinery/telecomms/broadcaster
name = "Subspace Broadcaster"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "broadcaster"
desc = "A dish-shaped machine used to broadcast processed subspace signals."
- density = 1
- anchored = 1
+ density = TRUE
+ anchored = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 25
machinetype = 5
- produces_heat = 0
+ produces_heat = FALSE
delay = 7
circuit = /obj/item/circuitboard/telecomms/broadcaster
- //Vars only used if you're using the overmap
+ interact_offline = TRUE
+ var/list/linked_radios_weakrefs = list()
var/overmap_range = 0
var/overmap_range_min = 0
var/overmap_range_max = 5
- //Linked bluespace radios
- var/list/linked_radios_weakrefs = list()
-
-/obj/machinery/telecomms/broadcaster/proc/link_radio(var/obj/item/radio/R)
- if(!istype(R))
- return
- linked_radios_weakrefs |= weakref(R)
-
-/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- // Don't broadcast rejected signals
- if(signal.data["reject"])
- return
-
- if(signal.data["message"])
-
- // Prevents massive radio spam
- signal.data["done"] = 1 // mark the signal as being broadcasted
- // Search for the original signal and mark it as done as well
- var/datum/signal/original = signal.data["original"]
- if(original)
- original.data["done"] = 1
- original.data["compression"] = signal.data["compression"]
- original.data["level"] = signal.data["level"]
-
- var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
- if(signal_message in recentmessages)
- return
- recentmessages.Add(signal_message)
-
- if(signal.data["slow"] > 0)
- sleep(signal.data["slow"]) // simulate the network lag if necessary
-
- signal.data["level"] |= using_map.get_map_levels(listening_level, TRUE, overmap_range)
-
- var/list/forced_radios
- for(var/weakref/wr in linked_radios_weakrefs)
- var/obj/item/radio/R = wr.resolve()
- if(istype(R))
- LAZYDISTINCTADD(forced_radios, R)
-
- /** #### - Normal Broadcast - #### **/
- if(signal.data["type"] == SIGNAL_NORMAL)
- /* ###### Broadcast a message using signal.data ###### */
- Broadcast_Message(signal.data["connection"], signal.data["mob"],
- signal.data["vmask"], signal.data["vmessage"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"], signal.data["vname"], DATA_NORMAL,
- signal.data["compression"], signal.data["level"], signal.frequency,
- signal.data["verb"], forced_radios)
-
- /** #### - Simple Broadcast - #### **/
-
- if(signal.data["type"] == SIGNAL_SIMPLE)
-
- /* ###### Broadcast a message using signal.data ###### */
- Broadcast_SimpleMessage(signal.data["name"], signal.frequency,
- signal.data["message"], DATA_NORMAL, null,
- signal.data["compression"], listening_level, forced_radios)
-
-
- /** #### - Artificial Broadcast - #### **/
- // (Imitates a mob)
-
- if(signal.data["type"] == SIGNAL_FAKE)
-
- /* ###### Broadcast a message using signal.data ###### */
- // Parameter "data" as DATA_FAKE: AI can't track this person/mob
-
- Broadcast_Message(signal.data["connection"], signal.data["mob"],
- signal.data["vmask"], signal.data["vmessage"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"], signal.data["vname"], DATA_FAKE,
- signal.data["compression"], signal.data["level"], signal.frequency,
- signal.data["verb"], forced_radios)
- if(!message_delay)
- message_delay = 1
- spawn(10)
- message_delay = 0
- recentmessages = list()
-
- /* --- Do a snazzy animation! --- */
- flick("broadcaster_send", src)
/obj/machinery/telecomms/broadcaster/Destroy()
- // In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
- if(message_delay)
+ if (message_delay)
message_delay = 0
- ..()
-
-
-/*
- Basically just an empty shell for receiving and broadcasting radio messages. Not
- very flexible, but it gets the job done.
- NOTE: This AIO device listens on *every* zlevel (it does not even check)
-*/
-
-/obj/machinery/telecomms/allinone
- name = "Telecommunications Mainframe"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "allinone"
- desc = "A compact machine used for portable subspace telecommuniations processing."
- density = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 20
- anchored = 1
- machinetype = 6
- produces_heat = 0
- var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
- var/overmap_range = 0 //Same turf
+ return ..()
- var/list/linked_radios_weakrefs = list()
-/obj/machinery/telecomms/allinone/proc/link_radio(var/obj/item/radio/R)
- if(!istype(R))
+/obj/machinery/telecomms/broadcaster/proc/link_radio(obj/item/radio/radio)
+ if (!istype(radio))
return
- linked_radios_weakrefs |= weakref(R)
+ linked_radios_weakrefs |= weakref(radio)
-/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
- // Has to be on to receive messages
- if(!on)
+/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (signal.data["reject"])
return
-
- // Why did you use this subtype?
- if(!using_map.use_overmap)
+ if (!signal.data["message"])
return
-
- // Someone else handling it?
- if(signal.data["done"])
+ signal.data["done"] = TRUE
+ var/datum/signal/original = signal.data["original"]
+ if (original)
+ original.data["done"] = TRUE
+ original.data["compression"] = signal.data["compression"]
+ original.data["level"] = signal.data["level"]
+ var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
+ if (signal_message in recentmessages)
return
-
- // Where are we able to hear from (and talk to, since we're AIO) anyway?
- var/map_levels = using_map.get_map_levels(z, TRUE, overmap_range)
-
- //Bluespace can skip this check
- if(signal.transmission_method != TRANSMISSION_BLUESPACE)
- var/list/signal_levels = list()
- signal_levels += signal.data["level"] //If it's text/number, it'll be the only entry, if it's a list, it'll get combined
- var/list/overlap = map_levels & signal_levels //Returns a list of similar levels
- if(!overlap.len)
- return
-
- if(is_freq_listening(signal)) // detect subspace signals
-
- signal.data["done"] = 1 // mark the signal as being broadcasted since we're a broadcaster
- signal.data["compression"] = 0 // decompress since we're a processor
-
- // Search for the original signal and mark it as done as well
- var/datum/signal/original = signal.data["original"]
- if(original)
- original.data["done"] = 1
-
- // For some reason level is both used as a list and not a list, and now it needs to be a list.
- signal.data["level"] = map_levels
-
- if(signal.data["slow"] > 0)
- sleep(signal.data["slow"]) // simulate the network lag if necessary
-
- /* ###### Broadcast a message using signal.data ###### */
-
- var/datum/radio_frequency/connection = signal.data["connection"]
-
- var/list/forced_radios
- for(var/weakref/wr in linked_radios_weakrefs)
- var/obj/item/radio/R = wr.resolve()
- if(istype(R))
- LAZYDISTINCTADD(forced_radios, R)
-
+ recentmessages += signal_message
+ if (signal.data["slow"] > 0)
+ sleep(signal.data["slow"])
+ signal.data["level"] |= using_map.get_map_levels(listening_level, TRUE, overmap_range)
+ var/list/forced_radios
+ for (var/weakref/wr in linked_radios_weakrefs)
+ var/obj/item/radio/R = wr.resolve()
+ if (istype(R))
+ LAZYDISTINCTADD(forced_radios, R)
+ if (signal.data["type"] == SIGNAL_NORMAL)
Broadcast_Message(
- signal.data["connection"],
- signal.data["mob"],
- signal.data["vmask"],
- signal.data["vmessage"],
- signal.data["radio"],
- signal.data["message"],
- signal.data["name"],
- signal.data["job"],
- signal.data["realname"],
- signal.data["vname"],
- DATA_NORMAL,
- signal.data["compression"],
- signal.data["level"],
- connection.frequency,
- signal.data["verb"],
- signal.data["language"],
- forced_radios
+ signal.data["connection"], signal.data["mob"],
+ signal.data["vmask"], signal.data["vmessage"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], signal.data["vname"], DATA_NORMAL,
+ signal.data["compression"], signal.data["level"], signal.frequency,
+ signal.data["verb"], forced_radios
)
-
-//Antag version with unlimited range (doesn't even check) and uses no power, to enable antag comms to work anywhere.
-/obj/machinery/telecomms/allinone/antag
- use_power = USE_POWER_OFF
- idle_power_usage = 0
-
-/obj/machinery/telecomms/allinone/antag/receive_signal(datum/signal/signal)
- if(!on) // has to be on to receive messages
- return
-
- if(is_freq_listening(signal)) // detect subspace signals
-
- signal.data["done"] = 1 // mark the signal as being broadcasted
- signal.data["compression"] = 0
-
- // Search for the original signal and mark it as done as well
- var/datum/signal/original = signal.data["original"]
- if(original)
- original.data["done"] = 1
-
- // For some reason level is both used as a list and not a list, and now it needs to be a list.
- // Because this is a 'all in one' machine, we're gonna just cheat.
- signal.data["level"] = using_map.contact_levels.Copy()
-
- if(signal.data["slow"] > 0)
- sleep(signal.data["slow"]) // simulate the network lag if necessary
-
- /* ###### Broadcast a message using signal.data ###### */
-
- var/datum/radio_frequency/connection = signal.data["connection"]
-
- var/list/forced_radios
- for(var/weakref/wr in linked_radios_weakrefs)
- var/obj/item/radio/R = wr.resolve()
- if(istype(R))
- LAZYDISTINCTADD(forced_radios, R)
-
- if(connection.frequency in ANTAG_FREQS) // if antag broadcast, just
- Broadcast_Message(signal.data["connection"], signal.data["mob"],
- signal.data["vmask"], signal.data["vmessage"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"], signal.data["vname"], DATA_NORMAL,
- signal.data["compression"], list(0), connection.frequency,
- signal.data["verb"], forced_radios)
- else
- if(intercept)
- Broadcast_Message(signal.data["connection"], signal.data["mob"],
- signal.data["vmask"], signal.data["vmessage"],
- signal.data["radio"], signal.data["message"],
- signal.data["name"], signal.data["job"],
- signal.data["realname"], signal.data["vname"], DATA_ANTAG,
- signal.data["compression"], list(0), connection.frequency,
- signal.data["verb"], forced_radios)
-
-/**
-
- Here is the big, bad function that broadcasts a message given the appropriate
- parameters.
-
- @param connection:
- The datum generated in radio.dm, stored in signal.data["connection"].
-
- @param M:
- Reference to the mob/speaker, stored in signal.data["mob"]
-
- @param vmask:
- Boolean value if the mob is "hiding" its identity via voice mask, stored in
- signal.data["vmask"]
-
- @param vmessage:
- If specified, will display this as the message; such as "chimpering"
- for monkies if the mob is not understood. Stored in signal.data["vmessage"].
-
- @param radio:
- Reference to the radio broadcasting the message, stored in signal.data["radio"]
-
- @param message:
- The actual string message to display to mobs who understood mob M. Stored in
- signal.data["message"]
-
- @param name:
- The name to display when a mob receives the message. signal.data["name"]
-
- @param job:
- The name job to display for the AI when it receives the message. signal.data["job"]
-
- @param realname:
- The "real" name associated with the mob. signal.data["realname"]
-
- @param vname:
- If specified, will use this name when mob M is not understood. signal.data["vname"]
-
- @param data:
- If specified:
- 1 -- Will only broadcast to intercoms
- 2 -- Will only broadcast to intercoms and station-bounced radios
- 3 -- Broadcast to syndicate frequency
- 4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
-
- @param compression:
- If 0, the signal is audible
- If nonzero, the signal may be partially inaudible or just complete gibberish.
-
- @param level:
- The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
-
- @param freq
- The frequency of the signal
-
-**/
-
-/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
- var/vmask, var/list/vmessage_pieces, var/obj/item/radio/radio,
- var/list/message_pieces, var/name, var/job, var/realname, var/vname,
- var/data, var/compression, var/list/level, var/freq, var/verbage = "says",
- var/list/forced_radios)
-
- /* ###### Prepare the radio connection ###### */
-
- var/display_freq = freq
-
- var/list/obj/item/radio/radios = list()
-
- for(var/obj/item/radio/R in forced_radios)
- //Cursory check to ensure they are 'on' and stuff
- if(R.receive_range(display_freq, list(0)) > -1)
- radios |= R
-
- // --- Broadcast only to intercom devices ---
-
- if(data == DATA_INTERCOM)
-
- for (var/obj/item/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
- if(R.receive_range(display_freq, level) > -1)
- radios |= R
-
- // --- Broadcast only to intercoms and station-bounced radios ---
-
- else if(data == DATA_LOCAL)
-
- for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
-
- if(istype(R, /obj/item/radio/headset) && !R.adhoc_fallback)
- continue
-
- if(R.receive_range(display_freq, level) > -1)
- radios |= R
-
- // --- Broadcast to antag radios! ---
-
- else if(data == DATA_ANTAG)
- for(var/antag_freq in ANTAG_FREQS)
- var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(antag_freq)
- for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
- if(R.receive_range(antag_freq, level) > -1)
- radios |= R
-
- // --- Broadcast to ALL radio devices ---
-
- else
-
- for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
- if(R.receive_range(display_freq, level) > -1)
- radios |= R
-
- // Get a list of mobs who can hear from the radios we collected.
- var/list/receive = get_mobs_in_radio_ranges(radios)
-
- /* ###### Organize the receivers into categories for displaying the message ###### */
-
- // Understood the message:
- var/list/heard_masked = list() // masked name or no real name
- var/list/heard_normal = list() // normal message
-
- // Did not understand the message:
- var/list/heard_voice = list() // voice message (ie "chimpers")
- var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
- var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
-
- for (var/mob/R in receive)
-
- /* --- Loop through the receivers and categorize them --- */
- if(!R.is_preference_enabled(/datum/client_preference/holder/hear_radio))
- continue
-
- if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
- continue
-
- // Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
- if(data == DATA_ANTAG && istype(R, /mob/observer/dead) && R.is_preference_enabled(/datum/client_preference/ghost_radio))
- continue
-
- // --- Check for compression ---
- if(compression > 0)
- heard_gibberish += R
- continue
-
- // --- Can understand the speech ---
-
- if(!M || R.say_understands(M))
-
- // - Not human or wearing a voice mask -
- if(!M || !ishuman(M) || vmask)
- heard_masked += R
-
- // - Human and not wearing voice mask -
- else
- heard_normal += R
-
- // --- Can't understand the speech ---
-
- else
- // - The speaker has a prespecified "voice message" to display if not understood -
- if(vmessage_pieces)
- heard_voice += R
-
- // - Just display a garbled message -
- else
- heard_garbled += R
-
-
- /* ###### Begin formatting and sending the message ###### */
- if(length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled) || length(heard_gibberish))
-
- /* --- Some miscellaneous variables to format the string output --- */
- var/freq_text = get_frequency_name(display_freq)
-
- var/part_b_extra = ""
- if(data == DATA_ANTAG) // intercepted radio message
- part_b_extra = " (Intercepted)"
- var/part_a = ""
- var/part_b = "[bicon(radio)]\[[freq_text]\][part_b_extra] " // goes in the actual output
-
- // --- Some more pre-message formatting ---
- var/part_c = " " // Tweaked for security headsets -- TLE
- var/part_d = ""
- var/part_e = ""
-
-
- // --- Filter the message; place it in quotes apply a verb ---
- var/quotedmsg = null
- if(M)
- quotedmsg = "[M.say_quote(multilingual_to_message(message_pieces))], \"[multilingual_to_message(message_pieces)]\""
- else
- quotedmsg = "says, \"[multilingual_to_message(message_pieces)]\""
-
- // --- This following recording is intended for research and feedback in the use of department radio channels ---
-
- var/part_blackbox_c = " \[[freq_text]\] " // Tweaked for security headsets -- TLE
- var/blackbox_msg = "[part_a][part_b][name][part_blackbox_c][quotedmsg][part_d][part_e]"
- //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
-
- //BR.messages_admin += blackbox_admin_msg
- if(istype(blackbox))
- switch(display_freq)
- if(PUB_FREQ)
- blackbox.msg_common += blackbox_msg
- if(SCI_FREQ)
- blackbox.msg_science += blackbox_msg
- if(COMM_FREQ)
- blackbox.msg_command += blackbox_msg
- if(MED_FREQ)
- blackbox.msg_medical += blackbox_msg
- if(ENG_FREQ)
- blackbox.msg_engineering += blackbox_msg
- if(SEC_FREQ)
- blackbox.msg_security += blackbox_msg
- if(DTH_FREQ)
- blackbox.msg_deathsquad += blackbox_msg
- if(SYND_FREQ)
- blackbox.msg_syndicate += blackbox_msg
- if(RAID_FREQ)
- blackbox.msg_raider += blackbox_msg
- if(SUP_FREQ)
- blackbox.msg_cargo += blackbox_msg
- if(SRV_FREQ)
- blackbox.msg_service += blackbox_msg
- if(EXP_FREQ)
- blackbox.msg_explorer += blackbox_msg
- else
- blackbox.messages += blackbox_msg
-
- //End of research and feedback code.
-
- /* ###### Send the message ###### */
- /* --- Process all the mobs that heard a masked voice (understood) --- */
- if(length(heard_masked))
- for (var/mob/R in heard_masked)
- R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, name)
-
- /* --- Process all the mobs that heard the voice normally (understood) --- */
- if(length(heard_normal))
- for (var/mob/R in heard_normal)
- R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, realname)
-
- /* --- Process all the mobs that heard the voice normally (did not understand) --- */
- if(length(heard_voice))
- for (var/mob/R in heard_voice)
- R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M,0, vname)
-
- /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
- // Displays garbled message (ie "f*c* **u, **i*er!")
- if(length(heard_garbled))
- for (var/mob/R in heard_garbled)
- R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1, vname)
-
- /* --- Complete gibberish. Usually happens when there's a compressed message --- */
- if(length(heard_gibberish))
- for (var/mob/R in heard_gibberish)
- R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1)
-
- return 1
-
-/proc/Broadcast_SimpleMessage(var/source, var/frequency, list/message_pieces, var/data, var/mob/M, var/compression, var/level, var/list/forced_radios)
- var/text = multilingual_to_message(message_pieces)
- /* ###### Prepare the radio connection ###### */
-
- if(!M)
- var/mob/living/carbon/human/H = new
- M = H
-
- var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
-
- var/display_freq = connection.frequency
-
- var/list/receive = list()
-
- for(var/obj/item/radio/R in forced_radios)
- receive |= R.send_hear(display_freq)
-
- // --- Broadcast only to intercom devices ---
-
- if(data == DATA_INTERCOM)
- for (var/obj/item/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq, level)
-
-
- // --- Broadcast only to intercoms and station-bounced radios ---
-
- else if(data == DATA_LOCAL)
- for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
-
- if(istype(R, /obj/item/radio/headset))
- continue
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq)
-
-
- // --- Broadcast to antag radios! ---
-
- else if(data == DATA_ANTAG)
- for(var/freq in ANTAG_FREQS)
- var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq)
- for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(freq)
-
-
- // --- Broadcast to ALL radio devices ---
-
- else
- for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
- var/turf/position = get_turf(R)
- if(position && position.z == level)
- receive |= R.send_hear(display_freq)
-
-
- /* ###### Organize the receivers into categories for displaying the message ###### */
-
- // Understood the message:
- var/list/heard_normal = list() // normal message
-
- // Did not understand the message:
- var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
- var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
-
- for (var/mob/R in receive)
-
- /* --- Loop through the receivers and categorize them --- */
-
- if(!R.is_preference_enabled(/datum/client_preference/holder/hear_radio)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
- continue
-
-
- // --- Check for compression ---
- if(compression > 0)
-
- heard_gibberish += R
- continue
-
- // --- Can understand the speech ---
-
- if(R.say_understands(M))
-
- heard_normal += R
-
- // --- Can't understand the speech ---
-
- else
- // - Just display a garbled message -
-
- heard_garbled += R
-
-
- /* ###### Begin formatting and sending the message ###### */
- if(length(heard_normal) || length(heard_garbled) || length(heard_gibberish))
-
- /* --- Some miscellaneous variables to format the string output --- */
- var/part_a = "" // goes in the actual output
- var/freq_text = get_frequency_name(display_freq)
-
- // --- Some more pre-message formatting ---
-
- var/part_b_extra = ""
- if(data == DATA_ANTAG) // intercepted radio message
- part_b_extra = " (Intercepted)"
-
- // Create a radio headset for the sole purpose of using its icon
- var/obj/item/radio/headset/radio = new
-
- var/part_b = " [bicon(radio)]\[[freq_text]\][part_b_extra] " // Tweaked for security headsets -- TLE
- var/part_blackbox_b = " \[[freq_text]\] " // Tweaked for security headsets -- TLE
- var/part_c = ""
-
- var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]"
-
- //BR.messages_admin += blackbox_admin_msg
- if(istype(blackbox))
- switch(display_freq)
- if(PUB_FREQ)
- blackbox.msg_common += blackbox_msg
- if(SCI_FREQ)
- blackbox.msg_science += blackbox_msg
- if(COMM_FREQ)
- blackbox.msg_command += blackbox_msg
- if(MED_FREQ)
- blackbox.msg_medical += blackbox_msg
- if(ENG_FREQ)
- blackbox.msg_engineering += blackbox_msg
- if(SEC_FREQ)
- blackbox.msg_security += blackbox_msg
- if(DTH_FREQ)
- blackbox.msg_deathsquad += blackbox_msg
- if(SYND_FREQ)
- blackbox.msg_syndicate += blackbox_msg
- if(RAID_FREQ)
- blackbox.msg_raider += blackbox_msg
- if(SUP_FREQ)
- blackbox.msg_cargo += blackbox_msg
- if(SRV_FREQ)
- blackbox.msg_service += blackbox_msg
- else
- blackbox.messages += blackbox_msg
-
- //End of research and feedback code.
-
- /* ###### Send the message ###### */
-
- /* --- Process all the mobs that heard the voice normally (understood) --- */
-
- if(length(heard_normal))
- var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]"
-
- for (var/mob/R in heard_normal)
- R.show_message(rendered, 2)
-
- /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
- // Displays garbled message (ie "f*c* **u, **i*er!")
-
- if(length(heard_garbled))
- var/quotedmsg = "\"[stars(text)]\""
- var/rendered = "[part_a][source][part_b][quotedmsg][part_c]"
-
- for (var/mob/R in heard_garbled)
- R.show_message(rendered, 2)
-
-
- /* --- Complete gibberish. Usually happens when there's a compressed message --- */
-
- if(length(heard_gibberish))
- var/quotedmsg = "\"[Gibberish(text, compression + 50)]\""
- var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]"
-
- for (var/mob/R in heard_gibberish)
- R.show_message(rendered, 2)
-
-//Use this to test if an obj can communicate with a Telecommunications Network
-
-/atom/proc/test_telecomms()
- var/datum/signal/signal = src.telecomms_process()
- var/pos_z = get_z(src)
- return (pos_z in signal.data["level"] && signal.data["done"])
-
-/atom/proc/telecomms_process(var/do_sleep = 1)
-
- // First, we want to generate a new radio signal
- var/datum/signal/signal = new
- signal.transmission_method = TRANSMISSION_SUBSPACE
- var/pos_z = get_z(src)
-
- // --- Finally, tag the actual signal with the appropriate values ---
- signal.data = list(
- "slow" = 0, // how much to sleep() before broadcasting - simulates net lag
- "message" = "TEST",
- "compression" = rand(45, 50), // If the signal is compressed, compress our message too.
- "traffic" = 0, // dictates the total traffic sum that the signal went through
- "type" = SIGNAL_TEST, // determines what type of radio input it is: test broadcast
- "reject" = 0,
- "done" = 0,
- "level" = pos_z // The level it is being broadcasted at.
- )
- signal.frequency = PUB_FREQ// Common channel
-
- //#### Sending the signal to all subspace receivers ####//
- for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
- R.receive_signal(signal)
-
- if(do_sleep)
- sleep(rand(10,25))
-
- //to_world_log("Level: [signal.data["level"]] - Done: [signal.data["done"]]")
-
- return signal
-
+ if (signal.data["type"] == SIGNAL_SIMPLE)
+ Broadcast_SimpleMessage(
+ signal.data["name"], signal.frequency,
+ signal.data["message"], DATA_NORMAL, null,
+ signal.data["compression"], listening_level, forced_radios
+ )
+ if (signal.data["type"] == SIGNAL_FAKE)
+ Broadcast_Message( // Uses DATA_FAKE to prevent AI from tracking the source
+ signal.data["connection"], signal.data["mob"],
+ signal.data["vmask"], signal.data["vmessage"],
+ signal.data["radio"], signal.data["message"],
+ signal.data["name"], signal.data["job"],
+ signal.data["realname"], signal.data["vname"], DATA_FAKE,
+ signal.data["compression"], signal.data["level"], signal.frequency,
+ signal.data["verb"], forced_radios
+ )
+ if (!message_delay)
+ message_delay = TRUE
+ spawn(10)
+ message_delay = FALSE
+ recentmessages = list()
+ flick("broadcaster_send", src)
+
+
+/obj/machinery/telecomms/broadcaster/OptionsMenu()
+ var/list/data = ..()
+ data["use_broadcast_range"] = TRUE
+ data["range"] = overmap_range
+ data["minRange"] = overmap_range_min
+ data["maxRange"] = overmap_range_max
+ return data
+
+
+/obj/machinery/telecomms/broadcaster/OptionsHandler(action, params)
+ if (..())
+ return TRUE
+ switch (action)
+ if ("range")
+ var/new_range = params["range"]
+ overmap_range = clamp(new_range, overmap_range_min, overmap_range_max)
+ update_idle_power_usage(initial(idle_power_usage)**(overmap_range+1))
diff --git a/code/game/machinery/telecomms/bus.dm b/code/game/machinery/telecomms/bus.dm
new file mode 100644
index 00000000000..68d3a054fa5
--- /dev/null
+++ b/code/game/machinery/telecomms/bus.dm
@@ -0,0 +1,71 @@
+/* Telecomms Bus
+* The bus mainframe idles and waits for hubs to relay them signals. They act
+* as junctions for the network. They transfer uncompressed subspace packets
+* to processor units, and then take the processed packet to a server for
+* logging. Link to a subspace hub if it can't send to a server.
+*/
+
+/obj/machinery/telecomms/bus
+ name = "Bus Mainframe"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "bus"
+ desc = "A mighty piece of hardware used to send massive amounts of data quickly."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 1000
+ machinetype = 2
+ circuit = /obj/item/circuitboard/telecomms/bus
+ netspeed = 40
+ var/change_frequency = 0
+
+
+/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (!is_freq_listening(signal))
+ return
+ if (change_frequency)
+ signal.frequency = change_frequency
+ if (sender != src && !istype(sender, /obj/machinery/telecomms/processor))
+ var/send_success = relay_information(signal, /obj/machinery/telecomms/processor)
+ if (send_success)
+ return
+ signal.data["slow"] += rand(1, 5)
+ receive_information(signal, src)
+ var/list/attempt_types = list(
+ /obj/machinery/telecomms/server,
+ /obj/machinery/telecomms/hub,
+ /obj/machinery/telecomms/broadcaster,
+ /obj/machinery/telecomms/bus
+ )
+ for (var/i = 1 to length(attempt_types))
+ var/send_success = relay_information(signal, attempt_types[i])
+ if (send_success)
+ return
+ signal.data["slow"] += rand(0, 1)
+
+
+/obj/machinery/telecomms/bus/OptionsMenu()
+ var/list/data = ..()
+ data["use_change_freq"] = TRUE
+ data["change_freq"] = change_frequency
+ return data
+
+
+/obj/machinery/telecomms/bus/OptionsHandler(action, params)
+ if (..())
+ return TRUE
+ switch (action)
+ if ("change_freq")
+ . = TRUE
+ var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null | num
+ if (!canAccess(usr))
+ return
+ if (newfreq)
+ if (findtext(num2text(newfreq), "."))
+ newfreq *= 10
+ if (newfreq < 10000)
+ change_frequency = newfreq
+ set_temp("-% New frequency to change to assigned: \"[newfreq] GHz\" %-", "average")
+ else
+ change_frequency = 0
+ set_temp("-% Frequency changing deactivated %-", "average")
diff --git a/code/game/machinery/telecomms/hub.dm b/code/game/machinery/telecomms/hub.dm
new file mode 100644
index 00000000000..b16f4b4ff32
--- /dev/null
+++ b/code/game/machinery/telecomms/hub.dm
@@ -0,0 +1,32 @@
+/* Telecomms Hub
+* The hub idles until it receives information. It then passes on that information
+* depending on where it came from. This is the heart of the Telecommunications
+* Network, sending information where it is needed. It mainly receives information
+* from long-distance Relays and then sends that information to be processed.
+* Afterwards it gets the uncompressed information from Servers/Buses and sends
+* that back to the relay, to then be broadcasted.
+*/
+
+/obj/machinery/telecomms/hub
+ name = "Telecommunication Hub"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "hub"
+ desc = "A mighty piece of hardware used to send/receive massive amounts of data."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 1600
+ machinetype = 7
+ circuit = /obj/item/circuitboard/telecomms/hub
+ long_range_link = TRUE
+ netspeed = 40
+
+
+/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (!is_freq_listening(signal))
+ return
+ if (istype(sender, /obj/machinery/telecomms/receiver))
+ relay_information(signal, /obj/machinery/telecomms/bus, TRUE)
+ return
+ relay_information(signal, /obj/machinery/telecomms/relay, TRUE)
+ relay_information(signal, /obj/machinery/telecomms/broadcaster, TRUE)
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 62569319266..ce44db2bd73 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -1,156 +1,131 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/obj/machinery/computer/telecomms
- icon_keyboard = "tech_key"
-
/obj/machinery/computer/telecomms/server
name = "Telecommunications Server Monitor"
desc = "View communication logs here. Translation not guaranteed."
icon_screen = "comm_logs"
-
- var/list/servers = list() // the servers located by the computer
- var/obj/machinery/telecomms/server/SelectedServer
+ icon_keyboard = "tech_key"
circuit = /obj/item/circuitboard/comm_server
-
- var/network = "NULL" // the network to probe
- var/list/temp = null // temporary feedback messages
-
- var/universal_translate = 0 // set to 1 if it can translate nonhuman speech
-
req_access = list(access_tcomsat)
+ var/list/servers = list() // the servers located by the computer
+ var/obj/machinery/telecomms/server/SelectedServer
+ var/network = "NULL" // the network to probe
+ var/list/temp // temporary feedback messages
+ var/universal_translate = FALSE // set to 1 if it can translate nonhuman speech
+
/obj/machinery/computer/telecomms/server/tgui_data(mob/user)
var/list/data = list()
-
data["universal_translate"] = universal_translate
data["network"] = network
data["temp"] = temp
-
var/list/servers = list()
- for(var/obj/machinery/telecomms/T in src.servers)
- servers.Add(list(list(
- "id" = T.id,
- "name" = T.name,
- )))
+ for(var/obj/machinery/telecomms/machine in servers)
+ servers += list(list(
+ "id" = machine.id,
+ "name" = machine.name,
+ ))
data["servers"] = servers
-
data["selectedServer"] = null
- if(SelectedServer)
+ if (SelectedServer)
data["selectedServer"] = list(
"id" = SelectedServer.id,
"totalTraffic" = SelectedServer.totaltraffic,
)
-
- var/list/logs = list()
var/i = 0
- for(var/c in SelectedServer.log_entries)
- i++
- var/datum/comm_log_entry/C = c
-
- // This is necessary to prevent leaking information to the clientside
+ var/list/logs = list()
+ for (var/datum/comm_log_entry/log as anything in SelectedServer.log_entries)
var/static/list/acceptable_params = list("uspeech", "intelligible", "message", "name", "race", "job", "timecode")
var/list/parameters = list()
- for(var/log_param in acceptable_params)
- parameters["[log_param]"] = C.parameters["[log_param]"]
-
- logs.Add(list(list(
- "name" = C.name,
- "input_type" = C.input_type,
- "id" = i,
+ for (var/log_param in acceptable_params)
+ parameters["[log_param]"] = log.parameters["[log_param]"]
+ logs += list(list(
+ "name" = log.name,
+ "input_type" = log.input_type,
+ "id" = ++i,
"parameters" = parameters,
- )))
-
+ ))
data["selectedServer"]["logs"] = logs
-
return data
+
/obj/machinery/computer/telecomms/server/attack_hand(mob/user)
- if(stat & (BROKEN|NOPOWER))
+ if (stat & (BROKEN|NOPOWER))
return
tgui_interact(user)
+
/obj/machinery/computer/telecomms/server/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "TelecommsLogBrowser", name)
+ if (!ui)
+ ui = new (user, src, "TelecommsLogBrowser", name)
ui.open()
+
/obj/machinery/computer/telecomms/server/tgui_act(action, params)
- if(..())
+ if (..())
return TRUE
-
add_fingerprint(usr)
-
switch(action)
- if("view")
- for(var/obj/machinery/telecomms/T in servers)
- if(T.id == params["id"])
- SelectedServer = T
+ if ("view")
+ for (var/obj/machinery/telecomms/machine in servers)
+ if (machine.id == params["id"])
+ SelectedServer = machine
break
. = TRUE
-
- if("mainmenu")
+ if ("mainmenu")
SelectedServer = null
. = TRUE
-
- if("release")
+ if ("release")
servers = list()
SelectedServer = null
. = TRUE
-
- if("scan")
- if(servers.len > 0)
+ if ("scan")
+ if (length(servers))
set_temp("FAILED: CANNOT PROBE WHEN BUFFER FULL", "bad")
return TRUE
-
- for(var/obj/machinery/telecomms/server/T in range(25, src))
- if(T.network == network)
- servers.Add(T)
-
- if(!servers.len)
- set_temp("FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\]", "bad")
- else
+ for (var/obj/machinery/telecomms/server/server in range(25, src))
+ if (server.network == network)
+ servers += server
+ if (length(servers))
set_temp("[servers.len] SERVERS PROBED & BUFFERED", "good")
+ else
+ set_temp("FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\]", "bad")
. = TRUE
-
- if("delete")
- if(!allowed(usr) && !emagged)
+ if ("delete")
+ if (!allowed(usr) && !emagged)
to_chat(usr, "ACCESS DENIED.")
return
-
- if(SelectedServer)
- var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(params["id"])]
- set_temp("DELETED ENTRY: [D.name]", "bad")
- SelectedServer.log_entries.Remove(D)
- qdel(D)
+ if (SelectedServer)
+ var/datum/comm_log_entry/log = SelectedServer.log_entries[text2num(params["id"])]
+ set_temp("DELETED ENTRY: [log.name]", "bad")
+ SelectedServer.log_entries -= log
+ qdel(log)
else
set_temp("FAILED: NO SELECTED MACHINE", "bad")
. = TRUE
-
- if("network")
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
-
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
+ if ("network")
+ var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null | text
+ if (newnet && (issilicon(usr) || (usr in range(1, src))))
+ if (length(newnet) > 15)
set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad")
return TRUE
network = newnet
servers = list()
set_temp("NEW NETWORK TAG SET IN ADDRESS \[[network]\]", "good")
-
. = TRUE
-
- if("cleartemp")
+ if ("cleartemp")
temp = null
. = TRUE
-/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
- if(!emagged)
- playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- to_chat(user, "You you disable the security protocols")
- src.updateUsrDialog()
- return 1
-/obj/machinery/computer/telecomms/server/proc/set_temp(var/text, var/color = "average")
+/obj/machinery/computer/telecomms/server/emag_act(remaining_charges, mob/user)
+ if (emagged)
+ return
+ playsound(src, 'sound/effects/sparks4.ogg', 75, TRUE)
+ emagged = TRUE
+ to_chat(user, SPAN_NOTICE("You you disable the security protocols"))
+ updateUsrDialog()
+ return 1
+
+
+/obj/machinery/computer/telecomms/server/proc/set_temp(text, color = "average")
temp = list("color" = color, "text" = text)
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
deleted file mode 100644
index 5e8cd17351e..00000000000
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ /dev/null
@@ -1,386 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-/*
-
- All telecommunications interactions:
-
-*/
-
-#define STATION_Z 1
-#define TELECOMM_Z 3
-
-/obj/machinery/telecomms
- var/list/temp = null // output message
-
-/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
-
- // Using a multitool lets you access the receiver's interface
- if(istype(P, /obj/item/multitool))
- attack_hand(user)
-
- // REPAIRING: Use Nanopaste to repair 10-20 integrity points.
- if(istype(P, /obj/item/stack/nanopaste))
- var/obj/item/stack/nanopaste/T = P
- if (integrity < 100) //Damaged, let's repair!
- if (T.use(1))
- integrity = between(0, integrity + rand(10,20), 100)
- to_chat(usr, "You apply the Nanopaste to [src], repairing some of the damage.")
- else
- to_chat(usr, "This machine is already in perfect condition.")
- return
-
-
- if(default_deconstruction_screwdriver(user, P))
- return
- if(default_deconstruction_crowbar(user, P))
- return
-
-/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
- attack_hand(user)
-
-/obj/machinery/telecomms/tgui_data(mob/user)
- var/list/data = list()
-
- data["temp"] = temp
- data["on"] = on
-
- data["id"] = null
- data["network"] = null
- data["autolinkers"] = FALSE
- data["shadowlink"] = FALSE
- data["options"] = list()
- data["linked"] = list()
- data["filter"] = list()
- data["multitool"] = FALSE
- data["multitool_buffer"] = null
-
- if(on || interact_offline)
- data["id"] = id
- data["network"] = network
- data["autolinkers"] = !!LAZYLEN(autolinkers)
- data["shadowlink"] = !!hide
-
- data["options"] = Options_Menu()
-
- var/obj/item/multitool/P = get_multitool(user)
- data["multitool"] = !!P
- data["multitool_buffer"] = null
- if(P && P.buffer)
- P.update_icon()
- data["multitool_buffer"] = list("name" = "[P.buffer]", "id" = "[P.buffer.id]")
-
- var/i = 0
- var/list/linked = list()
- for(var/obj/machinery/telecomms/T in links)
- i++
- linked.Add(list(list(
- "ref" = "\ref[T]",
- "name" = "[T]",
- "id" = T.id,
- "index" = i,
- )))
- data["linked"] = linked
-
- var/list/filter = list()
- if(LAZYLEN(freq_listening))
- for(var/x in freq_listening)
- filter.Add(list(list(
- "name" = "[format_frequency(x)]",
- "freq" = x,
- )))
- data["filter"] = filter
-
- return data
-
-/obj/machinery/telecomms/tgui_status(mob/user)
- if(!issilicon(user))
- if(!istype(user.get_active_hand(), /obj/item/multitool))
- return STATUS_CLOSE
- . = ..()
-
-/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
- tgui_interact(user)
-
-/obj/machinery/telecomms/tgui_interact(mob/user, datum/tgui/ui)
- ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "TelecommsMultitoolMenu", name)
- ui.open()
-
-// Off-Site Relays
-//
-// You are able to send/receive signals from the station's z level (changeable in the STATION_Z #define) if
-// the relay is on the telecomm satellite (changable in the TELECOMM_Z #define)
-
-
-/obj/machinery/telecomms/relay/proc/toggle_level()
-
- var/turf/position = get_turf(src)
-
- // Toggle on/off getting signals from the station or the current Z level
- if(src.listening_level == STATION_Z) // equals the station
- src.listening_level = position.z
- return 1
- else if(position.z == TELECOMM_Z)
- src.listening_level = STATION_Z
- return 1
- return 0
-
-// Returns a multitool from a user depending on their mobtype.
-
-/obj/machinery/proc/get_multitool(mob/user as mob) //No need to have this being a telecomms specific proc.
-
- var/obj/item/multitool/P = null
- // Let's double check
- if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/multitool))
- P = user.get_active_hand()
- else if(isAI(user))
- var/mob/living/silicon/ai/U = user
- P = U.aiMulti
- else if(isrobot(user) && in_range(user, src))
- if(istype(user.get_active_hand(), /obj/item/multitool))
- P = user.get_active_hand()
- return P
-
-// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
-// Example of how to use below.
-
-/obj/machinery/telecomms/proc/Options_Menu()
- return list()
-
-/*
-// Add an option to the processor to switch processing mode. (COMPRESS -> UNCOMPRESS or UNCOMPRESS -> COMPRESS)
-/obj/machinery/telecomms/processor/Options_Menu()
- var/dat = "
Processing Mode: [process_mode ? "UNCOMPRESS" : "COMPRESS"]"
- return dat
-*/
-// The topic for Additional Options. Use this for checking href links for your specific option.
-// Example of how to use below.
-/obj/machinery/telecomms/proc/Options_Act(action, params)
- return
-
-/*
-/obj/machinery/telecomms/processor/Options_Act(action, params)
-
- if(href_list["process"])
- set_temp("-% Processing mode changed. %-", "average")
- src.process_mode = !src.process_mode
-*/
-
-// RELAY
-
-/obj/machinery/telecomms/relay/Options_Menu()
- var/list/data = ..()
- data["use_listening_level"] = TRUE
- data["use_broadcasting"] = TRUE
- data["use_receiving"] = TRUE
- data["listening_level"] = (listening_level == STATION_Z)
- data["broadcasting"] = broadcasting
- data["receiving"] = receiving
- return data
-
-/obj/machinery/telecomms/relay/Options_Act(action, params)
- if(..())
- return TRUE
-
- switch(action)
- if("receive")
- . = TRUE
- receiving = !receiving
- set_temp("-% Receiving mode changed. %-", "average")
- if("broadcast")
- . = TRUE
- broadcasting = !broadcasting
- set_temp("-% Broadcasting mode changed. %-", "average")
- if("change_listening")
- . = TRUE
- //Lock to the station OR lock to the current position!
- //You need at least two receivers and two broadcasters for this to work, this includes the machine.
- var/result = toggle_level()
- if(result)
- set_temp("-% [src]'s signal has been successfully changed.", "average")
- else
- set_temp("-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required.", "average")
-
-// BUS
-
-/obj/machinery/telecomms/bus/Options_Menu()
- var/list/data = ..()
- data["use_change_freq"] = TRUE
- data["change_freq"] = change_frequency
- return data
-
-/obj/machinery/telecomms/bus/Options_Act(action, params)
- if(..())
- return TRUE
-
- switch(action)
- if("change_freq")
- . = TRUE
- var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num
- if(canAccess(usr))
- if(newfreq)
- if(findtext(num2text(newfreq), "."))
- newfreq *= 10 // shift the decimal one place
- if(newfreq < 10000)
- change_frequency = newfreq
- set_temp("-% New frequency to change to assigned: \"[newfreq] GHz\" %-", "average")
- else
- change_frequency = 0
- set_temp("-% Frequency changing deactivated %-", "average")
-
-
-// BROADCASTER
-/obj/machinery/telecomms/broadcaster/Options_Menu()
- var/list/data = ..()
- data["use_broadcast_range"] = TRUE
- data["range"] = overmap_range
- data["minRange"] = overmap_range_min
- data["maxRange"] = overmap_range_max
- return data
-
-/obj/machinery/telecomms/broadcaster
- interact_offline = TRUE // because you can accidentally nuke power grids with these, need to be able to fix mistake
-
-/obj/machinery/telecomms/broadcaster/Options_Act(action, params)
- if(..())
- return TRUE
-
- switch(action)
- if("range")
- var/new_range = params["range"]
- overmap_range = clamp(new_range, overmap_range_min, overmap_range_max)
- update_idle_power_usage(initial(idle_power_usage)**(overmap_range+1))
-
-// RECEIVER
-/obj/machinery/telecomms/receiver/Options_Menu()
- var/list/data = ..()
- data["use_receive_range"] = TRUE
- data["range"] = overmap_range
- data["minRange"] = overmap_range_min
- data["maxRange"] = overmap_range_max
- return data
-
-/obj/machinery/telecomms/receiver
- interact_offline = TRUE // because you can accidentally nuke power grids with these, need to be able to fix mistake
-
-/obj/machinery/telecomms/receiver/Options_Act(action, params)
- if(..())
- return TRUE
-
- switch(action)
- if("range")
- var/new_range = params["range"]
- overmap_range = clamp(new_range, overmap_range_min, overmap_range_max)
- update_idle_power_usage(initial(idle_power_usage)**(overmap_range+1))
-
-/obj/machinery/telecomms/tgui_act(action, params)
- if(..())
- return TRUE
-
- var/obj/item/multitool/P = get_multitool(usr)
-
- switch(action)
- if("toggle")
- src.toggled = !src.toggled
- set_temp("-% [src] has been [src.toggled ? "activated" : "deactivated"].", "average")
- update_power()
- . = TRUE
-
- if("id")
- var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
- if(newid && canAccess(usr))
- id = newid
- set_temp("-% New ID assigned: \"[id]\" %-", "average")
- . = TRUE
-
- if("network")
- var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
- if(newnet && canAccess(usr))
-
- if(length(newnet) > 15)
- set_temp("-% Too many characters in new network tag %-", "average")
-
- else
- for(var/obj/machinery/telecomms/T in links)
- T.links.Remove(src)
-
- network = newnet
- links = list()
- set_temp("-% New network tag assigned: \"[network]\" %-", "average")
- . = TRUE
-
-
- if("freq")
- var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null|num
- if(newfreq && canAccess(usr))
- if(findtext(num2text(newfreq), "."))
- newfreq *= 10 // shift the decimal one place
- if(!(newfreq in freq_listening) && newfreq < 10000)
- freq_listening.Add(newfreq)
- set_temp("-% New frequency filter assigned: \"[newfreq] GHz\" %-", "average")
- . = TRUE
-
- if("delete")
- var/x = text2num(params["delete"])
- set_temp("-% Removed frequency filter [x] %-", "average")
- freq_listening.Remove(x)
- . = TRUE
-
- if("unlink")
- if(text2num(params["unlink"]) <= length(links))
- var/obj/machinery/telecomms/T = links[text2num(params["unlink"])]
- set_temp("-% Removed \ref[T] [T.name] from linked entities. %-", "average")
-
- // Remove link entries from both T and src.
-
- if(src in T.links)
- T.links.Remove(src)
- links.Remove(T)
- . = TRUE
-
- if("link")
- if(P)
- if(P.buffer && P.buffer != src)
- if(!(src in P.buffer.links))
- P.buffer.links.Add(src)
-
- if(!(P.buffer in src.links))
- src.links.Add(P.buffer)
-
- set_temp("-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-", "average")
-
- else
- set_temp("-% Unable to acquire buffer %-", "average")
- . = TRUE
-
- if("buffer")
- P.buffer = src
- set_temp("-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-", "average")
- . = TRUE
-
- if("flush")
- set_temp("-% Buffer successfully flushed. %-", "average")
- P.buffer = null
- . = TRUE
-
- if("cleartemp")
- temp = null
- . = TRUE
-
- if(Options_Act(action, params))
- . = TRUE
-
- add_fingerprint(usr)
-
-/obj/machinery/telecomms/proc/canAccess(var/mob/user)
- if(issilicon(user) || in_range(user, src))
- return 1
- return 0
-
-/obj/machinery/telecomms/proc/set_temp(var/text, var/color = "average")
- temp = list("color" = color, "text" = text)
-
-#undef TELECOMM_Z
-#undef STATION_Z
diff --git a/code/game/machinery/telecomms/misc.dm b/code/game/machinery/telecomms/misc.dm
new file mode 100644
index 00000000000..9a82321a24f
--- /dev/null
+++ b/code/game/machinery/telecomms/misc.dm
@@ -0,0 +1,567 @@
+#define TELECOMMS_RECEPTION_NONE 0
+#define TELECOMMS_RECEPTION_SENDER 1
+#define TELECOMMS_RECEPTION_RECEIVER 2
+#define TELECOMMS_RECEPTION_BOTH 3
+
+/// The list of all telecomms machines
+var/global/list/obj/machinery/telecomms/telecomms_list = list()
+
+/// global list of recent messages broadcasted : used to circumvent massive radio spam
+var/global/list/recentmessages = list()
+
+/// To make sure restarting the recentmessages list is kept in sync
+var/global/message_delay = 0
+
+
+/datum/comm_log_entry
+ var/name = "data packet (#)"
+ var/input_type = "Speech File"
+ var/parameters = list()
+
+
+/datum/reception
+ var/obj/machinery/message_server/message_server
+ var/telecomms_reception = TELECOMMS_RECEPTION_NONE
+ var/message = ""
+
+
+/datum/receptions
+ var/obj/machinery/message_server/message_server
+ var/sender_reception = TELECOMMS_RECEPTION_NONE
+ var/list/receiver_reception = new
+
+
+/atom/proc/telecomms_process(skip_sleep)
+ var/datum/signal/signal = new
+ signal.transmission_method = TRANSMISSION_SUBSPACE
+ var/pos_z = get_z(src)
+ signal.data = list(
+ "slow" = 0, // how much to sleep() before broadcasting - simulates net lag
+ "message" = "TEST",
+ "compression" = rand(45, 50), // If the signal is compressed, compress our message too.
+ "traffic" = 0, // dictates the total traffic sum that the signal went through
+ "type" = SIGNAL_TEST, // determines what type of radio input it is: test broadcast
+ "reject" = 0,
+ "done" = 0,
+ "level" = pos_z // The level it is being broadcasted at.
+ )
+ signal.frequency = PUB_FREQ
+ for(var/obj/machinery/telecomms/receiver/receiver in telecomms_list)
+ receiver.receive_signal(signal)
+ if(!skip_sleep)
+ sleep(rand(10, 25))
+ return signal
+
+
+/proc/register_radio(source, old_frequency, new_frequency, radio_filter)
+ if(old_frequency)
+ radio_controller.remove_object(source, old_frequency)
+ if(new_frequency)
+ return radio_controller.add_object(source, new_frequency, radio_filter)
+
+
+/proc/unregister_radio(source, frequency)
+ if(radio_controller)
+ radio_controller.remove_object(source, frequency)
+
+
+/proc/get_frequency_name(var/display_freq)
+ var/freq_text
+ if (display_freq in ANTAG_FREQS)
+ freq_text = "#unkn"
+ else
+ for (var/channel in radiochannels)
+ if (radiochannels[channel] == display_freq)
+ freq_text = channel
+ break
+ if (!freq_text)
+ freq_text = format_frequency(display_freq)
+ return freq_text
+
+
+/proc/get_message_server()
+ if(message_servers)
+ for (var/obj/machinery/message_server/MS in message_servers)
+ if(MS.active)
+ return MS
+ return null
+
+
+/proc/get_sender_reception(atom/sender, datum/signal/signal)
+ if (signal?.data["done"])
+ return TELECOMMS_RECEPTION_SENDER
+ return TELECOMMS_RECEPTION_NONE
+
+
+/proc/get_receiver_reception(receiver, datum/signal/signal)
+ if (receiver && signal?.data["done"])
+ var/turf/pos = get_turf(receiver)
+ if (pos?.z in signal.data["level"])
+ return TELECOMMS_RECEPTION_RECEIVER
+ return TELECOMMS_RECEPTION_NONE
+
+
+/proc/get_reception(atom/sender, receiver, message = "", skip_sleep)
+ var/datum/reception/reception = new
+ reception.message_server = get_message_server()
+ var/datum/signal/signal = sender.telecomms_process(skip_sleep)
+ reception.telecomms_reception |= get_sender_reception(sender, signal)
+ reception.telecomms_reception |= get_receiver_reception(receiver, signal)
+ reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message
+ return reception
+
+
+/proc/get_receptions(atom/sender, list/atom/receivers, skip_sleep)
+ var/datum/receptions/receptions = new
+ receptions.message_server = get_message_server()
+ var/datum/signal/signal
+ if (sender)
+ signal = sender.telecomms_process(skip_sleep)
+ receptions.sender_reception = get_sender_reception(sender, signal)
+ for (var/atom/receiver in receivers)
+ if (!signal)
+ signal = receiver.telecomms_process()
+ receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal)
+ return receptions
+
+
+/**
+ Here is the big, bad function that broadcasts a message given the appropriate
+ parameters.
+
+ @param connection:
+ The datum generated in radio.dm, stored in signal.data["connection"].
+
+ @param M:
+ Reference to the mob/speaker, stored in signal.data["mob"]
+
+ @param vmask:
+ Boolean value if the mob is "hiding" its identity via voice mask, stored in
+ signal.data["vmask"]
+
+ @param vmessage:
+ If specified, will display this as the message; such as "chimpering"
+ for monkies if the mob is not understood. Stored in signal.data["vmessage"].
+
+ @param radio:
+ Reference to the radio broadcasting the message, stored in signal.data["radio"]
+
+ @param message:
+ The actual string message to display to mobs who understood mob M. Stored in
+ signal.data["message"]
+
+ @param name:
+ The name to display when a mob receives the message. signal.data["name"]
+
+ @param job:
+ The name job to display for the AI when it receives the message. signal.data["job"]
+
+ @param realname:
+ The "real" name associated with the mob. signal.data["realname"]
+
+ @param vname:
+ If specified, will use this name when mob M is not understood. signal.data["vname"]
+
+ @param data:
+ If specified:
+ 1 -- Will only broadcast to intercoms
+ 2 -- Will only broadcast to intercoms and station-bounced radios
+ 3 -- Broadcast to syndicate frequency
+ 4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
+
+ @param compression:
+ If 0, the signal is audible
+ If nonzero, the signal may be partially inaudible or just complete gibberish.
+
+ @param level:
+ The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
+
+ @param freq
+ The frequency of the signal
+*/
+
+/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
+ var/vmask, var/list/vmessage_pieces, var/obj/item/radio/radio,
+ var/list/message_pieces, var/name, var/job, var/realname, var/vname,
+ var/data, var/compression, var/list/level, var/freq, var/verbage = "says",
+ var/list/forced_radios)
+
+ /* ###### Prepare the radio connection ###### */
+
+ var/display_freq = freq
+
+ var/list/obj/item/radio/radios = list()
+
+ for(var/obj/item/radio/R in forced_radios)
+ //Cursory check to ensure they are 'on' and stuff
+ if(R.receive_range(display_freq, list(0)) > -1)
+ radios |= R
+
+ // --- Broadcast only to intercom devices ---
+
+ if(data == DATA_INTERCOM)
+
+ for (var/obj/item/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
+ if(R.receive_range(display_freq, level) > -1)
+ radios |= R
+
+ // --- Broadcast only to intercoms and station-bounced radios ---
+
+ else if(data == DATA_LOCAL)
+
+ for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
+
+ if(istype(R, /obj/item/radio/headset) && !R.adhoc_fallback)
+ continue
+
+ if(R.receive_range(display_freq, level) > -1)
+ radios |= R
+
+ // --- Broadcast to antag radios! ---
+
+ else if(data == DATA_ANTAG)
+ for(var/antag_freq in ANTAG_FREQS)
+ var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(antag_freq)
+ for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
+ if(R.receive_range(antag_freq, level) > -1)
+ radios |= R
+
+ // --- Broadcast to ALL radio devices ---
+
+ else
+
+ for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
+ if(R.receive_range(display_freq, level) > -1)
+ radios |= R
+
+ // Get a list of mobs who can hear from the radios we collected.
+ var/list/receive = get_mobs_in_radio_ranges(radios)
+
+ /* ###### Organize the receivers into categories for displaying the message ###### */
+
+ // Understood the message:
+ var/list/heard_masked = list() // masked name or no real name
+ var/list/heard_normal = list() // normal message
+
+ // Did not understand the message:
+ var/list/heard_voice = list() // voice message (ie "chimpers")
+ var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
+ var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
+
+ for (var/mob/R in receive)
+
+ /* --- Loop through the receivers and categorize them --- */
+ if(!R.is_preference_enabled(/datum/client_preference/holder/hear_radio))
+ continue
+
+ if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
+ continue
+
+ // Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
+ if(data == DATA_ANTAG && istype(R, /mob/observer/dead) && R.is_preference_enabled(/datum/client_preference/ghost_radio))
+ continue
+
+ // --- Check for compression ---
+ if(compression > 0)
+ heard_gibberish += R
+ continue
+
+ // --- Can understand the speech ---
+
+ if(!M || R.say_understands(M))
+
+ // - Not human or wearing a voice mask -
+ if(!M || !ishuman(M) || vmask)
+ heard_masked += R
+
+ // - Human and not wearing voice mask -
+ else
+ heard_normal += R
+
+ // --- Can't understand the speech ---
+
+ else
+ // - The speaker has a prespecified "voice message" to display if not understood -
+ if(vmessage_pieces)
+ heard_voice += R
+
+ // - Just display a garbled message -
+ else
+ heard_garbled += R
+
+
+ /* ###### Begin formatting and sending the message ###### */
+ if(length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled) || length(heard_gibberish))
+
+ /* --- Some miscellaneous variables to format the string output --- */
+ var/freq_text = get_frequency_name(display_freq)
+
+ var/part_b_extra = ""
+ if(data == DATA_ANTAG) // intercepted radio message
+ part_b_extra = " (Intercepted)"
+ var/part_a = ""
+ var/part_b = "[bicon(radio)]\[[freq_text]\][part_b_extra] " // goes in the actual output
+
+ // --- Some more pre-message formatting ---
+ var/part_c = " " // Tweaked for security headsets -- TLE
+ var/part_d = ""
+ var/part_e = ""
+
+
+ // --- Filter the message; place it in quotes apply a verb ---
+ var/quotedmsg = null
+ if(M)
+ quotedmsg = "[M.say_quote(multilingual_to_message(message_pieces))], \"[multilingual_to_message(message_pieces)]\""
+ else
+ quotedmsg = "says, \"[multilingual_to_message(message_pieces)]\""
+
+ // --- This following recording is intended for research and feedback in the use of department radio channels ---
+
+ var/part_blackbox_c = " \[[freq_text]\] " // Tweaked for security headsets -- TLE
+ var/blackbox_msg = "[part_a][part_b][name][part_blackbox_c][quotedmsg][part_d][part_e]"
+ //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
+
+ //BR.messages_admin += blackbox_admin_msg
+ if(istype(blackbox))
+ switch(display_freq)
+ if(PUB_FREQ)
+ blackbox.msg_common += blackbox_msg
+ if(SCI_FREQ)
+ blackbox.msg_science += blackbox_msg
+ if(COMM_FREQ)
+ blackbox.msg_command += blackbox_msg
+ if(MED_FREQ)
+ blackbox.msg_medical += blackbox_msg
+ if(ENG_FREQ)
+ blackbox.msg_engineering += blackbox_msg
+ if(SEC_FREQ)
+ blackbox.msg_security += blackbox_msg
+ if(DTH_FREQ)
+ blackbox.msg_deathsquad += blackbox_msg
+ if(SYND_FREQ)
+ blackbox.msg_syndicate += blackbox_msg
+ if(RAID_FREQ)
+ blackbox.msg_raider += blackbox_msg
+ if(SUP_FREQ)
+ blackbox.msg_cargo += blackbox_msg
+ if(SRV_FREQ)
+ blackbox.msg_service += blackbox_msg
+ if(EXP_FREQ)
+ blackbox.msg_explorer += blackbox_msg
+ else
+ blackbox.messages += blackbox_msg
+
+ //End of research and feedback code.
+
+ /* ###### Send the message ###### */
+ /* --- Process all the mobs that heard a masked voice (understood) --- */
+ if(length(heard_masked))
+ for (var/mob/R in heard_masked)
+ R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, name)
+
+ /* --- Process all the mobs that heard the voice normally (understood) --- */
+ if(length(heard_normal))
+ for (var/mob/R in heard_normal)
+ R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, realname)
+
+ /* --- Process all the mobs that heard the voice normally (did not understand) --- */
+ if(length(heard_voice))
+ for (var/mob/R in heard_voice)
+ R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M,0, vname)
+
+ /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
+ // Displays garbled message (ie "f*c* **u, **i*er!")
+ if(length(heard_garbled))
+ for (var/mob/R in heard_garbled)
+ R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1, vname)
+
+ /* --- Complete gibberish. Usually happens when there's a compressed message --- */
+ if(length(heard_gibberish))
+ for (var/mob/R in heard_gibberish)
+ R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1)
+
+ return 1
+
+
+/proc/Broadcast_SimpleMessage(var/source, var/frequency, list/message_pieces, var/data, var/mob/M, var/compression, var/level, var/list/forced_radios)
+ var/text = multilingual_to_message(message_pieces)
+ /* ###### Prepare the radio connection ###### */
+
+ if(!M)
+ var/mob/living/carbon/human/H = new
+ M = H
+
+ var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
+
+ var/display_freq = connection.frequency
+
+ var/list/receive = list()
+
+ for(var/obj/item/radio/R in forced_radios)
+ receive |= R.send_hear(display_freq)
+
+ // --- Broadcast only to intercom devices ---
+
+ if(data == DATA_INTERCOM)
+ for (var/obj/item/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq, level)
+
+
+ // --- Broadcast only to intercoms and station-bounced radios ---
+
+ else if(data == DATA_LOCAL)
+ for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
+
+ if(istype(R, /obj/item/radio/headset))
+ continue
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq)
+
+
+ // --- Broadcast to antag radios! ---
+
+ else if(data == DATA_ANTAG)
+ for(var/freq in ANTAG_FREQS)
+ var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq)
+ for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(freq)
+
+
+ // --- Broadcast to ALL radio devices ---
+
+ else
+ for (var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"])
+ var/turf/position = get_turf(R)
+ if(position && position.z == level)
+ receive |= R.send_hear(display_freq)
+
+
+ /* ###### Organize the receivers into categories for displaying the message ###### */
+
+ // Understood the message:
+ var/list/heard_normal = list() // normal message
+
+ // Did not understand the message:
+ var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
+ var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
+
+ for (var/mob/R in receive)
+
+ /* --- Loop through the receivers and categorize them --- */
+
+ if(!R.is_preference_enabled(/datum/client_preference/holder/hear_radio)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
+ continue
+
+
+ // --- Check for compression ---
+ if(compression > 0)
+
+ heard_gibberish += R
+ continue
+
+ // --- Can understand the speech ---
+
+ if(R.say_understands(M))
+
+ heard_normal += R
+
+ // --- Can't understand the speech ---
+
+ else
+ // - Just display a garbled message -
+
+ heard_garbled += R
+
+
+ /* ###### Begin formatting and sending the message ###### */
+ if(length(heard_normal) || length(heard_garbled) || length(heard_gibberish))
+
+ /* --- Some miscellaneous variables to format the string output --- */
+ var/part_a = "" // goes in the actual output
+ var/freq_text = get_frequency_name(display_freq)
+
+ // --- Some more pre-message formatting ---
+
+ var/part_b_extra = ""
+ if(data == DATA_ANTAG) // intercepted radio message
+ part_b_extra = " (Intercepted)"
+
+ // Create a radio headset for the sole purpose of using its icon
+ var/obj/item/radio/headset/radio = new
+
+ var/part_b = " [bicon(radio)]\[[freq_text]\][part_b_extra] " // Tweaked for security headsets -- TLE
+ var/part_blackbox_b = " \[[freq_text]\] " // Tweaked for security headsets -- TLE
+ var/part_c = ""
+
+ var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]"
+
+ //BR.messages_admin += blackbox_admin_msg
+ if(istype(blackbox))
+ switch(display_freq)
+ if(PUB_FREQ)
+ blackbox.msg_common += blackbox_msg
+ if(SCI_FREQ)
+ blackbox.msg_science += blackbox_msg
+ if(COMM_FREQ)
+ blackbox.msg_command += blackbox_msg
+ if(MED_FREQ)
+ blackbox.msg_medical += blackbox_msg
+ if(ENG_FREQ)
+ blackbox.msg_engineering += blackbox_msg
+ if(SEC_FREQ)
+ blackbox.msg_security += blackbox_msg
+ if(DTH_FREQ)
+ blackbox.msg_deathsquad += blackbox_msg
+ if(SYND_FREQ)
+ blackbox.msg_syndicate += blackbox_msg
+ if(RAID_FREQ)
+ blackbox.msg_raider += blackbox_msg
+ if(SUP_FREQ)
+ blackbox.msg_cargo += blackbox_msg
+ if(SRV_FREQ)
+ blackbox.msg_service += blackbox_msg
+ else
+ blackbox.messages += blackbox_msg
+
+ //End of research and feedback code.
+
+ /* ###### Send the message ###### */
+
+ /* --- Process all the mobs that heard the voice normally (understood) --- */
+
+ if(length(heard_normal))
+ var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]"
+
+ for (var/mob/R in heard_normal)
+ R.show_message(rendered, 2)
+
+ /* --- Process all the mobs that heard a garbled voice (did not understand) --- */
+ // Displays garbled message (ie "f*c* **u, **i*er!")
+
+ if(length(heard_garbled))
+ var/quotedmsg = "\"[stars(text)]\""
+ var/rendered = "[part_a][source][part_b][quotedmsg][part_c]"
+
+ for (var/mob/R in heard_garbled)
+ R.show_message(rendered, 2)
+
+
+ /* --- Complete gibberish. Usually happens when there's a compressed message --- */
+
+ if(length(heard_gibberish))
+ var/quotedmsg = "\"[Gibberish(text, compression + 50)]\""
+ var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]"
+
+ for (var/mob/R in heard_gibberish)
+ R.show_message(rendered, 2)
+
+
+#undef TELECOMMS_RECEPTION_NONE
+#undef TELECOMMS_RECEPTION_SENDER
+#undef TELECOMMS_RECEPTION_RECEIVER
+#undef TELECOMMS_RECEPTION_BOTH
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
index a839fa0fb49..afc0bbaa306 100644
--- a/code/game/machinery/telecomms/presets.dm
+++ b/code/game/machinery/telecomms/presets.dm
@@ -1,40 +1,37 @@
-// ### Preset machines ###
-
-//Relay
-
/obj/machinery/telecomms/relay/preset
network = "tcommsat"
+
/obj/machinery/telecomms/relay/preset/station
id = "Station Relay"
listening_level = 1
autolinkers = list("s_relay")
+
/obj/machinery/telecomms/relay/preset/telecomms
id = "Telecomms Relay"
autolinkers = list("relay")
+
/obj/machinery/telecomms/relay/preset/mining
id = "Mining Relay"
autolinkers = list("m_relay")
+
/obj/machinery/telecomms/relay/preset/ruskie
id = "Ruskie Relay"
- hide = 1
- toggled = 0
+ hide = TRUE
+ toggled = FALSE
autolinkers = list("r_relay")
+
/obj/machinery/telecomms/relay/preset/centcom
id = "CentCom Relay"
- hide = 1
- toggled = 1
- //anchored = 1
- //use_power = 0
- //idle_power_usage = 0
- produces_heat = 0
+ hide = TRUE
+ toggled = TRUE
+ produces_heat = FALSE
autolinkers = list("c_relay")
-//HUB
/obj/machinery/telecomms/hub/preset
id = "Hub"
@@ -43,14 +40,14 @@
"supply", "service", "common", "command", "engineering", "security", "unused",
"receiverA", "broadcasterA")
+
/obj/machinery/telecomms/hub/preset_cent
id = "CentCom Hub"
network = "tcommsat"
- produces_heat = 0
+ produces_heat = FALSE
autolinkers = list("hub_cent", "c_relay", "s_relay", "m_relay", "r_relay",
"centcom", "receiverCent", "broadcasterCent")
-//Receivers
/obj/machinery/telecomms/receiver/preset_right
id = "Receiver A"
@@ -58,40 +55,42 @@
autolinkers = list("receiverA") // link to relay
freq_listening = list(AI_FREQ, SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ, ENT_FREQ)
- //Common and other radio frequencies for people to freely use
+
/obj/machinery/telecomms/receiver/preset_right/Initialize()
- for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
+ for(var/i = PUBLIC_LOW_FREQ to PUBLIC_HIGH_FREQ step 2)
freq_listening |= i
- . = ..()
+ return ..()
+
/obj/machinery/telecomms/receiver/preset_cent
id = "CentCom Receiver"
network = "tcommsat"
- produces_heat = 0
+ produces_heat = FALSE
autolinkers = list("receiverCent")
freq_listening = list(ERT_FREQ, DTH_FREQ, SYND_FREQ)
-//Buses
-
/obj/machinery/telecomms/bus/preset_one
id = "Bus 1"
network = "tcommsat"
freq_listening = list(SCI_FREQ, MED_FREQ)
autolinkers = list("processor1", "science", "medical")
+
/obj/machinery/telecomms/bus/preset_two
id = "Bus 2"
network = "tcommsat"
freq_listening = list(SUP_FREQ, SRV_FREQ)
autolinkers = list("processor2", "supply", "service", "unused")
+
/obj/machinery/telecomms/bus/preset_two/Initialize()
- for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
- if(i == PUB_FREQ)
+ for(var/i = PUBLIC_LOW_FREQ to PUBLIC_HIGH_FREQ step 2)
+ if (i == PUB_FREQ)
continue
freq_listening |= i
- . = ..()
+ return ..()
+
/obj/machinery/telecomms/bus/preset_three
id = "Bus 3"
@@ -99,124 +98,134 @@
freq_listening = list(SEC_FREQ, COMM_FREQ)
autolinkers = list("processor3", "security", "command")
+
/obj/machinery/telecomms/bus/preset_four
id = "Bus 4"
network = "tcommsat"
freq_listening = list(ENG_FREQ, AI_FREQ, PUB_FREQ, ENT_FREQ)
autolinkers = list("processor4", "engineering", "common")
+
/obj/machinery/telecomms/bus/preset_cent
id = "CentCom Bus"
network = "tcommsat"
freq_listening = list(ERT_FREQ, DTH_FREQ, SYND_FREQ)
- produces_heat = 0
+ produces_heat = FALSE
autolinkers = list("processorCent", "centcom")
-//Processors
/obj/machinery/telecomms/processor/preset_one
id = "Processor 1"
network = "tcommsat"
- autolinkers = list("processor1") // processors are sort of isolated; they don't need backward links
+ autolinkers = list("processor1")
+
/obj/machinery/telecomms/processor/preset_two
id = "Processor 2"
network = "tcommsat"
autolinkers = list("processor2")
+
/obj/machinery/telecomms/processor/preset_three
id = "Processor 3"
network = "tcommsat"
autolinkers = list("processor3")
+
/obj/machinery/telecomms/processor/preset_four
id = "Processor 4"
network = "tcommsat"
autolinkers = list("processor4")
+
/obj/machinery/telecomms/processor/preset_cent
id = "CentCom Processor"
network = "tcommsat"
- produces_heat = 0
+ produces_heat = FALSE
autolinkers = list("processorCent")
-//Servers
/obj/machinery/telecomms/server/presets
-
network = "tcommsat"
+
/obj/machinery/telecomms/server/presets/science
id = "Science Server"
freq_listening = list(SCI_FREQ)
autolinkers = list("science")
+
/obj/machinery/telecomms/server/presets/medical
id = "Medical Server"
freq_listening = list(MED_FREQ)
autolinkers = list("medical")
+
/obj/machinery/telecomms/server/presets/supply
id = "Supply Server"
freq_listening = list(SUP_FREQ)
autolinkers = list("supply")
+
/obj/machinery/telecomms/server/presets/service
id = "Service Server"
freq_listening = list(SRV_FREQ)
autolinkers = list("service")
+
/obj/machinery/telecomms/server/presets/common
id = "Common Server"
- freq_listening = list(PUB_FREQ, AI_FREQ, ENT_FREQ) // AI Private and Common
+ freq_listening = list(PUB_FREQ, AI_FREQ, ENT_FREQ)
autolinkers = list("common")
-// "Unused" channels, AKA all others.
+
/obj/machinery/telecomms/server/presets/unused
id = "Unused Server"
freq_listening = list()
autolinkers = list("unused")
+
/obj/machinery/telecomms/server/presets/unused/Initialize()
- for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
- if(i == AI_FREQ || i == PUB_FREQ)
+ for(var/i = PUBLIC_LOW_FREQ to PUBLIC_HIGH_FREQ step 2)
+ if (i == AI_FREQ || i == PUB_FREQ)
continue
freq_listening |= i
- . = ..()
+ return ..()
+
/obj/machinery/telecomms/server/presets/command
id = "Command Server"
freq_listening = list(COMM_FREQ)
autolinkers = list("command")
+
/obj/machinery/telecomms/server/presets/engineering
id = "Engineering Server"
freq_listening = list(ENG_FREQ)
autolinkers = list("engineering")
+
/obj/machinery/telecomms/server/presets/security
id = "Security Server"
freq_listening = list(SEC_FREQ)
autolinkers = list("security")
+
/obj/machinery/telecomms/server/presets/centcomm
id = "CentCom Server"
freq_listening = list(ERT_FREQ, DTH_FREQ, SYND_FREQ)
- produces_heat = 0
+ produces_heat = FALSE
autolinkers = list("centcom")
-//Broadcasters
-
-//--PRESET LEFT--//
-
/obj/machinery/telecomms/broadcaster/preset_right
id = "Broadcaster A"
network = "tcommsat"
autolinkers = list("broadcasterA")
+
/obj/machinery/telecomms/broadcaster/preset_cent
id = "CentCom Broadcaster"
network = "tcommsat"
- produces_heat = 0
- autolinkers = list("broadcasterCent")
\ No newline at end of file
+ produces_heat = FALSE
+ autolinkers = list("broadcasterCent")
diff --git a/code/game/machinery/telecomms/processor.dm b/code/game/machinery/telecomms/processor.dm
new file mode 100644
index 00000000000..6f72e4286fa
--- /dev/null
+++ b/code/game/machinery/telecomms/processor.dm
@@ -0,0 +1,27 @@
+/obj/machinery/telecomms/processor
+ name = "Processor Unit"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "processor"
+ desc = "This machine is used to process large quantities of information."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 600
+ machinetype = 3
+ delay = 5
+ circuit = /obj/item/circuitboard/telecomms/processor
+ var/uncompress = TRUE // When FALSE, compress signals instead
+
+
+/obj/machinery/telecomms/processor/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (!is_freq_listening(signal))
+ return
+ if (uncompress)
+ signal.data["compression"] = 0
+ else
+ signal.data["compression"] = 100
+ if (istype(sender, /obj/machinery/telecomms/bus))
+ relay_direct_information(signal, sender)
+ else
+ signal.data["slow"] += rand(5, 10)
+ relay_information(signal, /obj/machinery/telecomms/server)
diff --git a/code/game/machinery/telecomms/receiver.dm b/code/game/machinery/telecomms/receiver.dm
new file mode 100644
index 00000000000..7ea3fee97f5
--- /dev/null
+++ b/code/game/machinery/telecomms/receiver.dm
@@ -0,0 +1,89 @@
+/* Telecomms Receiver
+* The receiver idles and receives messages from subspace-compatible radio equipment;
+* primarily headsets. They then just relay this information to all linked devices,
+* which can would probably be network hubs. Link to Processor Units in case receiver
+* can't send to bus units.
+*/
+
+/obj/machinery/telecomms/receiver
+ name = "Subspace Receiver"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "broadcast receiver"
+ desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 600
+ machinetype = 1
+ produces_heat = 0
+ circuit = /obj/item/circuitboard/telecomms/receiver
+ interact_offline = TRUE
+ var/list/linked_radios_weakrefs = list()
+ var/overmap_range = 0
+ var/overmap_range_min = 0
+ var/overmap_range_max = 5
+
+
+/obj/machinery/telecomms/receiver/proc/link_radio(obj/item/radio/radio)
+ if (!istype(radio))
+ return
+ linked_radios_weakrefs |= weakref(radio)
+
+
+/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
+ if (!on)
+ return
+ if (!signal)
+ return
+ if (!check_receive_level(signal))
+ return
+ if (signal.transmission_method != TRANSMISSION_SUBSPACE)
+ return
+ if (!is_freq_listening(signal))
+ return
+ signal.data["level"] = list()
+ var/send_succeeded = relay_information(signal, /obj/machinery/telecomms/hub)
+ if (send_succeeded)
+ return
+ relay_information(signal, /obj/machinery/telecomms/bus)
+
+
+/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
+ if (signal.transmission_method == TRANSMISSION_BLUESPACE)
+ var/obj/item/radio/radio = signal.data["radio"]
+ if (!(weakref(radio) in linked_radios_weakrefs))
+ signal.data["reject"] = TRUE
+ return FALSE
+ signal.data["level"] = z
+ signal.transmission_method = TRANSMISSION_SUBSPACE
+ return TRUE
+ var/list/listening_levels = using_map.get_map_levels(listening_level, TRUE, overmap_range)
+ if (signal.data["level"] in listening_levels)
+ return TRUE
+ for (var/obj/machinery/telecomms/hub/hub in links)
+ var/list/relayed_levels = list()
+ for (var/obj/machinery/telecomms/relay/relay in hub.links)
+ if (relay.can_receive(signal))
+ relayed_levels |= relay.listening_level
+ if (signal.data["level"] in relayed_levels)
+ return TRUE
+ return FALSE
+
+
+/obj/machinery/telecomms/receiver/OptionsMenu()
+ var/list/data = ..()
+ data["use_receive_range"] = TRUE
+ data["range"] = overmap_range
+ data["minRange"] = overmap_range_min
+ data["maxRange"] = overmap_range_max
+ return data
+
+
+/obj/machinery/telecomms/receiver/OptionsHandler(action, params)
+ if (..())
+ return TRUE
+ switch (action)
+ if ("range")
+ var/new_range = params["range"]
+ overmap_range = clamp(new_range, overmap_range_min, overmap_range_max)
+ update_idle_power_usage(initial(idle_power_usage) ** (overmap_range + 1))
diff --git a/code/game/machinery/telecomms/relay.dm b/code/game/machinery/telecomms/relay.dm
new file mode 100644
index 00000000000..b20abd9ded1
--- /dev/null
+++ b/code/game/machinery/telecomms/relay.dm
@@ -0,0 +1,79 @@
+/* Telecomms Relay
+* The relay idles until it receives information. It then passes on that information
+* depending on where it came from. The relay is needed in order to send information
+* pass Z levels. It must be linked with a HUB, the only other machine that can
+* send/receive pass Z levels.
+*/
+
+/obj/machinery/telecomms/relay
+ name = "Telecommunication Relay"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "relay"
+ desc = "A mighty piece of hardware used to send massive amounts of data far away."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 600
+ machinetype = 8
+ produces_heat = TRUE
+ circuit = /obj/item/circuitboard/telecomms/relay
+ netspeed = 5
+ long_range_link = TRUE
+ var/broadcasting = TRUE
+ var/receiving = TRUE
+
+
+/obj/machinery/telecomms/relay/forceMove(newloc)
+ . = ..(newloc)
+ listening_level = z
+
+
+/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (can_send(signal))
+ signal.data["level"] |= using_map.get_map_levels(listening_level)
+
+
+/obj/machinery/telecomms/relay/OptionsMenu()
+ var/list/data = ..()
+ data["use_broadcasting"] = TRUE
+ data["use_receiving"] = TRUE
+ data["broadcasting"] = broadcasting
+ data["receiving"] = receiving
+ return data
+
+
+/obj/machinery/telecomms/relay/OptionsHandler(action, params)
+ if (..())
+ return TRUE
+ switch (action)
+ if ("receive")
+ . = TRUE
+ receiving = !receiving
+ set_temp("-% Receiving mode changed. %-", "average")
+ if ("broadcast")
+ . = TRUE
+ broadcasting = !broadcasting
+ set_temp("-% Broadcasting mode changed. %-", "average")
+
+
+
+/obj/machinery/telecomms/relay/proc/can(datum/signal/signal)
+ if (!on)
+ return FALSE
+ if (!listening_level)
+ return FALSE
+ if (!is_freq_listening(signal))
+ return FALSE
+ return TRUE
+
+
+/obj/machinery/telecomms/relay/proc/can_send(datum/signal/signal)
+ if (!can(signal))
+ return FALSE
+ return broadcasting
+
+
+/obj/machinery/telecomms/relay/proc/can_receive(datum/signal/signal)
+ if (!can(signal))
+ return FALSE
+ return receiving
diff --git a/code/game/machinery/telecomms/server.dm b/code/game/machinery/telecomms/server.dm
new file mode 100644
index 00000000000..a3564c45bb3
--- /dev/null
+++ b/code/game/machinery/telecomms/server.dm
@@ -0,0 +1,109 @@
+/obj/machinery/telecomms/server
+ name = "Telecommunication Server"
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "comm_server"
+ desc = "A machine used to store data and network statistics."
+ density = TRUE
+ anchored = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 300
+ machinetype = 4
+ circuit = /obj/item/circuitboard/telecomms/server
+ var/list/stored_names = list()
+ var/list/TrafficActions = list()
+ var/list/log_entries = list()
+ var/logs = 0 // number of logs
+ var/max_logs = 400 // maximum number of logs
+ var/log_cull_count = 10 // number of logs to cull at a time
+ var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes)
+ var/encryption = "null" // encryption key: ie "password"
+ var/salt = "null" // encryption salt: ie "123comsat"
+ var/obj/item/radio/headset/server_radio
+
+
+/obj/machinery/telecomms/server/Destroy()
+ QDEL_NULL_LIST(log_entries)
+ QDEL_NULL(server_radio)
+ return ..()
+
+
+/obj/machinery/telecomms/server/Initialize()
+ server_radio = new
+ return ..()
+
+
+/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ if (!signal.data["message"])
+ return
+ if (is_freq_listening(signal))
+ if (traffic > 0)
+ totaltraffic += traffic
+ if (signal.data["type"] != SIGNAL_TEST)
+ update_logs()
+ var/datum/comm_log_entry/log = new
+ var/mob/M = signal.data["mob"]
+ log.parameters["mobtype"] = signal.data["mobtype"]
+ log.parameters["job"] = signal.data["job"]
+ log.parameters["key"] = signal.data["key"]
+ log.parameters["vmessage"] = multilingual_to_message(signal.data["message"])
+ log.parameters["vname"] = signal.data["vname"]
+ log.parameters["message"] = multilingual_to_message(signal.data["message"])
+ log.parameters["name"] = signal.data["name"]
+ log.parameters["realname"] = signal.data["realname"]
+ log.parameters["timecode"] = worldtime2stationtime(world.time)
+ var/race = "unknown"
+ if (ishuman(M))
+ var/mob/living/carbon/human/H = M
+ race = "[H.species.name]"
+ log.parameters["intelligible"] = TRUE
+ else if (isbrain(M))
+ race = "Brain"
+ log.parameters["intelligible"] = TRUE
+ else if (M.isMonkey())
+ race = "Monkey"
+ else if (issilicon(M))
+ race = "Artificial Life"
+ log.parameters["intelligible"] = TRUE
+ else if (isslime(M))
+ race = "Slime"
+ else if (isanimal(M))
+ race = "Domestic Animal"
+ log.parameters["race"] = race
+ if (M && !istype(M, /mob/new_player))
+ log.parameters["uspeech"] = M.universal_speak
+ else
+ log.parameters["uspeech"] = FALSE
+ if (signal.data["compression"] > 0) // If the signal is still compressed, make the log entry gibberish
+ log.parameters["message"] = Gibberish(multilingual_to_message(signal.data["message"]), signal.data["compression"] + 50)
+ log.parameters["job"] = Gibberish(signal.data["job"], signal.data["compression"] + 50)
+ log.parameters["name"] = Gibberish(signal.data["name"], signal.data["compression"] + 50)
+ log.parameters["realname"] = Gibberish(signal.data["realname"], signal.data["compression"] + 50)
+ log.parameters["vname"] = Gibberish(signal.data["vname"], signal.data["compression"] + 50)
+ log.input_type = "Corrupt File"
+ log_entries += log
+ if (!(signal.data["name"] in stored_names))
+ stored_names += signal.data["name"]
+ logs++
+ signal.data["server"] = src
+ var/identifier = num2text(rand(-1000, 1000) + world.time)
+ log.name = "data packet ([sha1(identifier)])"
+ var/send_success = relay_information(signal, /obj/machinery/telecomms/hub)
+ if (!send_success)
+ relay_information(signal, /obj/machinery/telecomms/broadcaster)
+
+
+/obj/machinery/telecomms/server/proc/add_entry(content, input)
+ var/datum/comm_log_entry/log = new
+ var/identifier = num2text(rand(-1000, 1000) + world.time)
+ log.name = "[input] ([sha1(identifier)])"
+ log.input_type = input
+ log.parameters["message"] = content
+ log.parameters["timecode"] = stationtime2text()
+ log_entries += log
+ update_logs()
+
+
+/obj/machinery/telecomms/server/proc/update_logs()
+ if (logs >= max_logs)
+ log_entries.Cut(0, log_cull_count)
+ logs -= log_cull_count
diff --git a/code/game/machinery/telecomms/telecomms.dm b/code/game/machinery/telecomms/telecomms.dm
new file mode 100644
index 00000000000..78d42a3df4e
--- /dev/null
+++ b/code/game/machinery/telecomms/telecomms.dm
@@ -0,0 +1,380 @@
+/obj/machinery/telecomms
+ icon = 'icons/obj/stationobjs.dmi'
+ var/list/links = list() // list of machines this machine is linked to
+ var/traffic = 0 // value increases as traffic increases
+ var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
+ var/list/autolinkers = list() // list of text/number values to link with
+ var/id = "NULL" // identification string
+ var/network = "NULL" // the network of the machinery
+ var/list/freq_listening = list() // list of frequencies to tune into: if none, will listen to all
+ var/machinetype = 0 // just a hacky way of preventing alike machines from pairing
+ var/toggled = TRUE // Is it toggled on
+ var/on = TRUE
+ var/integrity = 100 // basically HP, loses integrity by heat
+ var/produces_heat = TRUE //whether the machine will produce heat when on.
+ var/delay = 10 // how many process() ticks to delay per heat
+ var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub)
+ var/hide = FALSE // Is it a hidden machine?
+ var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
+ var/list/temp // output message for interactions
+
+
+/obj/machinery/telecomms/Destroy()
+ telecomms_list -= src
+ for(var/obj/machinery/telecomms/comm in telecomms_list)
+ comm.links -= src
+ links = list()
+ return ..()
+
+
+/obj/machinery/telecomms/Initialize()
+ telecomms_list += src
+ ..()
+ default_apply_parts()
+ return INITIALIZE_HINT_LATELOAD
+
+
+/obj/machinery/telecomms/LateInitialize()
+ if (!listening_level)
+ var/turf/position = get_turf(src)
+ listening_level = position.z
+ if (!length(autolinkers))
+ return
+ var/list/linkables = telecomms_list
+ if (!long_range_link)
+ linkables = orange(20, src)
+ for (var/obj/machinery/telecomms/machine in linkables)
+ add_link(machine)
+
+
+/obj/machinery/telecomms/attackby(obj/item/P, mob/user)
+ if (istype(P, /obj/item/multitool))
+ attack_hand(user)
+ if (istype(P, /obj/item/stack/nanopaste))
+ var/obj/item/stack/nanopaste/T = P
+ if (integrity < 100)
+ if (T.use(1))
+ integrity = between(0, integrity + rand(10, 20), 100)
+ to_chat(usr, "You apply the Nanopaste to [src], repairing some of the damage.")
+ else
+ to_chat(usr, "This machine is already in perfect condition.")
+ return
+ if (default_deconstruction_screwdriver(user, P))
+ return
+ if (default_deconstruction_crowbar(user, P))
+ return
+
+
+/obj/machinery/telecomms/attack_ai(mob/user)
+ attack_hand(user)
+
+
+/obj/machinery/telecomms/attack_hand(mob/user)
+ tgui_interact(user)
+
+
+/obj/machinery/telecomms/emp_act(severity)
+ if (prob(100 / severity))
+ if (!(stat & EMPED))
+ stat |= EMPED
+ var/duration = (300 * 10) / severity
+ spawn(rand(duration - 20, duration + 20))
+ stat &= ~EMPED
+ ..()
+
+
+/obj/machinery/telecomms/process()
+ update_power()
+ checkheat()
+ update_icon()
+ if (traffic > 0)
+ traffic -= netspeed
+
+
+/obj/machinery/telecomms/tgui_act(action, params)
+ if (..())
+ return TRUE
+ var/obj/item/multitool/P = get_multitool(usr)
+ switch (action)
+ if ("toggle")
+ toggled = !toggled
+ set_temp("-% [src] has been [toggled ? "activated" : "deactivated"].", "average")
+ update_power()
+ . = TRUE
+ if ("id")
+ var/response = input(usr, "Specify the new ID for this machine", src, id) as null | text
+ var/newid = copytext(reject_bad_text(response), 1, MAX_MESSAGE_LEN)
+ if(newid && canAccess(usr))
+ id = newid
+ set_temp("-% New ID assigned: \"[id]\" %-", "average")
+ . = TRUE
+ if ("network")
+ var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null | text
+ if (newnet && canAccess(usr))
+ if (length(newnet) > 15)
+ set_temp("-% Too many characters in new network tag %-", "average")
+ else
+ for (var/obj/machinery/telecomms/T in links)
+ T.links -= src
+ network = newnet
+ links = list()
+ set_temp("-% New network tag assigned: \"[network]\" %-", "average")
+ . = TRUE
+ if ("freq")
+ var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null | num
+ if (newfreq && canAccess(usr))
+ if (findtext(num2text(newfreq), "."))
+ newfreq *= 10 // shift the decimal one place
+ if (!(newfreq in freq_listening) && newfreq < 10000)
+ freq_listening += newfreq
+ set_temp("-% New frequency filter assigned: \"[newfreq] GHz\" %-", "average")
+ . = TRUE
+ if ("delete")
+ var/x = text2num(params["delete"])
+ set_temp("-% Removed frequency filter [x] %-", "average")
+ freq_listening-= x
+ . = TRUE
+ if ("unlink")
+ if (text2num(params["unlink"]) <= length(links))
+ var/obj/machinery/telecomms/T = links[text2num(params["unlink"])]
+ set_temp("-% Removed \ref[T] [T.name] from linked entities. %-", "average")
+ if (src in T.links)
+ T.links -= src
+ links -= T
+ . = TRUE
+ if ("link")
+ if (P)
+ if (P.buffer && P.buffer != src)
+ if (!(src in P.buffer.links))
+ P.buffer.links += src
+ if (!(P.buffer in links))
+ links += P.buffer
+ set_temp("-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-", "average")
+ else
+ set_temp("-% Unable to acquire buffer %-", "average")
+ . = TRUE
+ if ("buffer")
+ P.buffer = src
+ set_temp("-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-", "average")
+ . = TRUE
+ if ("flush")
+ set_temp("-% Buffer successfully flushed. %-", "average")
+ P.buffer = null
+ . = TRUE
+ if ("cleartemp")
+ temp = null
+ . = TRUE
+ if (OptionsHandler(action, params))
+ . = TRUE
+ add_fingerprint(usr)
+
+
+/obj/machinery/telecomms/tgui_data(mob/user)
+ var/list/data = list()
+ data["temp"] = temp
+ data["on"] = on
+ data["id"] = null
+ data["network"] = null
+ data["autolinkers"] = FALSE
+ data["shadowlink"] = FALSE
+ data["options"] = list()
+ data["linked"] = list()
+ data["filter"] = list()
+ data["multitool"] = FALSE
+ data["multitool_buffer"] = null
+ if (on || interact_offline)
+ data["id"] = id
+ data["network"] = network
+ data["autolinkers"] = !!LAZYLEN(autolinkers)
+ data["shadowlink"] = !!hide
+ data["options"] = OptionsMenu()
+ var/obj/item/multitool/P = get_multitool(user)
+ data["multitool"] = !!P
+ data["multitool_buffer"] = null
+ if (P && P.buffer)
+ P.update_icon()
+ data["multitool_buffer"] = list("name" = "[P.buffer]", "id" = "[P.buffer.id]")
+ var/i = 0
+ var/list/linked = list()
+ for (var/obj/machinery/telecomms/T in links)
+ i++
+ linked += list(list(
+ "ref" = "\ref[T]",
+ "name" = "[T]",
+ "id" = T.id,
+ "index" = i,
+ ))
+ data["linked"] = linked
+ var/list/filter = list()
+ if (length(freq_listening))
+ for (var/x in freq_listening)
+ filter += list(list(
+ "name" = "[format_frequency(x)]",
+ "freq" = x,
+ ))
+ data["filter"] = filter
+ return data
+
+
+/obj/machinery/telecomms/tgui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if (!ui)
+ ui = new(user, src, "TelecommsMultitoolMenu", name)
+ ui.open()
+
+
+/obj/machinery/telecomms/tgui_status(mob/user)
+ if (!issilicon(user))
+ if (!istype(user.get_active_hand(), /obj/item/multitool))
+ return STATUS_CLOSE
+ return ..()
+
+
+/obj/machinery/telecomms/update_icon()
+ if (on)
+ icon_state = initial(icon_state)
+ else
+ icon_state = "[initial(icon_state)]_off"
+
+
+/obj/machinery/telecomms/proc/add_link(obj/machinery/telecomms/machine)
+ if (machine == src)
+ return
+ if (machine in links)
+ return
+ var/src_z = get_z(src)
+ var/machine_z = get_z(machine)
+ if (src_z != machine_z && !(long_range_link && machine.long_range_link))
+ return
+ for (var/entry in autolinkers)
+ if (entry in machine.autolinkers)
+ links |= machine
+ break
+
+
+/obj/machinery/telecomms/proc/canAccess(mob/user)
+ return issilicon(user) || in_range(user, src)
+
+
+/obj/machinery/telecomms/proc/checkheat()
+ var/turf/simulated/turf = get_turf(src)
+ if (!istype(turf))
+ return
+ var/datum/gas_mixture/environment = turf.return_air()
+ var/damage_chance = 0
+ switch(environment.temperature)
+ if ((T0C + 40) to (T0C + 70))
+ damage_chance = 10
+ if ((T0C + 70) to (T0C + 130))
+ damage_chance = 25
+ if ((T0C + 130) to (T0C + 200))
+ damage_chance = 50
+ if ((T0C + 200) to INFINITY)
+ damage_chance = 100
+ if (damage_chance && prob(damage_chance))
+ integrity = between(0, integrity - 1, 100)
+ if (delay > 0)
+ delay--
+ else if (on)
+ produce_heat()
+ delay = initial(delay)
+
+
+/obj/machinery/telecomms/proc/is_freq_listening(datum/signal/signal)
+ if (!signal)
+ return FALSE
+ if (!length(freq_listening) || (signal.frequency in freq_listening))
+ return TRUE
+ return FALSE
+
+
+/obj/machinery/telecomms/proc/produce_heat()
+ if (!produces_heat)
+ return
+ if (!use_power)
+ return
+ if (stat & (NOPOWER|BROKEN))
+ return
+ var/turf/simulated/turf = get_turf(src)
+ if (!istype(turf))
+ return
+ var/datum/gas_mixture/env = turf.return_air()
+ var/transfer_moles = 0.25 * env.total_moles
+ var/datum/gas_mixture/removed = env.remove(transfer_moles)
+ if (removed)
+ var/heat_produced = idle_power_usage
+ if (traffic <= 0)
+ heat_produced *= 0.30
+ removed.add_thermal_energy(heat_produced)
+ env.merge(removed)
+
+
+/obj/machinery/telecomms/proc/receive_information(datum/signal/signal, obj/machinery/telecomms/sender)
+ return
+
+
+/obj/machinery/telecomms/proc/relay_direct_information(datum/signal/signal, obj/machinery/telecomms/receiver)
+ receiver.receive_information(signal, src)
+
+
+/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
+ if (!on)
+ return
+ var/send_count = 0
+ signal.data["slow"] += rand(0, round(100 - integrity))
+ for (var/obj/machinery/telecomms/machine in links)
+ if (filter && !istype(machine, filter))
+ continue
+ if (!machine.on)
+ continue
+ if (amount && send_count >= amount)
+ break
+ if (machine.loc.z != listening_level)
+ if (!long_range_link && !machine.long_range_link)
+ continue
+ var/datum/signal/copy
+ if (copysig)
+ copy = new
+ copy.transmission_method = TRANSMISSION_SUBSPACE
+ copy.frequency = signal.frequency
+ copy.data = signal.data.Copy()
+ if (!signal.data["original"])
+ copy.data["original"] = signal
+ else
+ copy.data["original"] = signal.data["original"]
+ send_count++
+ if (machine.is_freq_listening(signal))
+ machine.traffic++
+ if (copysig && copy)
+ machine.receive_information(copy, src)
+ else
+ machine.receive_information(signal, src)
+ if (send_count > 0 && is_freq_listening(signal))
+ traffic++
+ return send_count
+
+
+/obj/machinery/telecomms/proc/set_temp(text, color = "average")
+ temp = list("color" = color, "text" = text)
+
+
+/obj/machinery/telecomms/proc/update_power()
+ if (integrity < 1)
+ on = FALSE
+ else if (stat & (BROKEN|NOPOWER|EMPED))
+ on = FALSE
+ else
+ on = toggled
+
+
+/* Additional interface options for certain machines. Eg:
+* /obj/machinery/telecomms/processor/OptionsMenu()
+* return "
Processing Mode: [uncompress ? "UNCOMPRESS" : "COMPRESS"]"
+*/
+/obj/machinery/telecomms/proc/OptionsMenu()
+ return list()
+
+
+/// Topic handler for OptionsMenu href links.
+/obj/machinery/telecomms/proc/OptionsHandler(action, params)
+ return
diff --git a/code/game/machinery/telecomms/telecommunications.dm b/code/game/machinery/telecomms/telecommunications.dm
deleted file mode 100644
index 7a741f7ae8c..00000000000
--- a/code/game/machinery/telecomms/telecommunications.dm
+++ /dev/null
@@ -1,691 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-/*
- Hello, friends, this is Doohl from sexylands. You may be wondering what this
- monstrous code file is. Sit down, boys and girls, while I tell you the tale.
-
-
- The machines defined in this file were designed to be compatible with any radio
- signals, provided they use subspace transmission. Currently they are only used for
- headsets, but they can eventually be outfitted for real COMPUTER networks. This
- is just a skeleton, ladies and gentlemen.
-
- Look at radio.dm for the prequel to this code.
-*/
-
-var/global/list/obj/machinery/telecomms/telecomms_list = list()
-
-/obj/machinery/telecomms
- icon = 'icons/obj/stationobjs.dmi'
- var/list/links = list() // list of machines this machine is linked to
- var/traffic = 0 // value increases as traffic increases
- var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
- var/list/autolinkers = list() // list of text/number values to link with
- var/id = "NULL" // identification string
- var/network = "NULL" // the network of the machinery
-
- var/list/freq_listening = list() // list of frequencies to tune into: if none, will listen to all
-
- var/machinetype = 0 // just a hacky way of preventing alike machines from pairing
- var/toggled = 1 // Is it toggled on
- var/on = 1
- var/integrity = 100 // basically HP, loses integrity by heat
- var/produces_heat = 1 //whether the machine will produce heat when on.
- var/delay = 10 // how many process() ticks to delay per heat
- var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub)
- var/hide = 0 // Is it a hidden machine?
- var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
-
-
-/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
- // relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
-
- if(!on)
- return
- //to_world("[src] ([src.id]) - [signal.debug_print()]")
- var/send_count = 0
-
- signal.data["slow"] += rand(0, round((100-integrity))) // apply some lag based on integrity
-
- /*
- // Edit by Atlantis: Commented out as emergency fix due to causing extreme delays in communications.
- // Apply some lag based on traffic rates
- var/netlag = round(traffic / 50)
- if(netlag > signal.data["slow"])
- signal.data["slow"] = netlag
- */
-// Loop through all linked machines and send the signal or copy.
- for(var/obj/machinery/telecomms/machine in links)
- if(filter && !istype(machine, filter))
- continue
- if(!machine.on)
- continue
- if(amount && send_count >= amount)
- break
- if(machine.loc.z != listening_level)
- if(long_range_link == 0 && machine.long_range_link == 0)
- continue
- // If we're sending a copy, be sure to create the copy for EACH machine and paste the data
- var/datum/signal/copy
- if(copysig)
- copy = new
- copy.transmission_method = TRANSMISSION_SUBSPACE
- copy.frequency = signal.frequency
- copy.data = signal.data.Copy()
-
- // Keep the "original" signal constant
- if(!signal.data["original"])
- copy.data["original"] = signal
- else
- copy.data["original"] = signal.data["original"]
-
- send_count++
- if(machine.is_freq_listening(signal))
- machine.traffic++
-
- if(copysig && copy)
- machine.receive_information(copy, src)
- else
- machine.receive_information(signal, src)
-
-
- if(send_count > 0 && is_freq_listening(signal))
- traffic++
-
- return send_count
-
-/obj/machinery/telecomms/proc/relay_direct_information(datum/signal/signal, obj/machinery/telecomms/machine)
- // send signal directly to a machine
- machine.receive_information(signal, src)
-
-/obj/machinery/telecomms/proc/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- // receive information from linked machinery
- return
-
-/obj/machinery/telecomms/proc/is_freq_listening(datum/signal/signal)
- // return 1 if found, 0 if not found
- if(!signal)
- return 0
- if((signal.frequency in freq_listening) || (!freq_listening.len))
- return 1
- else
- return 0
-
-/obj/machinery/telecomms/Initialize()
- telecomms_list += src
- ..()
- default_apply_parts()
- return INITIALIZE_HINT_LATELOAD
-
-/obj/machinery/telecomms/LateInitialize()
- . = ..()
-
- //Set the listening_level if there's none.
- if(!listening_level)
- //Defaults to our Z level!
- var/turf/position = get_turf(src)
- listening_level = position.z
-
- if(autolinkers.len)
- // Links nearby machines
- if(!long_range_link)
- for(var/obj/machinery/telecomms/T in orange(20, src))
- add_link(T)
- else
- for(var/obj/machinery/telecomms/T in telecomms_list)
- add_link(T)
-
-/obj/machinery/telecomms/Destroy()
- telecomms_list -= src
- for(var/obj/machinery/telecomms/comm in telecomms_list)
- comm.links -= src
- links = list()
- ..()
-
-// Used in auto linking
-/obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T)
- var/pos_z = get_z(src)
- var/tpos_z = get_z(T)
- if((pos_z == tpos_z) || (src.long_range_link && T.long_range_link))
- for(var/x in autolinkers)
- if(T.autolinkers.Find(x))
- if(src != T)
- links |= T
-
-/obj/machinery/telecomms/update_icon()
- if(on)
- icon_state = initial(icon_state)
- else
- icon_state = "[initial(icon_state)]_off"
-
-/obj/machinery/telecomms/proc/update_power()
-
- if(toggled)
- if(stat & (BROKEN|NOPOWER|EMPED) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
- on = 0
- else
- on = 1
- else
- on = 0
-
-/obj/machinery/telecomms/process()
- update_power()
-
- // Check heat and generate some
- checkheat()
-
- // Update the icon
- update_icon()
-
- if(traffic > 0)
- traffic -= netspeed
-
-/obj/machinery/telecomms/emp_act(severity)
- if(prob(100/severity))
- if(!(stat & EMPED))
- stat |= EMPED
- var/duration = (300 * 10)/severity
- spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
- stat &= ~EMPED
- ..()
-
-/obj/machinery/telecomms/proc/checkheat()
- // Checks heat from the environment and applies any integrity damage
- var/datum/gas_mixture/environment = loc.return_air()
- var/damage_chance = 0 // Percent based chance of applying 1 integrity damage this tick
- switch(environment.temperature)
- if((T0C + 40) to (T0C + 70)) // 40C-70C, minor overheat, 10% chance of taking damage
- damage_chance = 10
- if((T0C + 70) to (T0C + 130)) // 70C-130C, major overheat, 25% chance of taking damage
- damage_chance = 25
- if((T0C + 130) to (T0C + 200)) // 130C-200C, dangerous overheat, 50% chance of taking damage
- damage_chance = 50
- if((T0C + 200) to INFINITY) // More than 200C, INFERNO. Takes damage every tick.
- damage_chance = 100
- if (damage_chance && prob(damage_chance))
- integrity = between(0, integrity - 1, 100)
-
-
- if(delay > 0)
- delay--
- else if(on)
- produce_heat()
- delay = initial(delay)
-
-
-
-/obj/machinery/telecomms/proc/produce_heat()
- if (!produces_heat)
- return
-
- if (!use_power)
- return
-
- if(!(stat & (NOPOWER|BROKEN)))
- var/turf/simulated/L = loc
- if(istype(L))
- var/datum/gas_mixture/env = L.return_air()
-
- var/transfer_moles = 0.25 * env.total_moles
-
- var/datum/gas_mixture/removed = env.remove(transfer_moles)
-
- if(removed)
-
- var/heat_produced = idle_power_usage //obviously can't produce more heat than the machine draws from it's power source
- if (traffic <= 0)
- heat_produced *= 0.30 //if idle, produce less heat.
-
- removed.add_thermal_energy(heat_produced)
-
- env.merge(removed)
-/*
- The receiver idles and receives messages from subspace-compatible radio equipment;
- primarily headsets. They then just relay this information to all linked devices,
- which can would probably be network hubs.
-
- Link to Processor Units in case receiver can't send to bus units.
-*/
-
-/obj/machinery/telecomms/receiver
- name = "Subspace Receiver"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "broadcast receiver"
- desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 600
- machinetype = 1
- produces_heat = 0
- circuit = /obj/item/circuitboard/telecomms/receiver
- //Vars only used if you're using the overmap
- var/overmap_range = 0
- var/overmap_range_min = 0
- var/overmap_range_max = 5
-
- var/list/linked_radios_weakrefs = list()
-
-/obj/machinery/telecomms/receiver/proc/link_radio(var/obj/item/radio/R)
- if(!istype(R))
- return
- linked_radios_weakrefs |= weakref(R)
-
-/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
- if(!on) // has to be on to receive messages
- return
- if(!signal)
- return
- if(!check_receive_level(signal))
- return
-
- if(signal.transmission_method == TRANSMISSION_SUBSPACE)
-
- if(is_freq_listening(signal)) // detect subspace signals
-
- //Remove the level and then start adding levels that it is being broadcasted in.
- signal.data["level"] = list()
-
- var/can_send = relay_information(signal, /obj/machinery/telecomms/hub) // ideally relay the copied information to relays
- if(!can_send)
- relay_information(signal, /obj/machinery/telecomms/bus) // Send it to a bus instead, if it's linked to one
-
-/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
- // If it's a direct message from a bluespace radio, we eat it and convert it into a subspace signal locally
- if(signal.transmission_method == TRANSMISSION_BLUESPACE)
- var/obj/item/radio/R = signal.data["radio"]
-
- //Who're you?
- if(!(weakref(R) in linked_radios_weakrefs))
- signal.data["reject"] = 1
- return 0
-
- //We'll resend this for you
- signal.data["level"] = z
- signal.transmission_method = TRANSMISSION_SUBSPACE
- return 1
-
- //Where can we hear?
- var/list/listening_levels = using_map.get_map_levels(listening_level, TRUE, overmap_range)
-
- // We couldn't 'hear' it, maybe a relay linked to our hub can 'hear' it
- if(!(signal.data["level"] in listening_levels))
- for(var/obj/machinery/telecomms/hub/H in links)
- var/list/relayed_levels = list()
- for(var/obj/machinery/telecomms/relay/R in H.links)
- if(R.can_receive(signal))
- relayed_levels |= R.listening_level
- if(signal.data["level"] in relayed_levels)
- return 1
- return 0
- return 1
-
-
-/*
- The HUB idles until it receives information. It then passes on that information
- depending on where it came from.
-
- This is the heart of the Telecommunications Network, sending information where it
- is needed. It mainly receives information from long-distance Relays and then sends
- that information to be processed. Afterwards it gets the uncompressed information
- from Servers/Buses and sends that back to the relay, to then be broadcasted.
-*/
-
-/obj/machinery/telecomms/hub
- name = "Telecommunication Hub"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "hub"
- desc = "A mighty piece of hardware used to send/receive massive amounts of data."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 1600
- machinetype = 7
- circuit = /obj/item/circuitboard/telecomms/hub
- long_range_link = 1
- netspeed = 40
-
-/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
- if(is_freq_listening(signal))
- if(istype(machine_from, /obj/machinery/telecomms/receiver))
- //If the signal is compressed, send it to the bus.
- relay_information(signal, /obj/machinery/telecomms/bus, 1) // ideally relay the copied information to bus units
- else
- // Get a list of relays that we're linked to, then send the signal to their levels.
- relay_information(signal, /obj/machinery/telecomms/relay, 1)
- relay_information(signal, /obj/machinery/telecomms/broadcaster, 1) // Send it to a broadcaster.
-
-
-/*
- The relay idles until it receives information. It then passes on that information
- depending on where it came from.
-
- The relay is needed in order to send information pass Z levels. It must be linked
- with a HUB, the only other machine that can send/receive pass Z levels.
-*/
-
-/obj/machinery/telecomms/relay
- name = "Telecommunication Relay"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "relay"
- desc = "A mighty piece of hardware used to send massive amounts of data far away."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 600
- machinetype = 8
- produces_heat = 0
- circuit = /obj/item/circuitboard/telecomms/relay
- netspeed = 5
- long_range_link = 1
- var/broadcasting = 1
- var/receiving = 1
-
-/obj/machinery/telecomms/relay/forceMove(var/newloc)
- . = ..(newloc)
- listening_level = z
-
-/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- // Add our level and send it back
- if(can_send(signal))
- signal.data["level"] |= using_map.get_map_levels(listening_level)
-
-// Checks to see if it can send/receive.
-
-/obj/machinery/telecomms/relay/proc/can(datum/signal/signal)
- if(!on)
- return 0
- if(!is_freq_listening(signal))
- return 0
- return 1
-
-/obj/machinery/telecomms/relay/proc/can_send(datum/signal/signal)
- if(!can(signal))
- return 0
- return broadcasting
-
-/obj/machinery/telecomms/relay/proc/can_receive(datum/signal/signal)
- if(!can(signal))
- return 0
- return receiving
-
-/*
- The bus mainframe idles and waits for hubs to relay them signals. They act
- as junctions for the network.
-
- They transfer uncompressed subspace packets to processor units, and then take
- the processed packet to a server for logging.
-
- Link to a subspace hub if it can't send to a server.
-*/
-
-/obj/machinery/telecomms/bus
- name = "Bus Mainframe"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "bus"
- desc = "A mighty piece of hardware used to send massive amounts of data quickly."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 1000
- machinetype = 2
- circuit = /obj/item/circuitboard/telecomms/bus
- netspeed = 40
- var/change_frequency = 0
-
-/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- if(is_freq_listening(signal))
-
- if(change_frequency)
- signal.frequency = change_frequency
-
- if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it
- // send to one linked processor unit
- var/send_to_processor = relay_information(signal, /obj/machinery/telecomms/processor)
-
- if(send_to_processor)
- return
- // failed to send to a processor, relay information anyway
- signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
- src.receive_information(signal, src)
-
- // Try sending it!
- var/list/try_send = list(/obj/machinery/telecomms/server, /obj/machinery/telecomms/hub, /obj/machinery/telecomms/broadcaster, /obj/machinery/telecomms/bus)
- var/i = 0
- for(var/send in try_send)
- if(i)
- signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
- i++
- var/can_send = relay_information(signal, send)
- if(can_send)
- break
-
-
-
-/*
- The processor is a very simple machine that decompresses subspace signals and
- transfers them back to the original bus. It is essential in producing audible
- data.
-
- Link to servers if bus is not present
-*/
-
-/obj/machinery/telecomms/processor
- name = "Processor Unit"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "processor"
- desc = "This machine is used to process large quantities of information."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 600
- machinetype = 3
- delay = 5
- circuit = /obj/item/circuitboard/telecomms/processor
- var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals
-
-/obj/machinery/telecomms/processor/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- if(is_freq_listening(signal))
-
- if(process_mode)
- signal.data["compression"] = 0 // uncompress subspace signal
- else
- signal.data["compression"] = 100 // even more compressed signal
-
- if(istype(machine_from, /obj/machinery/telecomms/bus))
- relay_direct_information(signal, machine_from) // send the signal back to the machine
- else // no bus detected - send the signal to servers instead
- signal.data["slow"] += rand(5, 10) // slow the signal down
- relay_information(signal, /obj/machinery/telecomms/server)
-
-
-/*
- The server logs all traffic and signal data. Once it records the signal, it sends
- it to the subspace broadcaster.
-
- Store a maximum of 100 logs and then deletes them.
-*/
-
-
-/obj/machinery/telecomms/server
- name = "Telecommunication Server"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "comm_server"
- desc = "A machine used to store data and network statistics."
- density = 1
- anchored = 1
- use_power = USE_POWER_IDLE
- idle_power_usage = 300
- machinetype = 4
- circuit = /obj/item/circuitboard/telecomms/server
- var/list/log_entries = list()
- var/list/stored_names = list()
- var/list/TrafficActions = list()
- var/logs = 0 // number of logs
- var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes)
-
- var/list/memory = list() // stored memory
- var/rawcode = "" // the code to compile (raw text)
- var/datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code
- var/autoruncode = 0 // 1 if the code is set to run every time a signal is picked up
-
- var/encryption = "null" // encryption key: ie "password"
- var/salt = "null" // encryption salt: ie "123comsat"
- // would add up to md5("password123comsat")
- var/obj/item/radio/headset/server_radio = null
-
-/obj/machinery/telecomms/server/Initialize()
- Compiler = new
- Compiler.Holder = src
- server_radio = new
- . = ..()
-
-/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
-
- if(signal.data["message"])
-
- if(is_freq_listening(signal))
-
- if(traffic > 0)
- totaltraffic += traffic // add current traffic to total traffic
-
- //Is this a test signal? Bypass logging
- if(signal.data["type"] != SIGNAL_TEST)
-
- // If signal has a message and appropriate frequency
-
- update_logs()
-
- var/datum/comm_log_entry/log = new
- var/mob/M = signal.data["mob"]
-
- // Copy the signal.data entries we want
- log.parameters["mobtype"] = signal.data["mobtype"]
- log.parameters["job"] = signal.data["job"]
- log.parameters["key"] = signal.data["key"]
- log.parameters["vmessage"] = multilingual_to_message(signal.data["message"])
- log.parameters["vname"] = signal.data["vname"]
- log.parameters["message"] = multilingual_to_message(signal.data["message"])
- log.parameters["name"] = signal.data["name"]
- log.parameters["realname"] = signal.data["realname"]
- log.parameters["timecode"] = worldtime2stationtime(world.time)
-
- var/race = "unknown"
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- race = "[H.species.name]"
- log.parameters["intelligible"] = 1
- else if(isbrain(M))
- race = "Brain"
- log.parameters["intelligible"] = 1
- else if(M.isMonkey())
- race = "Monkey"
- else if(issilicon(M))
- race = "Artificial Life"
- log.parameters["intelligible"] = 1
- else if(isslime(M))
- race = "Slime"
- else if(isanimal(M))
- race = "Domestic Animal"
-
- log.parameters["race"] = race
-
- if(!istype(M, /mob/new_player) && M)
- log.parameters["uspeech"] = M.universal_speak
- else
- log.parameters["uspeech"] = 0
-
- // If the signal is still compressed, make the log entry gibberish
- if(signal.data["compression"] > 0)
- log.parameters["message"] = Gibberish(multilingual_to_message(signal.data["message"]), signal.data["compression"] + 50)
- log.parameters["job"] = Gibberish(signal.data["job"], signal.data["compression"] + 50)
- log.parameters["name"] = Gibberish(signal.data["name"], signal.data["compression"] + 50)
- log.parameters["realname"] = Gibberish(signal.data["realname"], signal.data["compression"] + 50)
- log.parameters["vname"] = Gibberish(signal.data["vname"], signal.data["compression"] + 50)
- log.input_type = "Corrupt File"
-
- // Log and store everything that needs to be logged
- log_entries.Add(log)
- if(!(signal.data["name"] in stored_names))
- stored_names.Add(signal.data["name"])
- logs++
- signal.data["server"] = src
-
- // Give the log a name
- var/identifier = num2text( rand(-1000,1000) + world.time )
- log.name = "data packet ([md5(identifier)])"
-
- if(Compiler && autoruncode)
- Compiler.Run(signal) // execute the code
-
- var/can_send = relay_information(signal, /obj/machinery/telecomms/hub)
- if(!can_send)
- relay_information(signal, /obj/machinery/telecomms/broadcaster)
-
-
-/obj/machinery/telecomms/server/proc/setcode(var/t)
- if(t)
- if(istext(t))
- rawcode = t
-
-/obj/machinery/telecomms/server/proc/compile()
- if(Compiler)
- return Compiler.Compile(rawcode)
-
-/obj/machinery/telecomms/server/proc/update_logs()
- // start deleting the very first log entry
- if(logs >= 400)
- for(var/i = 1, i <= logs, i++) // locate the first garbage collectable log entry and remove it
- var/datum/comm_log_entry/L = log_entries[i]
- if(L.garbage_collector)
- log_entries.Remove(L)
- logs--
- break
-
-/obj/machinery/telecomms/server/proc/add_entry(var/content, var/input)
- var/datum/comm_log_entry/log = new
- var/identifier = num2text( rand(-1000,1000) + world.time )
- log.name = "[input] ([md5(identifier)])"
- log.input_type = input
- log.parameters["message"] = content
- log.parameters["timecode"] = stationtime2text()
- log_entries.Add(log)
- update_logs()
-
-
-
-
-// Simple log entry datum
-
-/datum/comm_log_entry
- var/parameters = list() // carbon-copy to signal.data[]
- var/name = "data packet (#)"
- var/garbage_collector = 1 // if set to 0, will not be garbage collected
- var/input_type = "Speech File"
-
-//Generic telecomm connectivity test proc
-/proc/can_telecomm(var/atom/A, var/atom/B, var/ad_hoc = FALSE)
- if(!A || !B)
- log_debug("can_telecomm(): Undefined endpoints!")
- return FALSE
-
- //Can't in this case, obviously!
- if(is_jammed(A) || is_jammed(B))
- return FALSE
-
- //Items don't have a Z when inside an object or mob
- var/turf/src_z = get_z(A)
- var/turf/dst_z = get_z(B)
-
- //Nullspace, probably.
- if(!src_z || !dst_z)
- return FALSE
-
- //We can do the simple check first, if you have ad_hoc radios.
- if(ad_hoc && src_z == dst_z)
- return TRUE
-
- return src_z in using_map.get_map_levels(dst_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE)
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index 2d26f199ced..b51823f7d64 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -1,128 +1,124 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-/*
- Telecomms monitor tracks the overall trafficing of a telecommunications network
- and displays a heirarchy of linked machines.
+/* Telecomms Monitor
+* Tracks the overall trafficing of a telecommunications network and
+* displays a heirarchy of linked machines.
*/
/obj/machinery/computer/telecomms/monitor
name = "Telecommunications Monitor"
desc = "Used to traverse a telecommunication network. Helpful for debugging connection issues."
icon_screen = "comm_monitor"
-
- var/screen = 0 // the screen number:
- var/list/machinelist = list() // the machines located by the computer
- var/obj/machinery/telecomms/SelectedMachine
+ icon_keyboard = "tech_key"
circuit = /obj/item/circuitboard/comm_monitor
+ var/screen = 0 // the screen number
+ var/obj/machinery/telecomms/SelectedMachine
+ var/list/machinelist = list() // the machines located by the computer
+ var/network = "NULL" // the network to probe
+ var/list/temp // temporary feedback messages
- var/network = "NULL" // the network to probe
-
- var/list/temp = null // temporary feedback messages
-/obj/machinery/computer/telecomms/monitor/tgui_data(mob/user)
- var/list/data = list()
+/obj/machinery/computer/telecomms/monitor/Destroy()
+ LAZYCLEARLIST(machinelist)
+ SelectedMachine = null
+ return ..()
- data["network"] = network
- data["temp"] = temp
-
- var/list/machinelist = list()
- for(var/obj/machinery/telecomms/T in src.machinelist)
- machinelist.Add(list(list(
- "id" = T.id,
- "name" = T.name,
- )))
- data["machinelist"] = machinelist
-
- data["selectedMachine"] = null
- if(SelectedMachine)
- data["selectedMachine"] = list(
- "id" = SelectedMachine.id,
- "name" = SelectedMachine.name,
- )
- var/list/links = list()
- for(var/obj/machinery/telecomms/T in SelectedMachine.links)
- if(!T.hide)
- links.Add(list(list(
- "id" = T.id,
- "name" = T.name
- )))
- data["selectedMachine"]["links"] = links
- return data
/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user)
- if(stat & (BROKEN|NOPOWER))
+ if (stat & (BROKEN|NOPOWER))
return
tgui_interact(user)
-/obj/machinery/computer/telecomms/monitor/tgui_interact(mob/user, datum/tgui/ui)
- ui = SStgui.try_update_ui(user, src, ui)
- if(!ui)
- ui = new(user, src, "TelecommsMachineBrowser", name)
- ui.open()
+
+/obj/machinery/computer/telecomms/monitor/emag_act(remaining_charges, mob/user)
+ if (emagged)
+ return
+ playsound(src, 'sound/effects/sparks4.ogg', 75, TRUE)
+ emagged = TRUE
+ to_chat(user, SPAN_NOTICE("You you disable the security protocols"))
+ updateUsrDialog()
+ return 1
+
/obj/machinery/computer/telecomms/monitor/tgui_act(action, params)
- if(..())
+ if (..())
return TRUE
-
add_fingerprint(usr)
-
- switch(action)
- if("view")
- for(var/obj/machinery/telecomms/T in machinelist)
- if(T.id == params["id"])
- SelectedMachine = T
+ switch (action)
+ if ("view")
+ for (var/obj/machinery/telecomms/machine in machinelist)
+ if (machine.id == params["id"])
+ SelectedMachine = machine
break
. = TRUE
-
- if("mainmenu")
+ if ("mainmenu")
SelectedMachine = null
. = TRUE
-
- if("release")
+ if ("release")
machinelist = list()
SelectedMachine = null
. = TRUE
-
- if("scan")
- if(machinelist.len > 0)
+ if ("scan")
+ if (length(machinelist))
set_temp("FAILED: CANNOT PROBE WHEN BUFFER FULL", "bad")
return TRUE
-
- for(var/obj/machinery/telecomms/T in range(25, src))
- if(T.network == network)
- machinelist.Add(T)
-
- if(!machinelist.len)
- set_temp("FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\]", "bad")
- else
+ for (var/obj/machinery/telecomms/machine in range(25, src))
+ if (machine.network == network)
+ machinelist += machine
+ if(length(machinelist))
set_temp("[machinelist.len] ENTITIES LOCATED & BUFFERED", "good")
+ else
+ set_temp("FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\]", "bad")
. = TRUE
-
- if("network")
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
+ if ("network")
+ var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null | text
+ if (newnet && (issilicon(usr) || (usr in range(1, src))))
+ if (length(newnet) > 15)
set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad")
return TRUE
network = newnet
machinelist = list()
set_temp("NEW NETWORK TAG SET IN ADDRESS \[[network]\]", "good")
-
. = TRUE
-
- if("cleartemp")
+ if ("cleartemp")
temp = null
. = TRUE
-/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
- if(!emagged)
- playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- to_chat(user, "You you disable the security protocols")
- src.updateUsrDialog()
- return 1
+/obj/machinery/computer/telecomms/monitor/tgui_data(mob/user)
+ var/list/data = list()
+ data["network"] = network
+ data["temp"] = temp
+ var/list/machinelist = list()
+ for (var/obj/machinery/telecomms/machine in machinelist)
+ machinelist += list(list(
+ "id" = machine.id,
+ "name" = machine.name,
+ ))
+ data["machinelist"] = machinelist
+ data["selectedMachine"] = null
+ if (!SelectedMachine)
+ return data
+ data["selectedMachine"] = list(
+ "id" = SelectedMachine.id,
+ "name" = SelectedMachine.name,
+ )
+ var/list/links = list()
+ for (var/obj/machinery/telecomms/machine in SelectedMachine.links)
+ if (machine.hide)
+ continue
+ links += list(list(
+ "id" = machine.id,
+ "name" = machine.name
+ ))
+ data["selectedMachine"]["links"] = links
+ return data
+
+
+/obj/machinery/computer/telecomms/monitor/tgui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if (!ui)
+ ui = new(user, src, "TelecommsMachineBrowser", name)
+ ui.open()
+
-/obj/machinery/computer/telecomms/monitor/proc/set_temp(var/text, var/color = "average")
+/obj/machinery/computer/telecomms/monitor/proc/set_temp(text, color = "average")
temp = list("color" = color, "text" = text)
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
deleted file mode 100644
index d8778ac5191..00000000000
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ /dev/null
@@ -1,217 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-
-
-
-
-/obj/machinery/computer/telecomms/traffic
- name = "Telecommunications Traffic Control"
- desc = "Used to upload code to telecommunication consoles for execution."
- icon_screen = "generic"
-
- var/screen = 0 // the screen number:
- var/list/servers = list() // the servers located by the computer
- var/mob/editingcode
- var/mob/lasteditor
- var/list/viewingcode = list()
- var/obj/machinery/telecomms/server/SelectedServer
- circuit = /obj/item/circuitboard/comm_traffic
- req_access = list(access_tcomsat)
-
- var/network = "NULL" // the network to probe
- var/temp = "" // temporary feedback messages
-
- var/storedcode = "" // code stored
-
-
-/obj/machinery/computer/telecomms/traffic/proc/update_ide()
-
- // loop if there's someone manning the keyboard
- while(editingcode)
- if(!editingcode.client)
- editingcode = null
- break
-
- // For the typer, the input is enabled. Buffer the typed text
- if(editingcode)
- storedcode = "[winget(editingcode, "tcscode", "text")]"
- if(editingcode) // double if's to work around a runtime error
- winset(editingcode, "tcscode", "is-disabled=false")
-
- // If the player's not manning the keyboard anymore, adjust everything
- if( (!(editingcode in range(1, src)) && !issilicon(editingcode)) || (editingcode.machine != src && !issilicon(editingcode)))
- if(editingcode)
- winshow(editingcode, "Telecomms IDE", 0) // hide the window!
- editingcode = null
- break
-
- // For other people viewing the typer type code, the input is disabled and they can only view the code
- // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once)
-
- if(length(viewingcode))
- // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
-
- for(var/mob/M in viewingcode)
-
- if( (M.machine == src && (M in view(1, src)) ) || issilicon(M))
- winset(M, "tcscode", "is-disabled=true")
- winset(M, "tcscode", "text=\"[showcode]\"")
- else
- viewingcode.Remove(M)
- winshow(M, "Telecomms IDE", 0) // hide the window!
-
- sleep(5)
-
- if(length(viewingcode) > 0)
- editingcode = pick(viewingcode)
- viewingcode.Remove(editingcode)
- update_ide()
-
-
-
-
-/obj/machinery/computer/telecomms/traffic/attack_hand(mob/user as mob)
- if(stat & (BROKEN|NOPOWER))
- return
- user.set_machine(src)
- var/dat = "Telecommunication Traffic ControlTelecommunications Traffic Control"
-
- switch(screen)
-
-
- // --- Main Menu ---
-
- if(0)
- dat += "
[temp]
"
- dat += "
Current Network: [network]
"
- if(servers.len)
- dat += "
Detected Telecommunication Servers:"
- for(var/obj/machinery/telecomms/T in servers)
- dat += "- \ref[T] [T.name] ([T.id])
"
- dat += "
"
- dat += "
\[Flush Buffer\]"
-
- else
- dat += "
No servers detected. Scan for servers: \[Scan\]"
-
-
- // --- Viewing Server ---
-
- if(1)
- dat += "
[temp]
"
- dat += "\[Main Menu\] \[Refresh\]"
- dat += "
Current Network: [network]"
- dat += "
Selected Server: [SelectedServer.id]
"
- dat += "
\[Edit Code\]"
- dat += "
Signal Execution: "
- if(SelectedServer.autoruncode)
- dat += "ALWAYS"
- else
- dat += "NEVER"
-
-
- user << browse(dat, "window=traffic_control;size=575x400")
- onclose(user, "server_control")
-
- temp = ""
- return
-
-
-/obj/machinery/computer/telecomms/traffic/Topic(href, href_list)
- if(..())
- return
-
-
- add_fingerprint(usr)
- usr.set_machine(src)
- if(!src.allowed(usr) && !emagged)
- to_chat(usr, "ACCESS DENIED.")
- return
-
- if(href_list["viewserver"])
- screen = 1
- for(var/obj/machinery/telecomms/T in servers)
- if(T.id == href_list["viewserver"])
- SelectedServer = T
- break
-
- if(href_list["operation"])
- switch(href_list["operation"])
-
- if("release")
- servers = list()
- screen = 0
-
- if("mainmenu")
- screen = 0
-
- if("scan")
- if(servers.len > 0)
- temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -"
-
- else
- for(var/obj/machinery/telecomms/server/T in range(25, src))
- if(T.network == network)
- servers.Add(T)
-
- if(!servers.len)
- temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -"
- else
- temp = "- [servers.len] SERVERS PROBED & BUFFERED -"
-
- screen = 0
-
- if("editcode")
- if(editingcode == usr) return
- if(usr in viewingcode) return
-
- if(!editingcode)
- lasteditor = usr
- editingcode = usr
- winshow(editingcode, "Telecomms IDE", 1) // show the IDE
- winset(editingcode, "tcscode", "is-disabled=false")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\\\"", "\\\\\"")
- showcode = replacetext(storedcode, "\"", "\\\"")
- winset(editingcode, "tcscode", "text=\"[showcode]\"")
- spawn()
- update_ide()
-
- else
- viewingcode.Add(usr)
- winshow(usr, "Telecomms IDE", 1) // show the IDE
- winset(usr, "tcscode", "is-disabled=true")
- winset(editingcode, "tcscode", "text=\"\"")
- var/showcode = replacetext(storedcode, "\"", "\\\"")
- winset(usr, "tcscode", "text=\"[showcode]\"")
-
- if("togglerun")
- SelectedServer.autoruncode = !(SelectedServer.autoruncode)
-
- if(href_list["network"])
-
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
-
- if(newnet && ((usr in range(1, src) || issilicon(usr))))
- if(length(newnet) > 15)
- temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
-
- else
-
- network = newnet
- screen = 0
- servers = list()
- temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -"
-
- updateUsrDialog()
- return
-
-/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
- if(!emagged)
- playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- to_chat(user, "You you disable the security protocols")
- src.updateUsrDialog()
- return 1
\ No newline at end of file
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 781103d1006..5d451222127 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -7,7 +7,7 @@
name="beam"
icon='icons/effects/beam.dmi'
icon_state="b_beam"
- var/tmp/atom/BeamSource
+ var/atom/BeamSource
/obj/effect/overlay/beam/Initialize()
. = ..()
@@ -111,7 +111,7 @@
pixel_x = -32
pixel_y = -32
-// For skathari empress' telegrab warning, could replace down the line.
+// For skathari empress' telegrab warning, could replace down the line.
/obj/effect/overlay/skathari_telegrab
name = "bluespace displacement"
desc = "An eerie field of bluespace energy, you might want to run!"
@@ -119,7 +119,7 @@
icon_state = "emfield_s3"
alpha = 100
pixel_x = -32
- pixel_y = -16 /// Line up with the big sprite that spawns it!
+ pixel_y = -16 /// Line up with the big sprite that spawns it!
plane = MOB_PLANE
layer = BELOW_MOB_LAYER
@@ -128,4 +128,4 @@
plane = FLOAT_PLANE
layer = FLOAT_LAYER
vis_flags = VIS_INHERIT_ID
- appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE
\ No newline at end of file
+ appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE
diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm
index ea459ac34ac..55b889ef61c 100644
--- a/code/game/objects/items/devices/communicator/communicator.dm
+++ b/code/game/objects/items/devices/communicator/communicator.dm
@@ -193,9 +193,17 @@ var/global/list/obj/item/communicator/all_communicators = list()
// Parameters: None
// Description: Simple check to see if the exonet node is active.
/obj/item/communicator/proc/get_connection_to_tcomms()
- if(node && node.on && node.allow_external_communicators)
- return can_telecomm(src,node)
- return 0
+ if (!node?.on || !node.allow_external_communicators)
+ return FALSE
+ if (is_jammed(src) || is_jammed(node))
+ return FALSE
+ var/sender_z = get_z(src)
+ var/receiver_z = get_z(node)
+ if (!sender_z || !receiver_z)
+ return FALSE
+ if (sender_z == receiver_z)
+ return TRUE
+ return sender_z in using_map.get_map_levels(receiver_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE)
// Proc: process()
// Parameters: None
@@ -371,4 +379,4 @@ var/global/list/obj/item/communicator/all_communicators = list()
/obj/item/communicator/rugged
desc = "The RB-65, voted most robust communicator 2566!"
icon_state = "commrugged"
- note = "Thank you for choosing the RB-65 Communicator, this is your notepad!" //Current note in the notepad function
\ No newline at end of file
+ note = "Thank you for choosing the RB-65 Communicator, this is your notepad!" //Current note in the notepad function
diff --git a/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm b/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm
index f9bfcb5364c..075b2770aa0 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/telecomms.dm
@@ -1,5 +1,5 @@
#ifndef T_BOARD
-#error T_BOARD macro is not defined but we need it!
+#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/circuitboard/comm_monitor
@@ -11,8 +11,3 @@
name = T_BOARD("telecommunications server monitor console")
build_path = /obj/machinery/computer/telecomms/server
origin_tech = list(TECH_DATA = 3)
-
-/obj/item/circuitboard/comm_traffic
- name = T_BOARD("telecommunications traffic control console")
- build_path = /obj/machinery/computer/telecomms/traffic
- origin_tech = list(TECH_DATA = 3)
diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm
index a3d89313c53..fd5999e36ee 100644
--- a/code/game/periodic_news.dm
+++ b/code/game/periodic_news.dm
@@ -107,7 +107,7 @@ var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluesp
/proc/process_newscaster()
check_for_newscaster_updates(ticker.mode.newscaster_announcements)
-var/global/tmp/announced_news_types = list()
+var/global/announced_news_types = list()
/proc/check_for_newscaster_updates(type)
for(var/subtype in typesof(type)-type)
var/datum/news_announcement/news = new subtype()
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 2b2b91ee7a7..7c6f27a19c0 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -34,7 +34,7 @@
var/block_tele = FALSE // If true, most forms of teleporting to or from this turf tile will fail.
var/can_build_into_floor = FALSE // Used for things like RCDs (and maybe lattices/floor tiles in the future), to see if a floor should replace it.
var/list/dangerous_objects // List of 'dangerous' objs that the turf holds that can cause something bad to happen when stepped on, used for AI mobs.
- var/tmp/changing_turf
+ var/changing_turf
/turf/Initialize(mapload)
. = ..()
diff --git a/code/modules/clothing/under/accessories/xeno/teshari.dm b/code/modules/clothing/under/accessories/xeno/teshari.dm
index 9156f184d3d..8a9cb210890 100644
--- a/code/modules/clothing/under/accessories/xeno/teshari.dm
+++ b/code/modules/clothing/under/accessories/xeno/teshari.dm
@@ -32,9 +32,9 @@
'sound/misc/dingaling3.ogg',
'sound/misc/dingaling4.ogg'
)
- var/tmp/dingaling_volume = 260
- var/tmp/dingaling_chance = 30
- var/tmp/dingaling_vary = FALSE
+ var/dingaling_volume = 260
+ var/dingaling_chance = 30
+ var/dingaling_vary = FALSE
/obj/item/clothing/accessory/teshtail/bells/is_mob_movement_sensitive()
return TRUE
@@ -83,4 +83,4 @@
/obj/item/clothing/accessory/teshtail/plumage
name = "artifical tailplume"
desc = "A set of tied together tail feathers for a teshari that has lost their real ones. Often used with prosthetic tails."
- icon_state = "tailplume"
\ No newline at end of file
+ icon_state = "tailplume"
diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm
index b7040258de6..b8267ae3472 100644
--- a/code/modules/events/electrical_storm.dm
+++ b/code/modules/events/electrical_storm.dm
@@ -3,8 +3,8 @@
startWhen = 30 // 1 minute
endWhen = 60 // Set in setup()
has_skybox_image = TRUE
- var/tmp/lightning_color
- var/tmp/list/valid_apcs // List of valid APCs.
+ var/lightning_color
+ var/list/valid_apcs // List of valid APCs.
/datum/event/electrical_storm/get_skybox_image()
if(!lightning_color)
@@ -62,4 +62,4 @@
// Overmap version
/datum/event/electrical_storm/overmap/announce()
- return
\ No newline at end of file
+ return
diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm
index 2a9fe3d2054..36d87e9d600 100644
--- a/code/modules/food/kitchen/cooking_machines/_appliance.dm
+++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm
@@ -2,7 +2,7 @@
// Tracks precooked food to stop deep fried baked grilled grilled grilled Diona nymph cereal.
/obj/item/reagent_containers/food/snacks
- var/tmp/list/cooked = list()
+ var/list/cooked = list()
// Root type for cooking machines. See following files for specific implementations.
/obj/machinery/appliance
diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm
index ec72e529029..d8aa4f435e5 100644
--- a/code/modules/lighting/lighting_source.dm
+++ b/code/modules/lighting/lighting_source.dm
@@ -17,9 +17,9 @@ var/global/total_lighting_sources = 0
var/lum_b
// The lumcount values used to apply the light.
- var/tmp/applied_lum_r
- var/tmp/applied_lum_g
- var/tmp/applied_lum_b
+ var/applied_lum_r
+ var/applied_lum_g
+ var/applied_lum_b
var/list/datum/lighting_corner/effect_str // List used to store how much we're affecting corners.
var/list/turf/affecting_turfs
diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm
index dcd8b902af7..58dcbb598b8 100644
--- a/code/modules/lighting/lighting_turf.dm
+++ b/code/modules/lighting/lighting_turf.dm
@@ -2,12 +2,12 @@
var/dynamic_lighting = TRUE // Does the turf use dynamic lighting?
luminosity = 1
- var/tmp/lighting_corners_initialised = FALSE
+ var/lighting_corners_initialised = FALSE
- var/tmp/list/datum/light_source/affecting_lights // List of light sources affecting this turf.
- var/tmp/atom/movable/lighting_overlay/lighting_overlay // Our lighting overlay.
- var/tmp/list/datum/lighting_corner/corners
- var/tmp/has_opaque_atom = FALSE // Not to be confused with opacity, this will be TRUE if there's any opaque atom on the tile.
+ var/list/datum/light_source/affecting_lights // List of light sources affecting this turf.
+ var/atom/movable/lighting_overlay/lighting_overlay // Our lighting overlay.
+ var/list/datum/lighting_corner/corners
+ var/has_opaque_atom = FALSE // Not to be confused with opacity, this will be TRUE if there's any opaque atom on the tile.
// Causes any affecting light sources to be queued for a visibility update, for example a door got opened.
/turf/proc/reconsider_lights()
diff --git a/code/modules/maps/swapmaps.dm b/code/modules/maps/swapmaps.dm
index 9ff14e5505d..7a52fab5b11 100644
--- a/code/modules/maps/swapmaps.dm
+++ b/code/modules/maps/swapmaps.dm
@@ -134,8 +134,8 @@ swapmap
var/x2 // maximum x,y,z coords (also used as width,height,depth until positioned)
var/y2
var/z2
- var/tmp/locked // don't move anyone to this map; it's saving or loading
- var/tmp/mode // save as text-mode
+ var/locked // don't move anyone to this map; it's saving or loading
+ var/mode // save as text-mode
var/ischunk // tells the load routine to load to the specified location
New(_id,x,y,z)
diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm
index db4c8dd97db..9dc8e7de9a4 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm
@@ -24,10 +24,10 @@
var/has_had_player = FALSE
var/const/platform_respawn_time = 3 MINUTES
- var/tmp/last_recharge_state = FALSE
- var/tmp/recharge_complete = FALSE
- var/tmp/recharger_charge_amount = 10 KILOWATTS
- var/tmp/recharger_tick_cost = 80 KILOWATTS
+ var/last_recharge_state = FALSE
+ var/recharge_complete = FALSE
+ var/recharger_charge_amount = 10 KILOWATTS
+ var/recharger_tick_cost = 80 KILOWATTS
var/weakref/recharging
/mob/living/silicon/robot/platform/Login()
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm
index 5aebefb2cae..bb00010ae61 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm
@@ -73,12 +73,12 @@ You can eat glowing tree fruit to fuel your ranged spitting attack and node represents an if statement in the
- script's source code. Because it is a representation of the source code in memory, it is independent of any specific scripting language.
- This allows a script in any language for which a parser exists to be run by the interpreter.
-
- The AST is produced by an object. It consists of a with an arbitrary amount of statements. These statements are
- run in order by an object. A statement may in turn run another block (such as an if statement might if its condition is
- met).
-
- Articles:
- -
-*/
-
-/*
- Constants: Operator Precedence
- OOP_OR - Logical or
- OOP_AND - Logical and
- OOP_BIT - Bitwise operations
- OOP_EQUAL - Equality checks
- OOP_COMPARE - Greater than, less then, etc
- OOP_ADD - Addition and subtraction
- OOP_MULTIPLY - Multiplication and division
- OOP_POW - Exponents
- OOP_UNARY - Unary Operators
- OOP_GROUP - Parentheses
-*/
-var/global/const/OOP_OR = 1 //||
-var/global/const/OOP_AND = OOP_OR + 1 //&&
-var/global/const/OOP_BIT = OOP_AND + 1 //&, |
-var/global/const/OOP_EQUAL = OOP_BIT + 1 //==, !=
-var/global/const/OOP_COMPARE = OOP_EQUAL + 1 //>, <, >=, <=
-var/global/const/OOP_ADD = OOP_COMPARE + 1 //+, -
-var/global/const/OOP_MULTIPLY= OOP_ADD + 1 //*, /, %
-var/global/const/OOP_POW = OOP_MULTIPLY+ 1 //^
-var/global/const/OOP_UNARY = OOP_POW + 1 //!
-var/global/const/OOP_GROUP = OOP_UNARY + 1 //()
-
-/*
- Class: node
-*/
-/node/proc/ToString()
- return "[src.type]"
-/*
- Class: identifier
-*/
-/node/identifier
- var/id_name
-
-/node/identifier/New(id)
- .=..()
- src.id_name=id
-
-/node/identifier/ToString()
- return id_name
-
-/*
- Class: expression
-*/
-/node/expression
-/*
- Class: operator
- See and for subtypes.
-*/
-/node/expression/operator_node
- var/node/expression/exp
- var/tmp/name
- var/tmp/precedence
-
-/node/expression/operator_node/New()
- .=..()
- if(!src.name) src.name="[src.type]"
-
-/node/expression/operator_node/ToString()
- return "operator: [name]"
-
-/*
- Class: FunctionCall
-*/
-/node/expression/FunctionCall
- //Function calls can also be expressions or statements.
- var/func_name
- var/node/identifier/object
- var/list/parameters = list()
-
-/*
- Class: literal
-*/
-/node/expression/value/literal
- var/value
-
-/node/expression/value/literal/New(value)
- .=..()
- src.value=value
-
-/node/expression/value/literal/ToString()
- return src.value
-
-/*
- Class: variable
-*/
-/node/expression/value/variable
- var/node/object //Either a node/identifier or another node/expression/value/variable which points to the object
- var/node/identifier/id
-
-
-/node/expression/value/variable/New(ident)
- .=..()
- id=ident
- if(istext(id))id=new(id)
-
-/node/expression/value/variable/ToString()
- return src.id.ToString()
-
-/*
- Class: reference
-*/
-/node/expression/value/reference
- var/datum/value
-
-/node/expression/value/reference/New(value)
- .=..()
- src.value=value
-
-/node/expression/value/reference/ToString()
- return "ref: [src.value] ([src.value.type])"
diff --git a/code/modules/scripting/AST/Blocks.dm b/code/modules/scripting/AST/Blocks.dm
deleted file mode 100644
index c992d7b4fa1..00000000000
--- a/code/modules/scripting/AST/Blocks.dm
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- File: Block Types
-*/
-/*
- Class: BlockDefinition
- An object representing a set of actions to perform independently from the rest of the script. Blocks are basically just
- lists of statements to execute which also contain some local variables and methods. Note that since functions are local to a block,
- it is possible to have a function definition inside of any type of block (such as in an if statement or another function),
- and not just in the global scope as in many languages.
-*/
-/node/BlockDefinition
- var/list/statements = list()
- var/list/functions = list()
- var/list/initial_variables = list()
-
-/*
- Proc: SetVar
- Defines a permanent variable. The variable will not be deleted when it goes out of scope.
-
- Notes:
- Since all pre-existing temporary variables are deleted, it is not generally desirable to use this proc after the interpreter has been instantiated.
- Instead, use .
-
- See Also:
- -
-*/
-/node/BlockDefinition/proc/SetVar(name, value)
- initial_variables[name]=value
-
-
-/*
- Class: GlobalBlock
- A block object representing the global scope.
-*/
-//
-/node/BlockDefinition/GlobalBlock/New()
- initial_variables["null"]=null
- return ..()
-
-/*
- Class: FunctionBlock
- A block representing a function body.
-*/
-//
-/node/BlockDefinition/FunctionBlock
\ No newline at end of file
diff --git a/code/modules/scripting/AST/Operators/Binary Operators.dm b/code/modules/scripting/AST/Operators/Binary Operators.dm
deleted file mode 100644
index d53407d3ff4..00000000000
--- a/code/modules/scripting/AST/Operators/Binary Operators.dm
+++ /dev/null
@@ -1,174 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
-
-/*
- File: Binary Operators
-*/
-/*
- Class: binary
- Represents a binary operator in the AST. A binary operator takes two operands (ie x and y) and returns a value.
-*/
-/node/expression/operator_node/binary
- var/node/expression/exp2
-
-////////// Comparison Operators //////////
-/*
- Class: Equal
- Returns true if x = y.
-*/
-//
-/node/expression/operator_node/binary/Equal
- precedence=OOP_EQUAL
-
-/*
- Class: NotEqual
- Returns true if x and y aren't equal.
-*/
-//
-/node/expression/operator_node/binary/NotEqual
- precedence=OOP_EQUAL
-
-/*
- Class: Greater
- Returns true if x > y.
-*/
-//
-/node/expression/operator_node/binary/Greater
- precedence=OOP_COMPARE
-
-/*
- Class: Less
- Returns true if x < y.
-*/
-//
-/node/expression/operator_node/binary/Less
- precedence=OOP_COMPARE
-
-/*
- Class: GreaterOrEqual
- Returns true if x >= y.
-*/
-//
-/node/expression/operator_node/binary/GreaterOrEqual
- precedence=OOP_COMPARE
-
-/*
- Class: LessOrEqual
- Returns true if x <= y.
-*/
-//
-/node/expression/operator_node/binary/LessOrEqual
- precedence=OOP_COMPARE
-
-
-////////// Logical Operators //////////
-
-/*
- Class: LogicalAnd
- Returns true if x and y are true.
-*/
-//
-/node/expression/operator_node/binary/LogicalAnd
- precedence=OOP_AND
-
-/*
- Class: LogicalOr
- Returns true if x, y, or both are true.
-*/
-//
-/node/expression/operator_node/binary/LogicalOr
- precedence=OOP_OR
-
-/*
- Class: LogicalXor
- Returns true if either x or y but not both are true.
-*/
-//
-/node/expression/operator_node/binary/LogicalXor //Not implemented in nS
- precedence=OOP_OR
-
-
-////////// Bitwise Operators //////////
-
-/*
- Class: BitwiseAnd
- Performs a bitwise and operation.
-
- Example:
- 011 & 110 = 010
-*/
-//
-/node/expression/operator_node/binary/BitwiseAnd
- precedence=OOP_BIT
-
-/*
- Class: BitwiseOr
- Performs a bitwise or operation.
-
- Example:
- 011 | 110 = 111
-*/
-//
-/node/expression/operator_node/binary/BitwiseOr
- precedence=OOP_BIT
-
-/*
- Class: BitwiseXor
- Performs a bitwise exclusive or operation.
-
- Example:
- 011 xor 110 = 101
-*/
-//
-/node/expression/operator_node/binary/BitwiseXor
- precedence=OOP_BIT
-
-
-////////// Arithmetic Operators //////////
-
-/*
- Class: Add
- Returns the sum of x and y.
-*/
-//
-/node/expression/operator_node/binary/Add
- precedence=OOP_ADD
-
-/*
- Class: Subtract
- Returns the difference of x and y.
-*/
-//
-/node/expression/operator_node/binary/Subtract
- precedence=OOP_ADD
-
-/*
- Class: Multiply
- Returns the product of x and y.
-*/
-//
-/node/expression/operator_node/binary/Multiply
- precedence=OOP_MULTIPLY
-
-/*
- Class: Divide
- Returns the quotient of x and y.
-*/
-//
-/node/expression/operator_node/binary/Divide
- precedence=OOP_MULTIPLY
-
-/*
- Class: Power
- Returns x raised to the power of y.
-*/
-//
-/node/expression/operator_node/binary/Power
- precedence=OOP_POW
-
-/*
- Class: Modulo
- Returns the remainder of x / y.
-*/
-//
-/node/expression/operator_node/binary/Modulo
- precedence=OOP_MULTIPLY
diff --git a/code/modules/scripting/AST/Operators/Unary Operators.dm b/code/modules/scripting/AST/Operators/Unary Operators.dm
deleted file mode 100644
index 762e1a724de..00000000000
--- a/code/modules/scripting/AST/Operators/Unary Operators.dm
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- File: Unary Operators
-*/
-/*
- Class: unary
- Represents a unary operator in the AST. Unary operators take a single operand (referred to as x below) and return a value.
-*/
-/node/expression/operator_node/unary
- precedence=OOP_UNARY
-
-/*
- Class: LogicalNot
- Returns !x.
-
- Example:
- !true = false and !false = true
-*/
-//
-/node/expression/operator_node/unary/LogicalNot
- name="logical not"
-
-/*
- Class: BitwiseNot
- Returns the value of a bitwise not operation performed on x.
-
- Example:
- ~10 (decimal 2) = 01 (decimal 1).
-*/
-//
-/node/expression/operator_node/unary/BitwiseNot
- name="bitwise not"
-
-/*
- Class: Minus
- Returns -x.
-*/
-//
-/node/expression/operator_node/unary/Minus
- name="minus"
-
-/*
- Class: group
- A special unary operator representing a value in parentheses.
-*/
-//
-/node/expression/operator_node/unary/group
- precedence=OOP_GROUP
-
-/node/expression/operator_node/unary/New(node/expression/exp)
- src.exp=exp
- return ..()
diff --git a/code/modules/scripting/AST/Statements.dm b/code/modules/scripting/AST/Statements.dm
deleted file mode 100644
index eba7b71ae5e..00000000000
--- a/code/modules/scripting/AST/Statements.dm
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- File: Statement Types
-*/
-/*
- Class: statement
- An object representing a single instruction run by an interpreter.
-*/
-/node/statement
-/*
- Class: FunctionCall
- Represents a call to a function.
-*/
-//
-/node/statement/FunctionCall
- var/func_name
- var/node/identifier/object
- var/list/parameters=list()
-
-/*
- Class: FunctionDefinition
- Defines a function.
-*/
-//
-/node/statement/FunctionDefinition
- var/func_name
- var/list/parameters=list()
- var/node/BlockDefinition/FunctionBlock/block
-
-/*
- Class: VariableAssignment
- Sets a variable in an accessible scope to the given value if one exists, otherwise initializes a new local variable to the given value.
-
- Notes:
- If a variable with the same name exists in a higher block, the value will be assigned to it. If not,
- a new variable is created in the current block. To force creation of a new variable, use .
-
- See Also:
- -
-*/
-//
-/node/statement/VariableAssignment
- var/node/identifier/object
- var/node/identifier/var_name
- var/node/expression/value
-
-/*
- Class: VariableDeclaration
- Intializes a local variable to a null value.
-
- See Also:
- -
-*/
-//
-/node/statement/VariableDeclaration
- var/node/identifier/object
- var/node/identifier/var_name
-
-/*
- Class: IfStatement
-*/
-//
-/node/statement/IfStatement
- var/node/BlockDefinition/block
- var/node/BlockDefinition/else_block // may be null
- var/node/expression/cond
-
-/*
- Class: WhileLoop
- Loops while a given condition is true.
-*/
-//
-/node/statement/WhileLoop
- var/node/BlockDefinition/block
- var/node/expression/cond
-
-/*
- Class: ForLoop
- Loops while test is true, initializing a variable, increasing the variable
-*/
-/node/statement/ForLoop
- var/node/BlockDefinition/block
- var/node/expression/test
- var/node/expression/init
- var/node/expression/increment
-
-/*
- Class: BreakStatement
- Ends a loop.
-*/
-//
-/node/statement/BreakStatement
-
-/*
- Class: ContinueStatement
- Skips to the next iteration of a loop.
-*/
-//
-/node/statement/ContinueStatement
-
-/*
- Class: ReturnStatement
- Ends the function and returns a value.
-*/
-//
-/node/statement/ReturnStatement
- var/node/expression/value
\ No newline at end of file
diff --git a/code/modules/scripting/Errors.dm b/code/modules/scripting/Errors.dm
deleted file mode 100644
index 8a47bf1c28f..00000000000
--- a/code/modules/scripting/Errors.dm
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- File: Errors
-*/
-/*
- Class: scriptError
- An error scanning or parsing the source code.
-*/
-/scriptError
- var/message /// A message describing the problem.
-/scriptError/New(msg=null)
- if(msg)message=msg
-
-/scriptError/BadToken
- message="Unexpected token: "
- var/token/token
-/scriptError/BadToken/New(token/t)
- token=t
- if(t&&t.line) message="[t.line]: [message]"
- if(istype(t))message+="[t.value]"
- else message+="[t]"
-
-/scriptError/InvalidID
- parent_type=/scriptError/BadToken
- message="Invalid identifier name: "
-
-/scriptError/ReservedWord
- parent_type=/scriptError/BadToken
- message="Identifer using reserved word: "
-
-/scriptError/BadNumber
- parent_type=/scriptError/BadToken
- message = "Bad number: "
-
-/scriptError/BadReturn
- var/token/token
- message = "Unexpected return statement outside of a function."
-/scriptError/BadReturn/New(token/t)
- src.token=t
-
-/scriptError/EndOfFile
- message = "Unexpected end of file."
-
-/scriptError/ExpectedToken
- message="Expected: '"
-/scriptError/ExpectedToken/New(id, token/T)
- if(T && T.line) message="[T.line]: [message]"
- message+="[id]'. "
- if(T)message+="Found '[T.value]'."
-
-
-/scriptError/UnterminatedComment
- message="Unterminated multi-line comment statement: expected */"
-
-/scriptError/DuplicateFunction
- message="Function defined twice."
-/scriptError/DuplicateFunction/New(name, token/t)
- message="Function '[name]' defined twice."
-
-/*
- Class: runtimeError
- An error thrown by the interpreter in running the script.
-*/
-/runtimeError
- var/name
- var/message /// A basic description as to what went wrong.
- var/stack/stack
-
-/**
- * Proc: ToString
- * Returns a description of the error suitable for showing to the user.
- */
-/runtimeError/proc/ToString()
- . = "[name]: [message]"
- if(!stack.Top()) return
- .+="\nStack:"
- while(stack.Top())
- var/node/statement/FunctionCall/stmt=stack.Pop()
- . += "\n\t [stmt.func_name]()"
-
-/runtimeError/TypeMismatch
- name="TypeMismatchError"
-/runtimeError/TypeMismatch/New(op, a, b)
- message="Type mismatch: '[a]' [op] '[b]'"
-
-/runtimeError/UnexpectedReturn
- name="UnexpectedReturnError"
- message="Unexpected return statement."
-
-/runtimeError/UnknownInstruction
- name="UnknownInstructionError"
- message="Unknown instruction type. This may be due to incompatible compiler and interpreter versions or a lack of implementation."
-
-/runtimeError/UndefinedVariable
- name="UndefinedVariableError"
-/runtimeError/UndefinedVariable/New(variable)
- message="Variable '[variable]' has not been declared."
-
-/runtimeError/UndefinedFunction
- name="UndefinedFunctionError"
-/runtimeError/UndefinedFunction/New(function)
- message="Function '[function]()' has not been defined."
-
-/runtimeError/DuplicateVariableDeclaration
- name="DuplicateVariableError"
-/runtimeError/DuplicateVariableDeclaration/New(variable)
- message="Variable '[variable]' was already declared."
-
-/runtimeError/IterationLimitReached
- name="MaxIterationError"
- message="A loop has reached its maximum number of iterations."
-
-/runtimeError/RecursionLimitReached
- name="MaxRecursionError"
- message="The maximum amount of recursion has been reached."
-
-/runtimeError/DivisionByZero
- name="DivideByZeroError"
- message="Division by zero attempted."
-
-/runtimeError/MaxCPU
- name="MaxComputationalUse"
- message="Maximum amount of computational cycles reached (>= 1000)."
\ No newline at end of file
diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm
deleted file mode 100644
index 5b6ea4daf0c..00000000000
--- a/code/modules/scripting/IDE.dm
+++ /dev/null
@@ -1,211 +0,0 @@
-/client/verb/tcssave()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || issilicon(mob))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode != mob)
- return
-
- if(Machine.SelectedServer)
- var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
- var/tcscode=winget(src, "tcscode", "text")
- var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
- log_misc(msg)
- message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)",0,1)
- Server.setcode( tcscode ) // this actually saves the code from input to the server
- src << output(null, "tcserror") // clear the errors
- else
- src << output(null, "tcserror")
- src << output("Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
-
-
-/client/verb/tcscompile()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode != mob)
- return
-
- if(Machine.SelectedServer)
- var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
- Server.setcode( winget(src, "tcscode", "text") ) // save code first
- var/list/compileerrors = Server.compile() // then compile the code!
-
- // Output all the compile-time errors
- src << output(null, "tcserror")
-
- if(compileerrors.len)
- src << output("Compile Errors", "tcserror")
- for(var/scriptError/e in compileerrors)
- src << output("\t>[e.message]", "tcserror")
- src << output("([compileerrors.len] errors)", "tcserror")
-
- // Output compile errors to all other people viewing the code too
- for(var/mob/M in Machine.viewingcode)
- if(M.client)
- M << output(null, "tcserror")
- M << output("Compile Errors", "tcserror")
- for(var/scriptError/e in compileerrors)
- M << output("\t>[e.message]", "tcserror")
- M << output("([compileerrors.len] errors)", "tcserror")
-
-
- else
- src << output("TCS compilation successful!", "tcserror")
- src << output("(0 errors)", "tcserror")
-
- for(var/mob/M in Machine.viewingcode)
- if(M.client)
- M << output("TCS compilation successful!", "tcserror")
- M << output("(0 errors)", "tcserror")
-
- else
- src << output(null, "tcserror")
- src << output("Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
-
-/client/verb/tcsrun()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode != mob)
- return
-
- if(Machine.SelectedServer)
- var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
- Server.setcode( winget(src, "tcscode", "text") ) // save code first
- var/list/compileerrors = Server.compile() // then compile the code!
-
- // Output all the compile-time errors
- src << output(null, "tcserror")
-
- if(compileerrors.len)
- src << output("Compile Errors", "tcserror")
- for(var/scriptError/e in compileerrors)
- src << output("\t>[e.message]", "tcserror")
- src << output("([compileerrors.len] errors)", "tcserror")
-
- // Output compile errors to all other people viewing the code too
- for(var/mob/M in Machine.viewingcode)
- if(M.client)
- M << output(null, "tcserror")
- M << output("Compile Errors", "tcserror")
- for(var/scriptError/e in compileerrors)
- M << output("\t>[e.message]", "tcserror")
- M << output("([compileerrors.len] errors)", "tcserror")
-
- else
- // Finally, we run the code!
- src << output("TCS compilation successful! Code executed.", "tcserror")
- src << output("(0 errors)", "tcserror")
-
- for(var/mob/M in Machine.viewingcode)
- if(M.client)
- M << output("TCS compilation successful!", "tcserror")
- M << output("(0 errors)", "tcserror")
-
- var/datum/signal/signal = new()
- signal.data["message"] = ""
- if(Server.freq_listening.len > 0)
- signal.frequency = Server.freq_listening[1]
- else
- signal.frequency = PUB_FREQ
- signal.data["name"] = ""
- signal.data["job"] = ""
- signal.data["reject"] = 0
- signal.data["server"] = Server
-
- Server.Compiler.Run(signal)
-
-
- else
- src << output(null, "tcserror")
- src << output("Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror")
-
-
-/client/verb/exittcs()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode == mob)
- Machine.storedcode = "[winget(mob, "tcscode", "text")]"
- Machine.editingcode = null
- else
- if(mob in Machine.viewingcode)
- Machine.viewingcode.Remove(mob)
-
-/client/verb/tcsrevert()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode != mob)
- return
-
- if(Machine.SelectedServer)
- var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
-
- // Replace quotation marks with quotation macros for proper winset() compatibility
- var/showcode = replacetext(Server.rawcode, "\\\"", "\\\\\"")
- showcode = replacetext(showcode, "\"", "\\\"")
-
- winset(mob, "tcscode", "text=\"[showcode]\"")
-
- src << output(null, "tcserror") // clear the errors
- else
- src << output(null, "tcserror")
- src << output("Failed to revert: Unable to locate server machine.", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to revert: Unable to locate machine.", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to revert: Unable to locate machine.", "tcserror")
-
-
-/client/verb/tcsclearmem()
- set hidden = 1
- if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob))) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
- var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
- if(Machine.editingcode != mob)
- return
-
- if(Machine.SelectedServer)
- var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
- Server.memory = list() // clear the memory
- // Show results
- src << output(null, "tcserror")
- src << output("Server memory cleared!", "tcserror")
- for(var/mob/M in Machine.viewingcode)
- if(M.client)
- M << output("Server memory cleared!", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to clear memory: Unable to locate server machine.", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to clear memory: Unable to locate machine.", "tcserror")
- else
- src << output(null, "tcserror")
- src << output("Failed to clear memory: Unable to locate machine.", "tcserror")
diff --git a/code/modules/scripting/Implementations/Telecomms.dm b/code/modules/scripting/Implementations/Telecomms.dm
deleted file mode 100644
index 4e19ac12e33..00000000000
--- a/code/modules/scripting/Implementations/Telecomms.dm
+++ /dev/null
@@ -1,281 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
-
-
-/* --- Traffic Control Scripting Language --- */
- // NanoTrasen TCS Language - Made by Doohl
-
-/n_Interpreter/TCS_Interpreter
- var/datum/TCS_Compiler/Compiler
-
-/n_Interpreter/TCS_Interpreter/HandleError(runtimeError/e)
- Compiler.Holder.add_entry(e.ToString(), "Execution Error")
-
-/datum/TCS_Compiler
- var/n_Interpreter/TCS_Interpreter/interpreter
- var/obj/machinery/telecomms/server/Holder // the server that is running the code
- var/ready = 1 // 1 if ready to run code
-
- /** Proc: Compile
- * Compile a raw block of text into a program
- * Returns: List of errors
- */
-
-/datum/TCS_Compiler/proc/Compile(code as message)
- var/n_scriptOptions/nS_Options/options = new()
- var/n_Scanner/nS_Scanner/scanner = new(code, options)
- var/list/tokens = scanner.Scan()
- var/n_Parser/nS_Parser/parser = new(tokens, options)
- var/node/BlockDefinition/GlobalBlock/program = parser.Parse()
-
- var/list/returnerrors = list()
-
- returnerrors += scanner.errors
- returnerrors += parser.errors
-
- if(returnerrors.len)
- return returnerrors
-
- interpreter = new(program)
- interpreter.persist = 1
- interpreter.Compiler= src
-
- return returnerrors
-
- /* -- Execute the compiled code -- */
-/** Proc: Run
- * Executes the compiled code.
- * Arguments:
- * var/datum/signal/signal - a telecomms signal
- * Returns: None
- */
-/datum/TCS_Compiler/proc/Run(var/datum/signal/signal)
-
- if(!ready)
- return
-
- if(!interpreter)
- return
-
- interpreter.container = src
-
- interpreter.SetVar("PI" , 3.141592653) // value of pi
- interpreter.SetVar("E" , 2.718281828) // value of e
- interpreter.SetVar("SQURT2" , 1.414213562) // value of the square root of 2
- interpreter.SetVar("FALSE" , 0) // boolean shortcut to 0
- interpreter.SetVar("TRUE" , 1) // boolean shortcut to 1
-
- interpreter.SetVar("NORTH" , NORTH) // NORTH (1)
- interpreter.SetVar("SOUTH" , SOUTH) // SOUTH (2)
- interpreter.SetVar("EAST" , EAST) // EAST (4)
- interpreter.SetVar("WEST" , WEST) // WEST (8)
-
- // Channel macros
- interpreter.SetVar("$common", PUB_FREQ)
- interpreter.SetVar("$science", SCI_FREQ)
- interpreter.SetVar("$command", COMM_FREQ)
- interpreter.SetVar("$medical", MED_FREQ)
- interpreter.SetVar("$engineering",ENG_FREQ)
- interpreter.SetVar("$security", SEC_FREQ)
- interpreter.SetVar("$supply", SUP_FREQ)
- interpreter.SetVar("$explorer", EXP_FREQ)
-
- // Signal data
-
- interpreter.SetVar("$content", signal.data["message"])
- interpreter.SetVar("$freq" , signal.frequency)
- interpreter.SetVar("$source" , signal.data["name"])
- interpreter.SetVar("$job" , signal.data["job"])
- interpreter.SetVar("$sign" , signal)
- interpreter.SetVar("$pass" , !(signal.data["reject"])) // if the signal isn't rejected, pass = 1; if the signal IS rejected, pass = 0
-
- // Set up the script procs
-
- /*
- -> Send another signal to a server
- @format: broadcast(content, frequency, source, job)
-
- @param content: Message to broadcast
- @param frequency: Frequency to broadcast to
- @param source: The name of the source you wish to imitate. Must be stored in stored_names list.
- @param job: The name of the job.
- */
- interpreter.SetProc("broadcast", "tcombroadcast", signal, list("message", "freq", "source", "job"))
-
- /*
- -> Store a value permanently to the server machine (not the actual game hosting machine, the ingame machine)
- @format: mem(address, value)
-
- @param address: The memory address (string index) to store a value to
- @param value: The value to store to the memory address
- */
- interpreter.SetProc("mem", "mem", signal, list("address", "value"))
-
- /*
- -> Delay code for a given amount of deciseconds
- @format: sleep(time)
-
- @param time: time to sleep in deciseconds (1/10th second)
- */
- interpreter.SetProc("sleep", /proc/delay)
-
- /*
- -> Replaces a string with another string
- @format: replace(string, substring, replacestring)
-
- @param string: the string to search for substrings (best used with $content$ constant)
- @param substring: the substring to search for
- @param replacestring: the string to replace the substring with
-
- */
- interpreter.SetProc("replace", /proc/string_replacetext)
-
- /*
- -> Locates an element/substring inside of a list or string
- @format: find(haystack, needle, start = 1, end = 0)
-
- @param haystack: the container to search
- @param needle: the element to search for
- @param start: the position to start in
- @param end: the position to end in
-
- */
- interpreter.SetProc("find", /proc/smartfind)
-
- /*
- -> Finds the length of a string or list
- @format: length(container)
-
- @param container: the list or container to measure
-
- */
- interpreter.SetProc("length", /proc/smartlength)
-
- /* -- Clone functions, carried from default BYOND procs --- */
-
- // vector namespace
- interpreter.SetProc("vector", /proc/n_list)
- interpreter.SetProc("at", /proc/n_listpos)
- interpreter.SetProc("copy", /proc/n_listcopy)
- interpreter.SetProc("push_back", /proc/n_listadd)
- interpreter.SetProc("remove", /proc/n_listremove)
- interpreter.SetProc("cut", /proc/n_listcut)
- interpreter.SetProc("swap", /proc/n_listswap)
- interpreter.SetProc("insert", /proc/n_listinsert)
-
- interpreter.SetProc("pick", /proc/n_pick)
- interpreter.SetProc("prob", /proc/prob_chance)
- interpreter.SetProc("substr", /proc/docopytext)
-
- // Donkie~
- // Strings
- interpreter.SetProc("lower", /proc/n_lower)
- interpreter.SetProc("upper", /proc/n_upper)
- interpreter.SetProc("explode", /proc/string_explode)
- interpreter.SetProc("repeat", /proc/n_repeat)
- interpreter.SetProc("reverse", /proc/n_reverse)
- interpreter.SetProc("tonum", /proc/n_str2num)
-
- // Numbers
- interpreter.SetProc("tostring", /proc/n_num2str)
- interpreter.SetProc("sqrt", /proc/n_sqrt)
- interpreter.SetProc("abs", /proc/n_abs)
- interpreter.SetProc("floor", /proc/n_floor)
- interpreter.SetProc("ceil", /proc/n_ceil)
- interpreter.SetProc("round", /proc/n_round)
- interpreter.SetProc("clamp", /proc/n_clamp)
- interpreter.SetProc("inrange", /proc/n_inrange)
- // End of Donkie~
-
-
- // Run the compiled code
- interpreter.Run()
-
- // Backwards-apply variables onto signal data
- /* sanitize EVERYTHING. fucking players can't be trusted with SHIT */
-
- signal.data["message"] = interpreter.GetVar("$content")
- signal.frequency = interpreter.GetVar("$freq")
-
- var/setname = ""
- var/obj/machinery/telecomms/server/S = signal.data["server"]
- if(interpreter.GetVar("$source") in S.stored_names)
- setname = interpreter.GetVar("$source")
- else
- setname = "[interpreter.GetVar("$source")]"
-
- if(signal.data["name"] != setname)
- signal.data["realname"] = setname
- signal.data["name"] = setname
- signal.data["job"] = interpreter.GetVar("$job")
- signal.data["reject"] = !(interpreter.GetVar("$pass")) // set reject to the opposite of $pass
-
- // If the message is invalid, just don't broadcast it!
- if(signal.data["message"] == "" || !signal.data["message"])
- signal.data["reject"] = 1
-
-/* -- Actual language proc code -- */
-
-/datum/signal/proc/mem(var/address, var/value)
-
- if(istext(address))
- var/obj/machinery/telecomms/server/S = data["server"]
-
- if(!value && value != 0)
- return S.memory[address]
-
- else
- S.memory[address] = value
-
-
-/datum/signal/proc/tcombroadcast(var/message, var/freq, var/source, var/job)
-
- var/datum/signal/newsign = new
- var/obj/machinery/telecomms/server/S = data["server"]
- var/obj/item/radio/hradio = S.server_radio
-
- if(!hradio)
- error("[src] has no radio.")
- return
-
- if((!message || message == "") && message != 0)
- message = "*beep*"
- if(!source)
- source = "[html_encode(uppertext(S.id))]"
- hradio = new // sets the hradio as a radio intercom
- if(!freq)
- freq = PUB_FREQ
- if(findtext(num2text(freq), ".")) // if the frequency has been set as a decimal
- freq *= 10 // shift the decimal one place
-
- if(!job)
- job = "?"
-
- newsign.data["mob"] = null
- newsign.data["mobtype"] = /mob/living/carbon/human
- if(source in S.stored_names)
- newsign.data["name"] = source
- else
- newsign.data["name"] = "[html_encode(uppertext(source))]"
- newsign.data["realname"] = newsign.data["name"]
- newsign.data["job"] = job
- newsign.data["compression"] = 0
- newsign.data["message"] = message
- newsign.data["type"] = 2 // artificial broadcast
- if(!isnum(freq))
- freq = text2num(freq)
- newsign.frequency = freq
-
- var/datum/radio_frequency/connection = radio_controller.return_frequency(freq)
- newsign.data["connection"] = connection
-
-
- newsign.data["radio"] = hradio
- newsign.data["vmessage"] = message
- newsign.data["vname"] = source
- newsign.data["vmask"] = 0
- newsign.data["level"] = list()
-
- var/pass = S.relay_information(newsign, /obj/machinery/telecomms/hub)
- if(!pass)
- S.relay_information(newsign, /obj/machinery/telecomms/broadcaster) // send this simple message to broadcasters
-
diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm
deleted file mode 100644
index 7139fe79304..00000000000
--- a/code/modules/scripting/Implementations/_Logic.dm
+++ /dev/null
@@ -1,291 +0,0 @@
-// Script -> BYOND code procs
-#define SCRIPT_MAX_REPLACEMENTS_ALLOWED 200
-// --- List operations (lists known as vectors in n_script) ---
-
-// Clone of list()
-/proc/n_list()
- var/list/returnlist = list()
- for(var/e in args)
- returnlist.Add(e)
- return returnlist
-
-// Clone of pick()
-/proc/n_pick()
- var/list/finalpick = list()
- for(var/e in args)
- if(isobject(e))
- if(istype(e, /list))
- var/list/sublist = e
- for(var/sube in sublist)
- finalpick.Add(sube)
- continue
- finalpick.Add(e)
-
- return pick(finalpick)
-
-// Clone of list[]
-/proc/n_listpos(var/list/L, var/pos, var/value)
- if(!istype(L, /list)) return
- if(isnum(pos))
- if(!value)
- if(L.len >= pos)
- return L[pos]
- else
- if(L.len >= pos)
- L[pos] = value
- else if(istext(pos))
- if(!value)
- return L[pos]
- else
- L[pos] = value
-
-// Clone of list.Copy()
-/proc/n_listcopy(var/list/L, var/start, var/end)
- if(!istype(L, /list)) return
- return L.Copy(start, end)
-
-// Clone of list.Add()
-/proc/n_listadd()
- var/list/chosenlist
- var/i = 1
- for(var/e in args)
- if(i == 1)
- if(isobject(e))
- if(istype(e, /list))
- chosenlist = e
- i = 2
- else
- if(chosenlist)
- chosenlist.Add(e)
-
-// Clone of list.Remove()
-/proc/n_listremove()
- var/list/chosenlist
- var/i = 1
- for(var/e in args)
- if(i == 1)
- if(isobject(e))
- if(istype(e, /list))
- chosenlist = e
- i = 2
- else
- if(chosenlist)
- chosenlist.Remove(e)
-
-// Clone of list.Cut()
-/proc/n_listcut(var/list/L, var/start, var/end)
- if(!istype(L, /list)) return
- return L.Cut(start, end)
-
-// Clone of list.Swap()
-/proc/n_listswap(var/list/L, var/firstindex, var/secondindex)
- if(!istype(L, /list)) return
- if(L.len >= secondindex && L.len >= firstindex)
- return L.Swap(firstindex, secondindex)
-
-// Clone of list.Insert()
-/proc/n_listinsert(var/list/L, var/index, var/element)
- if(!istype(L, /list)) return
- return L.Insert(index, element)
-
-// --- Miscellaneous functions ---
-
-// Clone of sleep()
-/proc/delay(var/time)
- sleep(time)
-
-// Clone of prob()
-/proc/prob_chance(var/chance)
- return prob(chance)
-
-// Merge of list.Find() and findtext()
-/proc/smartfind(var/haystack, var/needle, var/start = 1, var/end = 0)
- if(haystack && needle)
- if(isobject(haystack))
- if(istype(haystack, /list))
- if(length(haystack) >= end && start > 0)
- var/list/listhaystack = haystack
- return listhaystack.Find(needle, start, end)
-
- else
- if(istext(haystack))
- if(length(haystack) >= end && start > 0)
- return findtext(haystack, needle, start, end)
-
-// Clone of copytext()
-/proc/docopytext(var/string, var/start = 1, var/end = 0)
- if(istext(string) && isnum(start) && isnum(end))
- if(start > 0)
- return copytext(string, start, end)
-
-// Clone of length()
-/proc/smartlength(var/container)
- if(container)
- if(istype(container, /list) || istext(container))
- return length(container)
-
-// BY DONKIE~
-// String stuff
-/proc/n_lower(var/string)
- if(istext(string))
- return lowertext(string)
-
-/proc/n_upper(var/string)
- if(istext(string))
- return uppertext(string)
-
-/*
-//Makes a list where all indices in a string is a separate index in the list
-// JUST A HELPER DON'T ADD TO NTSCRIPT
-/proc/string_tolist(var/string)
- var/list/L = new/list()
-
- var/i
- for(i=1, i<=length(string), i++)
- L.Add(copytext(string, i, i))
-
- return L
-
-/proc/string_explode(var/string, var/separator)
- if(istext(string))
- if(istext(separator) && separator == "")
- return string_tolist(string)
- var/i
- var/lasti = 1
- var/list/L = new/list()
-
- for(i=1, i<=length(string)+1, i++)
- if(copytext(string, i, i+1) == separator) // We found a separator
- L.Add(copytext(string, lasti, i))
- lasti = i+1
-
- L.Add(copytext(string, lasti, length(string)+1)) // Adds the last segment
-
- return L
-
-Just found out there was already a string explode function, did some benchmarking, and that function were a bit faster, sticking to that.
-*/
-/proc/string_explode(var/string, var/separator)
- if(istext(string) && istext(separator))
- return splittext(string, separator)
-
-/proc/n_repeat(var/string, var/amount)
- if(istext(string) && isnum(amount))
- var/i
- var/newstring = ""
- if(length(newstring)*amount >=1000)
- return
- for(i=0, i<=amount, i++)
- if(i>=1000)
- break
- newstring = newstring + string
-
- return newstring
-
-/proc/n_reverse(var/string)
- if(istext(string))
- var/newstring = ""
- var/i
- for(i=length(string), i>0, i--)
- if(i>=1000)
- break
- newstring = newstring + copytext(string, i, i+1)
-
- return newstring
-
-// I don't know if it's necessary to make my own proc, but I think I have to to be able to check for istext.
-/proc/n_str2num(var/string)
- if(istext(string))
- return text2num(string)
-
-// Number shit
-/proc/n_num2str(var/num)
- if(isnum(num))
- return num2text(num)
-
-// Squareroot
-/proc/n_sqrt(var/num)
- if(isnum(num))
- return sqrt(num)
-
-// Magnitude of num
-/proc/n_abs(var/num)
- if(isnum(num))
- return abs(num)
-
-// Round down
-/proc/n_floor(var/num)
- if(isnum(num))
- return round(num)
-
-// Round up
-/proc/n_ceil(var/num)
- if(isnum(num))
- return round(num)+1
-
-// Round to nearest integer
-/proc/n_round(var/num)
- if(isnum(num))
- if(num-round(num)<0.5)
- return round(num)
- return n_ceil(num)
-
-// Clamps N between min and max
-/proc/n_clamp(var/num, var/min=-1, var/max=1)
- if(isnum(num)&&isnum(min)&&isnum(max))
- if(num<=min)
- return min
- if(num>=max)
- return max
- return num
-
-// Returns 1 if N is inbetween Min and Max
-/proc/n_inrange(var/num, var/min=-1, var/max=1)
- if(isnum(num)&&isnum(min)&&isnum(max))
- return ((min <= num) && (num <= max))
-// END OF BY DONKIE :(
-
-// Non-recursive
-// Imported from Mono string.ReplaceUnchecked
-/proc/string_replacetext(var/haystack,var/a,var/b)
- if(istext(haystack)&&istext(a)&&istext(b))
- var/i = 1
- var/lenh=length(haystack)
- var/lena=length(a)
- //var/lenb=length(b)
- var/count = 0
- var/list/dat = list()
- while (i < lenh)
- var/found = findtext(haystack, a, i, 0)
- //log_misc("findtext([haystack], [a], [i], 0)=[found]")
- if (found == 0) // Not found
- break
- else
- if (count < SCRIPT_MAX_REPLACEMENTS_ALLOWED)
- dat+=found
- count+=1
- else
- //log_misc("Script found [a] [count] times, aborted")
- break
- //log_misc("Found [a] at [found]! Moving up...")
- i = found + lena
- if (count == 0)
- return haystack
- //var/nlen = lenh + ((lenb - lena) * count)
- var/buf = copytext(haystack,1,dat[1]) // Prefill
- var/lastReadPos = 0
- for (i = 1, i <= count, i++)
- var/precopy = dat[i] - lastReadPos-1
- //internal static unsafe void CharCopy (String target, int targetIndex, String source, int sourceIndex, int count)
- //fixed (char* dest = target, src = source)
- //CharCopy (dest + targetIndex, src + sourceIndex, count);
- //CharCopy (dest + curPos, source + lastReadPos, precopy);
- buf+=copytext(haystack,lastReadPos,precopy)
- log_misc("buf+=copytext([haystack],[lastReadPos],[precopy])")
- log_misc("[buf]")
- lastReadPos = dat[i] + lena
- //CharCopy (dest + curPos, replace, newValue.length);
- buf+=b
- log_misc("[buf]")
- buf+=copytext(haystack,lastReadPos, 0)
- return buf
diff --git a/code/modules/scripting/Interpreter/Evaluation.dm b/code/modules/scripting/Interpreter/Evaluation.dm
deleted file mode 100644
index 8e07810b0fc..00000000000
--- a/code/modules/scripting/Interpreter/Evaluation.dm
+++ /dev/null
@@ -1,167 +0,0 @@
-/proc/isobject(x)
- return !(isnum(x) || istext(x))
-
-/n_Interpreter/proc/Eval(node/expression/exp)
- if(istype(exp, /node/expression/FunctionCall))
- return RunFunction(exp)
- else if(istype(exp, /node/expression/operator_node))
- return EvalOperator(exp)
- else if(istype(exp, /node/expression/value/literal))
- var/node/expression/value/literal/lit=exp
- return lit.value
- else if(istype(exp, /node/expression/value/reference))
- var/node/expression/value/reference/ref=exp
- return ref.value
- else if(istype(exp, /node/expression/value/variable))
- var/node/expression/value/variable/v=exp
- if(!v.object)
- return Eval(GetVariable(v.id.id_name))
- else
- var/datum/D
- if(istype(v.object, /node/identifier))
- D=GetVariable(v.object:id_name)
- else
- D=v.object
- D=Eval(D)
- if(!isobject(D))
- return null
- if(!D.vars.Find(v.id.id_name))
- RaiseError(new/runtimeError/UndefinedVariable("[v.object.ToString()].[v.id.id_name]"))
- return null
- return Eval(D.vars[v.id.id_name])
- else if(istype(exp, /node/expression))
- RaiseError(new/runtimeError/UnknownInstruction())
- else
- return exp
-
-/n_Interpreter/proc/EvalOperator(node/expression/operator_node/exp)
- if(istype(exp, /node/expression/operator_node/binary))
- var/node/expression/operator_node/binary/bin=exp
- switch(bin.type)
- if(/node/expression/operator_node/binary/Equal)
- return Equal(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/NotEqual)
- return NotEqual(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Greater)
- return Greater(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Less)
- return Less(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/GreaterOrEqual)
- return GreaterOrEqual(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/LessOrEqual)
- return LessOrEqual(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/LogicalAnd)
- return LogicalAnd(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/LogicalOr)
- return LogicalOr(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/LogicalXor)
- return LogicalXor(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/BitwiseAnd)
- return BitwiseAnd(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/BitwiseOr)
- return BitwiseOr(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/BitwiseXor)
- return BitwiseXor(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Add)
- return Add(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Subtract)
- return Subtract(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Multiply)
- return Multiply(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Divide)
- return Divide(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Power)
- return Power(Eval(bin.exp), Eval(bin.exp2))
- if(/node/expression/operator_node/binary/Modulo)
- return Modulo(Eval(bin.exp), Eval(bin.exp2))
- else
- RaiseError(new/runtimeError/UnknownInstruction())
- return
- switch(exp.type)
- if(/node/expression/operator_node/unary/Minus)
- return Minus(Eval(exp.exp))
- if(/node/expression/operator_node/unary/LogicalNot)
- return LogicalNot(Eval(exp.exp))
- if(/node/expression/operator_node/unary/BitwiseNot)
- return BitwiseNot(Eval(exp.exp))
- if(/node/expression/operator_node/unary/group)
- return Eval(exp.exp)
- else
- RaiseError(new/runtimeError/UnknownInstruction())
-
-
-//Binary//
- //Comparison operators
-/n_Interpreter/proc/Equal(a, b) return a==b
-/n_Interpreter/proc/NotEqual(a, b) return a!=b //LogicalNot(Equal(a, b))
-/n_Interpreter/proc/Greater(a, b) return a>b
-/n_Interpreter/proc/Less(a, b) return a=b
-/n_Interpreter/proc/LessOrEqual(a, b) return a<=b
- //Logical Operators
-/n_Interpreter/proc/LogicalAnd(a, b) return a&&b
-/n_Interpreter/proc/LogicalOr(a, b) return a||b
-/n_Interpreter/proc/LogicalXor(a, b) return (a||b) && !(a&&b)
- //Bitwise Operators
-/n_Interpreter/proc/BitwiseAnd(a, b) return a&b
-/n_Interpreter/proc/BitwiseOr(a, b) return a|b
-/n_Interpreter/proc/BitwiseXor(a, b) return a^b
- //Arithmetic Operators
-/n_Interpreter/proc/Add(a, b)
- if(istext(a)&&!istext(b)) b="[b]"
- else if(istext(b)&&!istext(a)) a="[a]"
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("+", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("+", a, b))
- return null
- return a+b
-/n_Interpreter/proc/Subtract(a, b)
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("-", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("-", a, b))
- return null
- return a-b
-/n_Interpreter/proc/Divide(a, b)
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("/", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("/", a, b))
- return null
- if(b==0)
- RaiseError(new/runtimeError/DivisionByZero())
- return null
- return a/b
-/n_Interpreter/proc/Multiply(a, b)
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("*", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("*", a, b))
- return null
- return a*b
-/n_Interpreter/proc/Modulo(a, b)
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("%", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("%", a, b))
- return null
- return a%b
-/n_Interpreter/proc/Power(a, b)
- if(isobject(a) && !isobject(b))
- RaiseError(new/runtimeError/TypeMismatch("**", a, b))
- return null
- else if(isobject(b) && !isobject(a))
- RaiseError(new/runtimeError/TypeMismatch("**", a, b))
- return null
- return a**b
-
-//Unary//
-/n_Interpreter/proc/Minus(a) return -a
-/n_Interpreter/proc/LogicalNot(a) return !a
-/n_Interpreter/proc/BitwiseNot(a) return ~a
diff --git a/code/modules/scripting/Interpreter/Interaction.dm b/code/modules/scripting/Interpreter/Interaction.dm
deleted file mode 100644
index 231281a0c90..00000000000
--- a/code/modules/scripting/Interpreter/Interaction.dm
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- File: Interpreter (Public)
- Contains methods for interacting with the interpreter.
-*/
-/*
- Class: n_Interpreter
- Procedures allowing for interaction with the script that is being run by the interpreter object.
-*/
-/n_Interpreter
-
-/*
- Proc: Load
- Loads a 'compiled' script into memory.
-
- Parameters:
- program - A object which represents the script's global scope.
-*/
-/n_Interpreter/proc/Load(node/BlockDefinition/GlobalBlock/program)
- ASSERT(program)
- src.program = program
- CreateGlobalScope()
-
-/*
- Proc: Run
- Runs the script.
-*/
-/n_Interpreter/proc/Run()
- cur_recursion = 0 // reset recursion
- cur_statements = 0 // reset CPU tracking
- alertadmins = 0
-
- ASSERT(src.program)
- RunBlock(src.program)
-
-/*
- Proc: SetVar
- Defines a global variable for the duration of the next execution of a script.
-
- Notes:
- This differs from in that variables set using this procedure only last for the session,
- while those defined from the block object persist if it is ran multiple times.
-
- See Also:
- -
-*/
-/n_Interpreter/proc/SetVar(name, value)
- if(!istext(name))
- //CRASH("Invalid variable name")
- return
- AssignVariable(name, value)
-
-/*
- Proc: SetProc
- Defines a procedure to be available to the script.
-
- Parameters:
- name - The name of the procedure as exposed to the script.
- path - The typepath of a proc to be called when the function call is read by the interpreter, or, if object is specified, a string representing the procedure's name.
- object - (Optional) An object which will the be target of a function call.
- params - Only required if object is not null, a list of the names of parameters the proc takes.
-*/
-/n_Interpreter/proc/SetProc(name, path, object=null, list/params=null)
- if(!istext(name))
- //CRASH("Invalid function name")
- return
- if(!object)
- globalScope.functions[name] = path
- return
- var/node/statement/FunctionDefinition/S = new()
- S.func_name = name
- S.parameters = params
- S.block = new()
- S.block.SetVar("src", object)
- var/node/expression/FunctionCall/C = new()
- C.func_name = path
- C.object = new("src")
- for(var/p in params)
- C.parameters += new/node/expression/value/variable(p)
- var/node/statement/ReturnStatement/R=new()
- R.value=C
- S.block.statements += R
- globalScope.functions[name] = S
-/*
- Proc: VarExists
- Checks whether a global variable with the specified name exists.
-*/
-/n_Interpreter/proc/VarExists(name)
- return globalScope.variables.Find(name) //convert to 1/0 first?
-
-/*
- Proc: ProcExists
- Checks whether a global function with the specified name exists.
-*/
-/n_Interpreter/proc/ProcExists(name)
- return globalScope.functions.Find(name)
-
-/*
- Proc: GetVar
- Returns the value of a global variable in the script. Remember to ensure that the variable exists before calling this procedure.
-
- See Also:
- -
-*/
-/n_Interpreter/proc/GetVar(name)
- if(!VarExists(name))
- //CRASH("No variable named '[name]'.")
- return
- var/x = globalScope.variables[name]
- return Eval(x)
-
-/*
- Proc: CallProc
- Calls a global function defined in the script and, amazingly enough, returns its return value. Remember to ensure that the function
- exists before calling this procedure.
-
- See Also:
- -
-*/
-/n_Interpreter/proc/CallProc(name, params[]=null)
- if(!ProcExists(name))
- //CRASH("No function named '[name]'.")
- return
- var/node/statement/FunctionDefinition/func = globalScope.functions[name]
- if(istype(func))
- var/node/statement/FunctionCall/stmt = new
- stmt.func_name = func.func_name
- stmt.parameters = params
- return RunFunction(stmt)
- else
- return call(func)(arglist(params))
- //CRASH("Unknown function type '[name]'.")
-
-/*
- Event: HandleError
- Called when the interpreter throws a runtime error.
-
- See Also:
- -
-*/
-/n_Interpreter/proc/HandleError(runtimeError/e)
\ No newline at end of file
diff --git a/code/modules/scripting/Interpreter/Interpreter.dm b/code/modules/scripting/Interpreter/Interpreter.dm
deleted file mode 100644
index efdf1f7651d..00000000000
--- a/code/modules/scripting/Interpreter/Interpreter.dm
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- File: Interpreter (Internal)
-*/
-/*
- Class: n_Interpreter
-*/
-/*
- Macros: Status Macros
- RETURNING - Indicates that the current function is returning a value.
- BREAKING - Indicates that the current loop is being terminated.
- CONTINUING - Indicates that the rest of the current iteration of a loop is being skipped.
-*/
-#define RETURNING 1
-#define BREAKING 2
-#define CONTINUING 4
-/n_Interpreter
- var/scope/curScope
- var/scope/globalScope
- var/node/BlockDefinition/program
- var/node/statement/FunctionDefinition/curFunction
- var/stack/scopes = new()
- var/stack/functions = new()
-
- var/datum/container // associated container for interpeter
-/*
- Var: status
- A variable indicating that the rest of the current block should be skipped. This may be set to any combination of .
-*/
- var/status=0
- var/returnVal
-
- var/max_statements=1000 // maximum amount of statements that can be called in one execution. this is to prevent massive crashes and exploitation
- var/cur_statements=0 // current amount of statements called
- var/alertadmins=0 // set to 1 if the admins shouldn't be notified of anymore issues
- var/max_iterations=100 // max number of uninterrupted loops possible
- var/max_recursion=50 // max recursions without returning anything (or completing the code block)
- var/cur_recursion=0 // current amount of recursion
-/*
- Var: persist
- If 0, global variables will be reset after Run() finishes.
-*/
- var/persist=1
- var/paused=0
-
-/*
- Constructor: New
- Calls with the given parameters.
-*/
-/n_Interpreter/New(node/BlockDefinition/GlobalBlock/program=null)
- .=..()
- if(program)Load(program)
-
-/*
- Proc: RaiseError
- Raises a runtime error.
-*/
-/n_Interpreter/proc/RaiseError(runtimeError/e)
- e.stack=functions.Copy()
- e.stack.Push(curFunction)
- src.HandleError(e)
-
-/n_Interpreter/proc/CreateScope(node/BlockDefinition/B)
- var/scope/S = new(B, curScope)
- scopes.Push(curScope)
- curScope = S
- return S
-
-/n_Interpreter/proc/CreateGlobalScope()
- scopes.Clear()
- var/scope/S = new(program, null)
- globalScope = S
- return S
-
-/*
-Proc: RunBlock
-Runs each statement in a block of code.
-*/
-/n_Interpreter/proc/RunBlock(node/BlockDefinition/Block, scope/scope = null)
- var/is_global = istype(Block, /node/BlockDefinition/GlobalBlock)
- if(!is_global)
- if(scope)
- curScope = scope
- else
- CreateScope(Block)
- else
- if(!persist)
- CreateGlobalScope()
- curScope = globalScope
-
- if(cur_statements < max_statements)
-
- for(var/node/statement/S in Block.statements)
- while(paused) sleep(10)
-
- cur_statements++
- if(cur_statements >= max_statements)
- RaiseError(new/runtimeError/MaxCPU())
-
- if(container && !alertadmins)
- if(istype(container, /datum/TCS_Compiler))
- var/datum/TCS_Compiler/Compiler = container
- var/obj/machinery/telecomms/server/Holder = Compiler.Holder
- var/message = "Potential crash-inducing NTSL script detected at telecommunications server [Compiler.Holder] ([Holder.x], [Holder.y], [Holder.z])."
-
- alertadmins = 1
- message_admins(message, 1)
- break
-
- if(istype(S, /node/statement/VariableAssignment))
- var/node/statement/VariableAssignment/stmt = S
- var/name = stmt.var_name.id_name
- if(!stmt.object)
- // Below we assign the variable first to null if it doesn't already exist.
- // This is necessary for assignments like +=, and when the variable is used in a function
- // If the variable already exists in a different block, then AssignVariable will automatically use that one.
- if(!IsVariableAccessible(name))
- AssignVariable(name, null)
- AssignVariable(name, Eval(stmt.value))
- else
- var/datum/D = Eval(GetVariable(stmt.object.id_name))
- if(!D) return
- D.vars[stmt.var_name.id_name] = Eval(stmt.value)
- else if(istype(S, /node/statement/VariableDeclaration))
- //VariableDeclaration nodes are used to forcibly declare a local variable so that one in a higher scope isn't used by default.
- var/node/statement/VariableDeclaration/dec=S
- if(!dec.object)
- AssignVariable(dec.var_name.id_name, null, curScope)
- else
- var/datum/D = Eval(GetVariable(dec.object.id_name))
- if(!D) return
- D.vars[dec.var_name.id_name] = null
- else if(istype(S, /node/statement/FunctionCall))
- RunFunction(S)
- else if(istype(S, /node/statement/FunctionDefinition))
- //do nothing
- else if(istype(S, /node/statement/WhileLoop))
- RunWhile(S)
- else if(istype(S, /node/statement/IfStatement))
- RunIf(S)
- else if(istype(S, /node/statement/ReturnStatement))
- if(!curFunction)
- RaiseError(new/runtimeError/UnexpectedReturn())
- continue
- status |= RETURNING
- returnVal=Eval(S:value)
- break
- else if(istype(S, /node/statement/BreakStatement))
- status |= BREAKING
- break
- else if(istype(S, /node/statement/ContinueStatement))
- status |= CONTINUING
- break
- else
- RaiseError(new/runtimeError/UnknownInstruction())
- if(status)
- break
-
- curScope = scopes.Pop()
-
-/*
-Proc: RunFunction
-Runs a function block or a proc with the arguments specified in the script.
-*/
-/n_Interpreter/proc/RunFunction(node/statement/FunctionCall/stmt)
- //Note that anywhere /node/statement/FunctionCall/stmt is used so may /node/expression/FunctionCall
-
- // If recursion gets too high (max 50 nested functions) throw an error
- if(cur_recursion >= max_recursion)
- RaiseError(new/runtimeError/RecursionLimitReached())
- return 0
-
- var/node/statement/FunctionDefinition/def
- if(!stmt.object) //A scope's function is being called, stmt.object is null
- def = GetFunction(stmt.func_name)
- else if(istype(stmt.object)) //A method of an object exposed as a variable is being called, stmt.object is a /node/identifier
- var/O = GetVariable(stmt.object.id_name) //Gets a reference to the object which is the target of the function call.
- if(!O) return //Error already thrown in GetVariable()
- def = Eval(O)
-
- if(!def) return
-
- cur_recursion++ // add recursion
- if(istype(def))
- if(curFunction) functions.Push(curFunction)
- var/scope/S = CreateScope(def.block)
- for(var/i=1 to def.parameters.len)
- var/val
- if(stmt.parameters.len>=i)
- val = stmt.parameters[i]
- //else
- // unspecified param
- AssignVariable(def.parameters[i], new/node/expression/value/literal(Eval(val)), S)
- curFunction=stmt
- RunBlock(def.block, S)
- //Handle return value
- . = returnVal
- status &= ~RETURNING
- returnVal=null
- curFunction=functions.Pop()
- cur_recursion--
- else
- cur_recursion--
- var/list/params=new
- for(var/node/expression/P in stmt.parameters)
- params+=list(Eval(P))
- if(isobject(def)) //def is an object which is the target of a function call
- if( !hascall(def, stmt.func_name) )
- RaiseError(new/runtimeError/UndefinedFunction("[stmt.object.id_name].[stmt.func_name]"))
- return
- return call(def, stmt.func_name)(arglist(params))
- else //def is a path to a global proc
- return call(def)(arglist(params))
- //else
- // RaiseError(new/runtimeError/UnknownInstruction())
-
-/*
-Proc: RunIf
-Checks a condition and runs either the if block or else block.
-*/
-/n_Interpreter/proc/RunIf(node/statement/IfStatement/stmt)
- if(Eval(stmt.cond))
- RunBlock(stmt.block)
- else if(stmt.else_block)
- RunBlock(stmt.else_block)
-
-/*
-Proc: RunWhile
-Runs a while loop.
-*/
-/n_Interpreter/proc/RunWhile(node/statement/WhileLoop/stmt)
- var/i=1
- while(Eval(stmt.cond) && Iterate(stmt.block, i++))
- continue
- status &= ~BREAKING
-
-/*
-Proc:Iterate
-Runs a single iteration of a loop. Returns a value indicating whether or not to continue looping.
-*/
-/n_Interpreter/proc/Iterate(node/BlockDefinition/block, count)
- RunBlock(block)
- if(max_iterations > 0 && count >= max_iterations)
- RaiseError(new/runtimeError/IterationLimitReached())
- return 0
- if(status & (BREAKING|RETURNING))
- return 0
- status &= ~CONTINUING
- return 1
-
-/*
-Proc: GetFunction
-Finds a function in an accessible scope with the given name. Returns a .
-*/
-/n_Interpreter/proc/GetFunction(name)
- var/scope/S = curScope
- while(S)
- if(S.functions.Find(name))
- return S.functions[name]
- S = S.parent
- RaiseError(new/runtimeError/UndefinedFunction(name))
-
-/*
-Proc: GetVariable
-Finds a variable in an accessible scope and returns its value.
-*/
-/n_Interpreter/proc/GetVariable(name)
- var/scope/S = curScope
- while(S)
- if(S.variables.Find(name))
- return S.variables[name]
- S = S.parent
- RaiseError(new/runtimeError/UndefinedVariable(name))
-
-/n_Interpreter/proc/GetVariableScope(name) //needed for when you reassign a variable in a higher scope
- var/scope/S = curScope
- while(S)
- if(S.variables.Find(name))
- return S
- S = S.parent
-
-
-/n_Interpreter/proc/IsVariableAccessible(name)
- var/scope/S = curScope
- while(S)
- if(S.variables.Find(name))
- return TRUE
- S = S.parent
- return FALSE
-
-
-/*
-Proc: AssignVariable
-Assigns a value to a variable in a specific block.
-
-Parameters:
-name - The name of the variable to assign.
-value - The value to assign to it.
-S - The scope the variable resides in. If it is null, a scope with the variable already existing is found. If no scopes have a variable of the given name, the current scope is used.
-*/
-/n_Interpreter/proc/AssignVariable(name, node/expression/value, scope/S=null)
- if(!S) S = GetVariableScope(name)
- if(!S) S = curScope
- if(!S) S = globalScope
- ASSERT(istype(S))
- if(istext(value) || isnum(value) || isnull(value)) value = new/node/expression/value/literal(value)
- else if(!istype(value) && isobject(value)) value = new/node/expression/value/reference(value)
- //TODO: check for invalid name
- S.variables["[name]"] = value
-
diff --git a/code/modules/scripting/Interpreter/Scope.dm b/code/modules/scripting/Interpreter/Scope.dm
deleted file mode 100644
index d768e74bf16..00000000000
--- a/code/modules/scripting/Interpreter/Scope.dm
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- Class: scope
- A runtime instance of a block. Used internally by the interpreter.
-*/
-/scope/
- var/scope/parent = null
- var/node/BlockDefinition/block
- var/list/functions
- var/list/variables
-
-/scope/New(node/BlockDefinition/B, scope/parent)
- src.block = B
- src.parent = parent
- src.variables = B.initial_variables.Copy()
- src.functions = B.functions.Copy()
- .=..()
\ No newline at end of file
diff --git a/code/modules/scripting/Options.dm b/code/modules/scripting/Options.dm
deleted file mode 100644
index a7036e5a044..00000000000
--- a/code/modules/scripting/Options.dm
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-File: Options
-*/
-var/global/const/ascii_A =65
-var/global/const/ascii_Z =90
-var/global/const/ascii_a =97
-var/global/const/ascii_z =122
-var/global/const/ascii_DOLLAR = 36 // $
-var/global/const/ascii_ZERO=48
-var/global/const/ascii_NINE=57
-var/global/const/ascii_UNDERSCORE=95 // _
-
-/*
- Class: n_scriptOptions
-*/
-/n_scriptOptions/proc/CanStartID(char) //returns true if the character can start a variable, function, or keyword name (by default letters or an underscore)
- if(!isnum(char))char=text2ascii(char)
- return (char in ascii_A to ascii_Z) || (char in ascii_a to ascii_z) || char==ascii_UNDERSCORE || char==ascii_DOLLAR
-
-/n_scriptOptions/proc/IsValidIDChar(char) //returns true if the character can be in the body of a variable, function, or keyword name (by default letters, numbers, and underscore)
- if(!isnum(char))char=text2ascii(char)
- return CanStartID(char) || IsDigit(char)
-
-/n_scriptOptions/proc/IsDigit(char)
- if(!isnum(char))char=text2ascii(char)
- return char in ascii_ZERO to ascii_NINE
-
-/n_scriptOptions/proc/IsValidID(id) //returns true if all the characters in the string are okay to be in an identifier name
- if(!CanStartID(id)) //don't need to grab first char in id, since text2ascii does it automatically
- return 0
- if(length(id)==1) return 1
- for(var/i=2 to length(id))
- if(!IsValidIDChar(copytext(id, i, i+1)))
- return 0
- return 1
-
-/*
- Class: nS_Options
- An implementation of for the n_Script language.
-*/
-/n_scriptOptions/nS_Options
- var/list/symbols = list("(", ")", "\[", "]", ";", ",", "{", "}") //scanner - Characters that can be in symbols
-/*
-Var: keywords
-An associative list used by the parser to parse keywords. Indices are strings which will trigger the keyword when parsed and the
-associated values are types of which the proc will be called.
-*/
- var/list/keywords = list(
- "if" = /n_Keyword/nS_Keyword/kwIf,
- "else" = /n_Keyword/nS_Keyword/kwElse,
- "while" = /n_Keyword/nS_Keyword/kwWhile,
- "break" = /n_Keyword/nS_Keyword/kwBreak,
- "continue" = /n_Keyword/nS_Keyword/kwContinue,
- "return" = /n_Keyword/nS_Keyword/kwReturn,
- "def" = /n_Keyword/nS_Keyword/kwDef
- )
-
- var/list/assign_operators = list(
- "=" = null,
- "&=" = "&",
- "|=" = "|",
- "`=" = "`",
- "+=" = "+",
- "-=" = "-",
- "*=" = "*",
- "/=" = "/",
- "^=" = "^",
- "%=" = "%"
- )
-
- var/list/unary_operators =list(
- "!" = /node/expression/operator_node/unary/LogicalNot,
- "~" = /node/expression/operator_node/unary/BitwiseNot,
- "-" = /node/expression/operator_node/unary/Minus
- )
-
- var/list/binary_operators=list(
- "==" = /node/expression/operator_node/binary/Equal,
- "!=" = /node/expression/operator_node/binary/NotEqual,
- ">" = /node/expression/operator_node/binary/Greater,
- "<" = /node/expression/operator_node/binary/Less,
- ">=" = /node/expression/operator_node/binary/GreaterOrEqual,
- "<=" = /node/expression/operator_node/binary/LessOrEqual,
- "&&" = /node/expression/operator_node/binary/LogicalAnd,
- "||" = /node/expression/operator_node/binary/LogicalOr,
- "&" = /node/expression/operator_node/binary/BitwiseAnd,
- "|" = /node/expression/operator_node/binary/BitwiseOr,
- "`" = /node/expression/operator_node/binary/BitwiseXor,
- "+" = /node/expression/operator_node/binary/Add,
- "-" = /node/expression/operator_node/binary/Subtract,
- "*" = /node/expression/operator_node/binary/Multiply,
- "/" = /node/expression/operator_node/binary/Divide,
- "^" = /node/expression/operator_node/binary/Power,
- "%" = /node/expression/operator_node/binary/Modulo)
-
-/n_scriptOptions/nS_Options/New()
- .=..()
- for(var/O in assign_operators+binary_operators+unary_operators)
- if(!symbols.Find(O)) symbols+=O
diff --git a/code/modules/scripting/Parser/Expressions.dm b/code/modules/scripting/Parser/Expressions.dm
deleted file mode 100644
index f15a0d35491..00000000000
--- a/code/modules/scripting/Parser/Expressions.dm
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- File: Expressions
- Procedures for parsing expressions.
-*/
-
-/*
- Macros: Expression Macros
- OPERATOR - A value indicating the parser currently expects a binary operator.
- VALUE - A value indicating the parser currently expects a value.
- SHIFT - Tells the parser to push the current operator onto the stack.
- REDUCE - Tells the parser to reduce the stack.
-*/
-#define OPERATOR 1
-#define VALUE 2
-#define SHIFT 0
-#define REDUCE 1
-
-/*
- Class: nS_Parser
-*/
-/n_Parser/nS_Parser
-/*
- Var: expecting
- A variable which keeps track of whether an operator or value is expected. It should be either or . See
- for more information.
-*/
- var/expecting=VALUE
-
-/*
- Proc: Precedence
- Compares two operators, decides which is higher in the order of operations, and returns or .
-*/
-/n_Parser/nS_Parser/proc/Precedence(node/expression/operator_node/top, node/expression/operator_node/input)
- if(istype(top))
- top=top.precedence
- if(istype(input))
- input=input:precedence
- if(top>=input)
- return REDUCE
- return SHIFT
-
-/*
-Proc: GetExpression
-Takes a token expected to represent a value and returns an node.
-*/
-/n_Parser/nS_Parser/proc/GetExpression(token/T)
- if(!T) return
- if(istype(T, /node/expression))
- return T
- switch(T.type)
- if(/token/word)
- return new/node/expression/value/variable(T.value)
- if(/token/accessor)
- var/token/accessor/A=T
- var/node/expression/value/variable/E//=new(A.member)
- var/stack/S=new()
- while(istype(A.object, /token/accessor))
- S.Push(A)
- A=A.object
- ASSERT(istext(A.object))
-
- while(A)
- var/node/expression/value/variable/V=new()
- V.id=new(A.member)
- if(E)
- V.object=E
- else
- V.object=new/node/identifier(A.object)
- E=V
- A=S.Pop()
- return E
-
- if(/token/number, /token/string)
- return new/node/expression/value/literal(T.value)
-
-/*
-Proc: GetOperator
-Gets a path related to a token or string and returns an instance of the given type. This is used to get an instance of either a binary or unary
-operator from a token.
-
-Parameters:
-O - The input value. If this is a token, O is reset to the token's value.
- When O is a string and is in L, its associated value is used as the path to instantiate.
-type - The desired type of the returned object.
-L - The list in which to search for O.
-
-See Also:
--
--
-*/
-/n_Parser/nS_Parser/proc/GetOperator(O, type=/node/expression/operator_node, L[])
- if(istype(O, type)) return O //O is already the desired type
- if(istype(O, /token)) O=O:value //sets O to text
- if(istext(O)) //sets O to path
- if(L.Find(O)) O=L[O]
- else return null
- if(ispath(O))O=new O //catches path from last check
- else return null //Unknown type
- return O
-
-/*
-Proc: GetBinaryOperator
-Uses to search for an instance of a binary operator type with which the given string is associated. For example, if
-O is set to "+", an node is returned.
-
-See Also:
--
--
-*/
-/n_Parser/nS_Parser/proc/GetBinaryOperator(O)
- return GetOperator(O, /node/expression/operator_node/binary, options.binary_operators)
-
-/*
-Proc: GetUnaryOperator
-Uses to search for an instance of a unary operator type with which the given string is associated. For example, if
-O is set to "!", a node is returned.
-
-See Also:
--
--
-*/
-/n_Parser/nS_Parser/proc/GetUnaryOperator(O)
- return GetOperator(O, /node/expression/operator_node/unary, options.unary_operators)
-
-/*
-Proc: Reduce
-Takes the operator on top of the opr stack and assigns its operand(s). Then this proc pushes the value of that operation to the top
-of the val stack.
-*/
-/n_Parser/nS_Parser/proc/Reduce(stack/opr, stack/val)
- var/node/expression/operator_node/O=opr.Pop()
- if(!O) return
- if(!istype(O))
- errors+=new/scriptError("Error reducing expression - invalid operator.")
- return
- //Take O and assign its operands, popping one or two values from the val stack
- //depending on whether O is a binary or unary operator.
- if(istype(O, /node/expression/operator_node/binary))
- var/node/expression/operator_node/binary/B=O
- B.exp2=val.Pop()
- B.exp =val.Pop()
- val.Push(B)
- else
- O.exp=val.Pop()
- val.Push(O)
-
-/*
-Proc: EndOfExpression
-Returns true if the current token represents the end of an expression.
-
-Parameters:
-end - A list of values to compare the current token to.
-*/
-/n_Parser/nS_Parser/proc/EndOfExpression(end[])
- if(!curToken)
- return 1
- if(istype(curToken, /token/symbol) && end.Find(curToken.value))
- return 1
- if(istype(curToken, /token/end) && end.Find(/token/end))
- return 1
- return 0
-
-/*
-Proc: ParseExpression
-Uses the Shunting-yard algorithm to parse expressions.
-
-Notes:
-- When an opening parenthesis is found, then is called to handle it.
-- The variable helps distinguish unary operators from binary operators (for cases like the - operator, which can be either).
-
-Articles:
--
--
-
-See Also:
--
--
--
-*/
-/n_Parser/nS_Parser/proc/ParseExpression(list/end=list(/token/end), list/ErrChars=list("{", "}"))
- var/stack/opr=new
- var/stack/val=new
- src.expecting=VALUE
- while(TRUE)
- if(EndOfExpression(end))
- break
- if(istype(curToken, /token/symbol) && ErrChars.Find(curToken.value))
- errors+=new/scriptError/BadToken(curToken)
- break
-
-
- if(index>tokens.len) //End of File
- errors+=new/scriptError/EndOfFile()
- break
- var/token/ntok
- if(index+1<=tokens.len)
- ntok=tokens[index+1]
-
- if(istype(curToken, /token/symbol) && curToken.value=="(") //Parse parentheses expression
- if(expecting!=VALUE)
- errors+=new/scriptError/ExpectedToken("operator", curToken)
- NextToken()
- continue
- val.Push(ParseParenExpression())
- else if(istype(curToken, /token/symbol)) //Operator found.
- var/node/expression/operator_node/curOperator //Figure out whether it is unary or binary and get a new instance.
- if(src.expecting==OPERATOR)
- curOperator=GetBinaryOperator(curToken)
- if(!curOperator)
- errors+=new/scriptError/ExpectedToken("operator", curToken)
- NextToken()
- continue
- else
- curOperator=GetUnaryOperator(curToken)
- if(!curOperator) //given symbol isn't a unary operator
- errors+=new/scriptError/ExpectedToken("expression", curToken)
- NextToken()
- continue
-
- if(opr.Top() && Precedence(opr.Top(), curOperator)==REDUCE) //Check order of operations and reduce if necessary
- Reduce(opr, val)
- continue
- opr.Push(curOperator)
- src.expecting=VALUE
- else if(ntok && ntok.value=="(" && istype(ntok, /token/symbol)\
- && istype(curToken, /token/word)) //Parse function call
- var/token/preToken=curToken
- var/old_expect=src.expecting
- var/fex=ParseFunctionExpression()
- if(old_expect!=VALUE)
- errors+=new/scriptError/ExpectedToken("operator", preToken)
- NextToken()
- continue
- val.Push(fex)
- else if(istype(curToken, /token/keyword)) //inline keywords
- var/n_Keyword/kw=options.keywords[curToken.value]
- kw=new kw(inline=1)
- if(kw)
- if(!kw.Parse(src))
- return
- else
- errors+=new/scriptError/BadToken(curToken)
- else if(istype(curToken, /token/end)) //semicolon found where it wasn't expected
- errors+=new/scriptError/BadToken(curToken)
- NextToken()
- continue
- else
- if(expecting!=VALUE)
- errors+=new/scriptError/ExpectedToken("operator", curToken)
- NextToken()
- continue
- val.Push(GetExpression(curToken))
- src.expecting=OPERATOR
- NextToken()
-
- while(opr.Top()) Reduce(opr, val) //Reduce the value stack completely
- .=val.Pop() //Return what should be the last value on the stack
- if(val.Top()) //
- var/node/N=val.Pop()
- errors+=new/scriptError("Error parsing expression. Unexpected value left on stack: [N.ToString()].")
- return null
-
-/*
-Proc: ParseFunctionExpression
-Parses a function call inside of an expression.
-
-See Also:
--
-*/
-/n_Parser/nS_Parser/proc/ParseFunctionExpression()
- var/node/expression/FunctionCall/exp=new
- exp.func_name=curToken.value
- NextToken() //skip function name
- NextToken() //skip open parenthesis, already found
- var/loops = 0
-
- while(TRUE)
- loops++
- if(loops>=1000)
- CRASH("Something TERRIBLE has gone wrong in ParseFunctionExpression ;__;")
-
- if(istype(curToken, /token/symbol) && curToken.value==")")
- return exp
- exp.parameters+=ParseParamExpression()
- if(curToken.value==","&&istype(curToken, /token/symbol))NextToken() //skip comma
- if(istype(curToken, /token/end)) //Prevents infinite loop...
- errors+=new/scriptError/ExpectedToken(")")
- return exp
-
-/*
-Proc: ParseParenExpression
-Parses an expression that ends with a close parenthesis. This is used for parsing expressions inside of parentheses.
-
-See Also:
--
-*/
-/n_Parser/nS_Parser/proc/ParseParenExpression()
- if(!CheckToken("(", /token/symbol))
- return
- return new/node/expression/operator_node/unary/group(ParseExpression(list(")")))
-
-/*
-Proc: ParseParamExpression
-Parses an expression that ends with either a comma or close parenthesis. This is used for parsing the parameters passed to a function call.
-
-See Also:
--
-*/
-/n_Parser/nS_Parser/proc/ParseParamExpression()
- return ParseExpression(list(",", ")"))
diff --git a/code/modules/scripting/Parser/Keywords.dm b/code/modules/scripting/Parser/Keywords.dm
deleted file mode 100644
index 2965b452743..00000000000
--- a/code/modules/scripting/Parser/Keywords.dm
+++ /dev/null
@@ -1,158 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
-
-/*
- File: Keywords
-*/
-var/global/const/KW_FAIL = 0 //Fatal error; stop parsing entire script.
-var/global/const/KW_PASS = 1 //OK
-var/global/const/KW_ERR = 2 //Non-fatal error, keyword couldn't be handled properly. Ignore keyword but continue on.
-var/global/const/KW_WARN = 3 //Warning
-
-/*
-var/global/const/Class: n_Keyword
-var/global/const/Represents a special statement in the code triggered by a keyword.
-*/
-
-/*
- Var: inline
- 1 if the keyword is in an expression (e.g. the new keyword in many languages), 0 otherwise (such as the if and else keywords).
-*/
-/n_Keyword
- var/inline
-/n_Keyword/New(inline=FALSE)
- src.inline=inline
- return ..()
-
-/*
- Proc: Parse
- Called when the parser finds a keyword in the code.
-
- Parameters:
- parser - The parser that created this object. You can use the parameter to manipulate the parser in order to add statements and blocks
- to its AST.
-*/
-/n_Keyword/proc/Parse(n_Parser/parser)
-
-/*
- Class: nS_Keyword
- A keyword in n_Script. By default these include return, if, else, while, and def. To enable or disable a keyword, change the
- list.
-
- Behavior:
- When a parser is expecting a new statement, and a keyword listed in is found, it will call the keyword's
- proc.
-*/
-//
-/n_Keyword/nS_Keyword/New(inline=0)
- if(inline)
- qdel(src)
-
-/n_Keyword/nS_Keyword/kwReturn/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- if(istype(parser.curBlock, /node/BlockDefinition/GlobalBlock))
- parser.errors+=new/scriptError/BadReturn(parser.curToken)
- . = KW_WARN
- var/node/statement/ReturnStatement/stmt=new
- parser.NextToken() //skip 'return' token
- stmt.value=parser.ParseExpression()
- parser.curBlock.statements+=stmt
-
-/n_Keyword/nS_Keyword/kwIf/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- var/node/statement/IfStatement/stmt=new
- parser.NextToken() //skip 'if' token
- stmt.cond=parser.ParseParenExpression()
- if(!parser.CheckToken(")", /token/symbol))
- return KW_FAIL
- if(!parser.CheckToken("{", /token/symbol, skip=0)) //Token needs to be preserved for parse loop, so skip=0
- return KW_ERR
- parser.curBlock.statements+=stmt
- stmt.block=new
- parser.AddBlock(stmt.block)
-
-/n_Keyword/nS_Keyword/kwElse/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- var/list/L=parser.curBlock.statements
- var/node/statement/IfStatement/stmt
- if(L&&L.len) stmt=L[L.len] //Get the last statement in the current block
- if(!stmt || !istype(stmt) || stmt.else_block) //Ensure that it is an if statement
- parser.errors+=new/scriptError/ExpectedToken("if statement",parser.curToken)
- return KW_FAIL
- parser.NextToken() //skip 'else' token
- if(!parser.CheckToken("{", /token/symbol, skip=0))
- return KW_ERR
- stmt.else_block=new()
- parser.AddBlock(stmt.else_block)
-
-/n_Keyword/nS_Keyword/kwWhile/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- var/node/statement/WhileLoop/stmt=new
- parser.NextToken() //skip 'while' token
- stmt.cond=parser.ParseParenExpression()
- if(!parser.CheckToken(")", /token/symbol))
- return KW_FAIL
- if(!parser.CheckToken("{", /token/symbol, skip=0))
- return KW_ERR
- parser.curBlock.statements+=stmt
- stmt.block=new
- parser.AddBlock(stmt.block)
-
-/n_Keyword/nS_Keyword/kwBreak/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- if(istype(parser.curBlock, /node/BlockDefinition/GlobalBlock))
- parser.errors+=new/scriptError/BadToken(parser.curToken)
- . = KW_WARN
- var/node/statement/BreakStatement/stmt=new
- parser.NextToken() //skip 'break' token
- parser.curBlock.statements+=stmt
-
-/n_Keyword/nS_Keyword/kwContinue/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- if(istype(parser.curBlock, /node/BlockDefinition/GlobalBlock))
- parser.errors+=new/scriptError/BadToken(parser.curToken)
- . = KW_WARN
- var/node/statement/ContinueStatement/stmt=new
- parser.NextToken() //skip 'break' token
- parser.curBlock.statements+=stmt
-
-/n_Keyword/nS_Keyword/kwDef/Parse(n_Parser/nS_Parser/parser)
- .=KW_PASS
- var/node/statement/FunctionDefinition/def=new
- parser.NextToken() //skip 'def' token
- if(!parser.options.IsValidID(parser.curToken.value))
- parser.errors+=new/scriptError/InvalidID(parser.curToken)
- return KW_FAIL
- def.func_name=parser.curToken.value
- parser.NextToken()
- if(!parser.CheckToken("(", /token/symbol))
- return KW_FAIL
- while(TRUE) //for now parameters can be separated by whitespace - they don't need a comma in between
- if(istype(parser.curToken, /token/symbol))
- switch(parser.curToken.value)
- if(",")
- parser.NextToken()
- if(")")
- break
- else
- parser.errors+=new/scriptError/BadToken(parser.curToken)
- return KW_ERR
-
- else if(istype(parser.curToken, /token/word))
- def.parameters+=parser.curToken.value
- parser.NextToken()
- else
- parser.errors+=new/scriptError/InvalidID(parser.curToken)
- return KW_ERR
- if(!parser.CheckToken(")", /token/symbol))
- return KW_FAIL
-
- if(istype(parser.curToken, /token/end)) //Function prototype
- parser.curBlock.statements+=def
- else if(parser.curToken.value=="{" && istype(parser.curToken, /token/symbol))
- def.block = new
- parser.curBlock.statements+=def
- parser.curBlock.functions[def.func_name]=def
- parser.AddBlock(def.block)
- else
- parser.errors+=new/scriptError/BadToken(parser.curToken)
- return KW_FAIL
diff --git a/code/modules/scripting/Parser/Parser.dm b/code/modules/scripting/Parser/Parser.dm
deleted file mode 100644
index ab4d6805e70..00000000000
--- a/code/modules/scripting/Parser/Parser.dm
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- File: Parser
-*/
-/*
- Class: n_Parser
- An object that reads tokens and produces an AST (abstract syntax tree).
-*/
-/n_Parser
- var/index = 1
-/*
- Var: index
- The parser's current position in the token's list.
-*/
-/*
- Var: tokens
- A list of tokens in the source code generated by a scanner.
-*/
- var/list/tokens = new
-/*
- Var: errors
- A list of fatal errors found by the parser. If there are any items in this list, then it is not safe to run the returned AST.
-
- See Also:
- -
-*/
- var/list/errors = new
-/*
- Var: warnings
- A list of non-fatal problems in the script.
-*/
- var/list/warnings = new
-/*
- Var: curToken
- The token at in .
-*/
- var/token/curToken
- var/stack/blocks=new
- var/node/BlockDefinition/GlobalBlock/global_block=new
- var/node/BlockDefinition/curBlock
-
-/*
- Proc: Parse
- Reads the tokens and returns the AST's node. Be sure to populate the tokens list before calling this procedure.
-*/
-/n_Parser/proc/Parse()
-
-/*
- Proc: NextToken
- Sets to the next token in the list, or null if there are no more tokens.
-*/
-/n_Parser/proc/NextToken()
- if(index>=tokens.len)
- curToken=null
- else
- curToken=tokens[++index]
- return curToken
-
-/*
- Class: nS_Parser
- An implmentation of a parser for n_Script.
-*/
-/n_Parser/nS_Parser
- var/n_scriptOptions/nS_Options/options
-/*
- Constructor: New
-
- Parameters:
- tokens - A list of tokens to parse.
- options - An object used for configuration.
-*/
-/n_Parser/nS_Parser/New(tokens[], n_scriptOptions/options)
- src.tokens=tokens
- src.options=options
- curBlock=global_block
- return ..()
-
-/n_Parser/nS_Parser/Parse()
- ASSERT(tokens)
- for(,src.index<=src.tokens.len, src.index++)
- curToken=tokens[index]
- switch(curToken.type)
- if(/token/keyword)
- var/n_Keyword/kw=options.keywords[curToken.value]
- kw=new kw()
- if(kw)
- if(!kw.Parse(src))
- return
- if(/token/word)
- var/token/ntok
- if(index+1>tokens.len)
- errors+=new/scriptError/BadToken(curToken)
- continue
- ntok=tokens[index+1]
- if(!istype(ntok, /token/symbol))
- errors+=new/scriptError/BadToken(ntok)
- continue
- if(ntok.value=="(")
- ParseFunctionStatement()
- else if(options.assign_operators.Find(ntok.value))
- ParseAssignment()
- else
- errors+=new/scriptError/BadToken(ntok)
- continue
- if(!istype(curToken, /token/end))
- errors+=new/scriptError/ExpectedToken(";", curToken)
- continue
- if(/token/symbol)
- if(curToken.value=="}")
- if(!EndBlock())
- errors+=new/scriptError/BadToken(curToken)
- continue
- else
- errors+=new/scriptError/BadToken(curToken)
- continue
- if(/token/end)
- warnings+=new/scriptError/BadToken(curToken)
- continue
- else
- errors+=new/scriptError/BadToken(curToken)
- return
- return global_block
-
-/n_Parser/nS_Parser/proc/CheckToken(val, type, err=1, skip=1)
- if(curToken.value!=val || !istype(curToken,type))
- if(err)
- errors+=new/scriptError/ExpectedToken(val, curToken)
- return 0
- if(skip)NextToken()
- return 1
-
-/n_Parser/nS_Parser/proc/AddBlock(node/BlockDefinition/B)
- blocks.Push(curBlock)
- curBlock=B
-
-/n_Parser/nS_Parser/proc/EndBlock()
- if(curBlock==global_block) return 0
- curBlock=blocks.Pop()
- return 1
-
-/n_Parser/nS_Parser/proc/ParseAssignment()
- var/name=curToken.value
- if(!options.IsValidID(name))
- errors+=new/scriptError/InvalidID(curToken)
- return
- NextToken()
- var/t=options.binary_operators[options.assign_operators[curToken.value]]
- var/node/statement/VariableAssignment/stmt=new()
- stmt.var_name=new(name)
- NextToken()
- if(t)
- stmt.value=new t()
- stmt.value:exp=new/node/expression/value/variable(stmt.var_name)
- stmt.value:exp2=ParseExpression()
- else
- stmt.value=ParseExpression()
- curBlock.statements+=stmt
-
-/n_Parser/nS_Parser/proc/ParseFunctionStatement()
- if(!istype(curToken, /token/word))
- errors+=new/scriptError("Bad identifier in function call.")
- return
- var/node/statement/FunctionCall/stmt=new
- stmt.func_name=curToken.value
- NextToken() //skip function name
- if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis
- return
- var/loops = 0
- while(TRUE)
- loops++
- if(loops>=6000)
- CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;")
-
- if(!curToken)
- errors+=new/scriptError/EndOfFile()
- return
- if(istype(curToken, /token/symbol) && curToken.value==")")
- curBlock.statements+=stmt
- NextToken() //Skip close parenthesis
- return
- var/node/expression/P=ParseParamExpression()
- stmt.parameters+=P
- if(istype(curToken, /token/symbol) && curToken.value==",") NextToken()
\ No newline at end of file
diff --git a/code/modules/scripting/Scanner/Scanner.dm b/code/modules/scripting/Scanner/Scanner.dm
deleted file mode 100644
index 919bb82a488..00000000000
--- a/code/modules/scripting/Scanner/Scanner.dm
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- File: Scanner
-*/
-/*
- Class: n_Scanner
- An object responsible for breaking up source code into tokens for use by the parser.
-*/
-/n_Scanner
- var/code
-/*
- Var: errors
- A list of fatal errors found by the scanner. If there are any items in this list, then it is not safe to parse the returned tokens.
-
- See Also:
- -
-*/
- var/list/errors = new
-/*
- Var: warnings
- A list of non-fatal problems in the source code found by the scanner.
-*/
- var/list/warnings = new
-
-/*
- Proc: LoadCode
- Loads source code.
-*/
-/n_Scanner/proc/LoadCode(c)
- code=c
-
-/*
- Proc: LoadCodeFromFile
- Gets the code from a file and calls .
-*/
-/n_Scanner/proc/LoadCodeFromFile(f)
- LoadCode(file2text(f))
-
-/*
- Proc: Scan
- Runs the scanner and returns the resulting list of tokens. Ensure that has been called first.
-*/
-/n_Scanner/proc/Scan()
-
-/*
- Class: nS_Scanner
- A scanner implementation for n_Script.
-*/
-/n_Scanner/nS_Scanner
-
-/*
- Variable: codepos
- The scanner's position in the source code.
-*/
- var/codepos = 1
- var/line = 1
- var/linepos = 0 //column=codepos-linepos
- var/n_scriptOptions/nS_Options/options
- var/commenting = 0 /// 1 is a single-line comment, 2 is a multi-line comment
-/*
- Variable: ignore
- A list of characters that are ignored by the scanner.
-
- Default Value:
- Whitespace
-*/
- var/list/ignore = list(" ", "\t", "\n") //Don't add tokens for whitespace
-/*
- Variable: end_stmt
- A list of characters that end a statement. Each item may only be one character long.
-
- Default Value:
- Semicolon
-*/
- var/list/end_stmt = list(";")
-/*
- Variable: string_delim
- A list of characters that can start and end strings.
-
- Default Value:
- Double and single quotes.
-*/
- var/list/string_delim = list("\"", "'")
-/*
- Variable: delim
- A list of characters that denote the start of a new token. This list is automatically populated.
-*/
- var/list/delim = new
-
-/*
- Macro: COL
- The current column number.
-*/
- #define COL codepos-linepos
-
-/*
- Constructor: New
- Parameters:
- code - The source code to tokenize.
- options - An object used to configure the scanner.
-*/
-/n_Scanner/nS_Scanner/New(code, n_scriptOptions/nS_Options/options)
- .=..()
- ignore+= ascii2text(13) //Carriage return
- delim += ignore + options.symbols + end_stmt + string_delim
- src.options=options
- LoadCode(code)
-
-/n_Scanner/nS_Scanner/Scan() //Creates a list of tokens from source code
- var/list/tokens=new
- for(, src.codepos<=length(code), src.codepos++)
-
- var/char=copytext(code, codepos, codepos+1)
- if(char=="\n")
- line++
- linepos=codepos
-
- if(ignore.Find(char))
- continue
- else if(char == "/")
- ReadComment()
- else if(end_stmt.Find(char))
- tokens+=new /token/end(char, line, COL)
- else if(string_delim.Find(char))
- codepos++ //skip string delimiter
- tokens+=ReadString(char)
- else if(options.CanStartID(char))
- tokens+=ReadWord()
- else if(options.IsDigit(char))
- tokens+=ReadNumber()
- else if(options.symbols.Find(char))
- tokens+=ReadSymbol()
-
-
- codepos=initial(codepos)
- line=initial(line)
- linepos=initial(linepos)
- return tokens
-
-/*
- Proc: ReadString
- Reads a string in the source code into a token.
-
- Parameters:
- start - The character used to start the string.
-*/
-/n_Scanner/nS_Scanner/proc/ReadString(start)
- var/buf
- for(, codepos <= length(code), codepos++)//codepos to length(code))
- var/char=copytext(code, codepos, codepos+1)
- switch(char)
- if("\\") //Backslash (\) encountered in string
- codepos++ //Skip next character in string, since it was escaped by a backslash
- char=copytext(code, codepos, codepos+1)
- switch(char)
- if("\\") //Double backslash
- buf+="\\"
- if("n") //\n Newline
- buf+="\n"
- else
- if(char==start) //\" Doublequote
- buf+=start
- else //Unknown escaped text
- buf+=char
- if("\n")
- . = new/token/string(buf, line, COL)
- errors+=new/scriptError("Unterminated string. Newline reached.", .)
- line++
- linepos=codepos
- break
- else
- if(char==start) //string delimiter found, end string
- break
- else
- buf+=char //Just a normal character in a string
- if(!.) return new/token/string(buf, line, COL)
-
-/*
-Proc: ReadWord
-Reads characters separated by an item in into a token.
-*/
-/n_Scanner/nS_Scanner/proc/ReadWord()
- var/char=copytext(code, codepos, codepos+1)
- var/buf
- while(!delim.Find(char) && codepos<=length(code))
- buf+=char
- char=copytext(code, ++codepos, codepos+1)
- codepos-- //allow main Scan() proc to read the delimiter
- if(options.keywords.Find(buf))
- return new /token/keyword(buf, line, COL)
- else
- return new /token/word(buf, line, COL)
-
-/*
-Proc: ReadSymbol
-Reads a symbol into a token.
-*/
-/n_Scanner/nS_Scanner/proc/ReadSymbol()
- var/char=copytext(code, codepos, codepos+1)
- var/buf
-
- while(options.symbols.Find(buf+char))
- buf+=char
- if(++codepos>length(code)) break
- char=copytext(code, codepos, codepos+1)
-
- codepos-- //allow main Scan() proc to read the next character
- return new /token/symbol(buf, line, COL)
-
-/*
-Proc: ReadNumber
-Reads a number into a token.
-*/
-/n_Scanner/nS_Scanner/proc/ReadNumber()
- var/char=copytext(code, codepos, codepos+1)
- var/buf
- var/dec=0
-
- while(options.IsDigit(char) || (char=="." && !dec))
- if(char==".") dec=1
- buf+=char
- codepos++
- char=copytext(code, codepos, codepos+1)
- var/token/number/T=new(buf, line, COL)
- if(isnull(text2num(buf)))
- errors+=new/scriptError("Bad number: ", T)
- T.value=0
- codepos-- //allow main Scan() proc to read the next character
- return T
-
-/*
-Proc: ReadComment
-Reads a comment and outputs the type of comment
-*/
-
-/n_Scanner/nS_Scanner/proc/ReadComment()
- var/char=copytext(code, codepos, codepos+1)
- var/nextchar=copytext(code, codepos+1, codepos+2)
- var/charstring = char+nextchar
- var/comm = 1
- // 1: single-line comment
- // 2: multi-line comment
- var/expectedend = 0
-
- if(charstring == "//" || charstring == "/*")
- if(charstring == "/*")
- comm = 2 // starts a multi-line comment
-
- while(comm)
- if(++codepos>length(code)) break
-
- if(expectedend) // ending statement expected...
- char = copytext(code, codepos, codepos+1)
- if(char == "/") // ending statement found - beak the comment
- comm = 0
- break
-
- if(comm == 2)
- // multi-line comments are broken by ending statements
- char = copytext(code, codepos, codepos+1)
- if(char == "*")
- expectedend = 1
- continue
- else
- char = copytext(code, codepos, codepos+1)
- if(char == "\n")
- comm = 0
- break
-
- if(expectedend) expectedend = 0
-
- if(comm == 2)
- errors+=new/scriptError/UnterminatedComment()
-
diff --git a/code/modules/scripting/Scanner/Tokens.dm b/code/modules/scripting/Scanner/Tokens.dm
deleted file mode 100644
index 5068e97c5ac..00000000000
--- a/code/modules/scripting/Scanner/Tokens.dm
+++ /dev/null
@@ -1,37 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
-
-/*
- Class: Token
- Represents an entity and position in the source code.
-*/
-/token
- var/value
- var/line
- var/column
-
-/token/New(v, l=0, c=0)
- value=v
- line=l
- column=c
-
-/token/string
-/token/symbol
-/token/word
-/token/keyword
-/token/number/New()
- .=..()
- if(!isnum(value))
- value=text2num(value)
- ASSERT(!isnull(value))
-/token/accessor
- var/object
- var/member
-
-/token/accessor/New(object, member, l=0, c=0)
- src.object=object
- src.member=member
- src.value="[object].[member]" //for debugging only
- src.line=l
- src.column=c
-
-/token/end
diff --git a/code/modules/scripting/stack.dm b/code/modules/scripting/stack.dm
deleted file mode 100644
index 3c7fa52ac72..00000000000
--- a/code/modules/scripting/stack.dm
+++ /dev/null
@@ -1,21 +0,0 @@
-/stack
- var/list/contents=new
-/stack/proc/Push(value)
- contents+=value
-
-/stack/proc/Pop()
- if(!contents.len) return null
- . = contents[contents.len]
- contents.len--
-
-/stack/proc/Top() //returns the item on the top of the stack without removing it
- if(!contents.len) return null
- return contents[contents.len]
-
-/stack/proc/Copy()
- var/stack/S=new()
- S.contents=src.contents.Copy()
- return S
-
-/stack/proc/Clear()
- contents.Cut()
\ No newline at end of file
diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm
index 567e26ef46f..122b68abed4 100644
--- a/code/modules/shuttles/shuttle.dm
+++ b/code/modules/shuttles/shuttle.dm
@@ -8,7 +8,7 @@
var/list/shuttle_area // Initial value can be either a single area type or a list of area types
var/obj/effect/shuttle_landmark/current_location //This variable is type-abused initially: specify the landmark_tag, not the actual landmark.
- var/tmp/arrive_time = 0 //the time at which the shuttle arrives when long jumping
+ var/arrive_time = 0 //the time at which the shuttle arrives when long jumping
var/flags = SHUTTLE_FLAGS_NONE
var/process_state = IDLE_STATE // Used with SHUTTLE_FLAGS_PROCESS, as well as to store current state.
var/category = /datum/shuttle
@@ -28,7 +28,7 @@
var/mothershuttle //tag of mothershuttle
var/motherdock //tag of mothershuttle landmark, defaults to starting location
- var/tmp/depart_time = 0 //Similar to above, set when the shuttle leaves when long jumping. Used for progress bars.
+ var/depart_time = 0 //Similar to above, set when the shuttle leaves when long jumping. Used for progress bars.
var/debug_logging = FALSE // If set to true, the shuttle will start broadcasting its debug messages to admins
diff --git a/code/modules/shuttles/shuttle_autodock.dm b/code/modules/shuttles/shuttle_autodock.dm
index 96d561cc144..1c401ffd231 100644
--- a/code/modules/shuttles/shuttle_autodock.dm
+++ b/code/modules/shuttles/shuttle_autodock.dm
@@ -10,7 +10,7 @@
var/datum/embedded_program/docking/shuttle_docking_controller // Controller on the shuttle (the one in use)
var/docking_codes
- var/tmp/obj/effect/shuttle_landmark/next_location //This is only used internally.
+ var/obj/effect/shuttle_landmark/next_location //This is only used internally.
var/datum/embedded_program/docking/active_docking_controller // Controller we are docked with (or trying to)
var/obj/effect/shuttle_landmark/landmark_transition //This variable is type-abused initially: specify the landmark_tag, not the actual landmark.
diff --git a/code/modules/turbolift/turbolift.dm b/code/modules/turbolift/turbolift.dm
index 59da35d2df0..e349d411279 100644
--- a/code/modules/turbolift/turbolift.dm
+++ b/code/modules/turbolift/turbolift.dm
@@ -10,9 +10,9 @@
var/obj/structure/lift/panel/control_panel_interior // Lift control panel.
var/doors_closing = 0 // Whether doors are in the process of closing
- var/tmp/moving_upwards
- var/tmp/busy_state // Used for controller processing.
- var/tmp/next_process // world.time process() should next do something
+ var/moving_upwards
+ var/busy_state // Used for controller processing.
+ var/next_process // world.time process() should next do something
/datum/turbolift/proc/emergency_stop()
queued_floors.Cut()
diff --git a/polaris.dme b/polaris.dme
index 1e7df985a67..7632f1ce87b 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -456,7 +456,6 @@
#include "code\defines\procs\announce.dm"
#include "code\defines\procs\AStar.dm"
#include "code\defines\procs\dbcore.dm"
-#include "code\defines\procs\radio.dm"
#include "code\defines\procs\statistics.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
@@ -804,13 +803,19 @@
#include "code\game\machinery\pipe\pipe_dispenser.dm"
#include "code\game\machinery\pipe\pipe_recipes.dm"
#include "code\game\machinery\pipe\pipelayer.dm"
+#include "code\game\machinery\telecomms\allinone.dm"
#include "code\game\machinery\telecomms\broadcaster.dm"
+#include "code\game\machinery\telecomms\bus.dm"
+#include "code\game\machinery\telecomms\hub.dm"
#include "code\game\machinery\telecomms\logbrowser.dm"
-#include "code\game\machinery\telecomms\machine_interactions.dm"
+#include "code\game\machinery\telecomms\misc.dm"
#include "code\game\machinery\telecomms\presets.dm"
-#include "code\game\machinery\telecomms\telecommunications.dm"
+#include "code\game\machinery\telecomms\processor.dm"
+#include "code\game\machinery\telecomms\receiver.dm"
+#include "code\game\machinery\telecomms\relay.dm"
+#include "code\game\machinery\telecomms\server.dm"
+#include "code\game\machinery\telecomms\telecomms.dm"
#include "code\game\machinery\telecomms\telemonitor.dm"
-#include "code\game\machinery\telecomms\traffic_control.dm"
#include "code\game\machinery\virtual_reality\ar_console.dm"
#include "code\game\machinery\virtual_reality\vr_console.dm"
#include "code\game\magic\Uristrunes.dm"
@@ -3058,26 +3063,6 @@
#include "code\modules\research\designs\circuits\ai_modules.dm"
#include "code\modules\research\designs\circuits\circuits.dm"
#include "code\modules\research\designs\circuits\disks.dm"
-#include "code\modules\scripting\Errors.dm"
-#include "code\modules\scripting\IDE.dm"
-#include "code\modules\scripting\Options.dm"
-#include "code\modules\scripting\stack.dm"
-#include "code\modules\scripting\AST\AST Nodes.dm"
-#include "code\modules\scripting\AST\Blocks.dm"
-#include "code\modules\scripting\AST\Statements.dm"
-#include "code\modules\scripting\AST\Operators\Binary Operators.dm"
-#include "code\modules\scripting\AST\Operators\Unary Operators.dm"
-#include "code\modules\scripting\Implementations\_Logic.dm"
-#include "code\modules\scripting\Implementations\Telecomms.dm"
-#include "code\modules\scripting\Interpreter\Evaluation.dm"
-#include "code\modules\scripting\Interpreter\Interaction.dm"
-#include "code\modules\scripting\Interpreter\Interpreter.dm"
-#include "code\modules\scripting\Interpreter\Scope.dm"
-#include "code\modules\scripting\Parser\Expressions.dm"
-#include "code\modules\scripting\Parser\Keywords.dm"
-#include "code\modules\scripting\Parser\Parser.dm"
-#include "code\modules\scripting\Scanner\Scanner.dm"
-#include "code\modules\scripting\Scanner\Tokens.dm"
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\modules\shieldgen\directional_shield.dm"
diff --git a/tgui/packages/tgui/interfaces/TelecommsMultitoolMenu.js b/tgui/packages/tgui/interfaces/TelecommsMultitoolMenu.js
index 982043ed3fb..527a93df4f9 100644
--- a/tgui/packages/tgui/interfaces/TelecommsMultitoolMenu.js
+++ b/tgui/packages/tgui/interfaces/TelecommsMultitoolMenu.js
@@ -142,10 +142,8 @@ const TelecommsMultitoolMenuPolymorphicOptions = (props, context) => {
const {
// Relay
- use_listening_level,
use_broadcasting,
use_receiving,
- listening_level,
broadcasting,
receiving,
// Bus
@@ -160,22 +158,13 @@ const TelecommsMultitoolMenuPolymorphicOptions = (props, context) => {
} = props.options;
// If absolutely nothing is active, we tell the user there ain't no shit here.
- if (!use_listening_level && !use_broadcasting && !use_receiving
- && !use_change_freq && !use_broadcast_range && !use_receive_range) {
+ if (!use_broadcasting && !use_receiving && !use_change_freq && !use_broadcast_range && !use_receive_range) {
return ;
}
return (
- {use_listening_level ? (
-
-
- ) : null}
{use_broadcasting ? (
);
-};
\ 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 5d3e5ad5e8f..1edc85c09c8 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=202)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(417);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(173),r=n(28),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(434).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(127);t.AnimatedNumber=o.AnimatedNumber;var r=n(442);t.BlockQuote=r.BlockQuote;var a=n(19);t.Box=a.Box;var i=n(128);t.Button=i.Button;var c=n(443);t.ByondUi=c.ByondUi;var l=n(445);t.Chart=l.Chart;var d=n(446);t.Collapsible=d.Collapsible;var u=n(447);t.ColorBox=u.ColorBox;var s=n(180);t.Dimmer=s.Dimmer;var m=n(181);t.Divider=m.Divider;var p=n(130);t.DraggableControl=p.DraggableControl;var h=n(448);t.Dropdown=h.Dropdown;var f=n(182);t.Flex=f.Flex;var C=n(449);t.Grid=C.Grid;var N=n(129);t.Icon=N.Icon;var b=n(450);t.Input=b.Input;var V=n(451);t.Knob=V.Knob;var g=n(452);t.LabeledControls=g.LabeledControls;var v=n(453);t.LabeledList=v.LabeledList;var k=n(454);t.NanoMap=k.NanoMap;var _=n(455);t.Modal=_.Modal;var y=n(456);t.NoticeBox=y.NoticeBox;var L=n(132);t.NumberInput=L.NumberInput;var B=n(457);t.ProgressBar=B.ProgressBar;var x=n(458);t.Section=x.Section;var w=n(459);t.Slider=w.Slider;var S=n(131);t.Table=S.Table;var I=n(460);t.Tabs=I.Tabs;var T=n(179);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(126);t.Layout=o.Layout,t.refocusLayout=o.refocusLayout;var r=n(441);t.NtosWindow=r.NtosWindow;var a=n(183);t.Window=a.Window},function(e,t,n){"use strict";var o=n(9),r=n(23).f,a=n(33),i=n(26),c=n(98),l=n(140),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|deg|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(/?([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.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?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(9),r=n(100),a=n(21),i=n(64),c=n(104),l=n(143),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(12),r=n(137),a=n(13),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";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(10),r=n(0),a=n(440),i=n(28);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 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";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()};
+!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=202)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(417);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(173),r=n(28),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(434).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(127);t.AnimatedNumber=o.AnimatedNumber;var r=n(442);t.BlockQuote=r.BlockQuote;var a=n(19);t.Box=a.Box;var i=n(128);t.Button=i.Button;var c=n(443);t.ByondUi=c.ByondUi;var l=n(445);t.Chart=l.Chart;var d=n(446);t.Collapsible=d.Collapsible;var u=n(447);t.ColorBox=u.ColorBox;var s=n(180);t.Dimmer=s.Dimmer;var m=n(181);t.Divider=m.Divider;var p=n(130);t.DraggableControl=p.DraggableControl;var h=n(448);t.Dropdown=h.Dropdown;var f=n(182);t.Flex=f.Flex;var C=n(449);t.Grid=C.Grid;var N=n(129);t.Icon=N.Icon;var b=n(450);t.Input=b.Input;var V=n(451);t.Knob=V.Knob;var g=n(452);t.LabeledControls=g.LabeledControls;var v=n(453);t.LabeledList=v.LabeledList;var k=n(454);t.NanoMap=k.NanoMap;var y=n(455);t.Modal=y.Modal;var _=n(456);t.NoticeBox=_.NoticeBox;var L=n(132);t.NumberInput=L.NumberInput;var B=n(457);t.ProgressBar=B.ProgressBar;var x=n(458);t.Section=x.Section;var w=n(459);t.Slider=w.Slider;var S=n(131);t.Table=S.Table;var I=n(460);t.Tabs=I.Tabs;var T=n(179);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(126);t.Layout=o.Layout,t.refocusLayout=o.refocusLayout;var r=n(441);t.NtosWindow=r.NtosWindow;var a=n(183);t.Window=a.Window},function(e,t,n){"use strict";var o=n(9),r=n(23).f,a=n(33),i=n(26),c=n(98),l=n(140),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|deg|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(/?([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.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?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(9),r=n(100),a=n(21),i=n(64),c=n(104),l=n(143),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(12),r=n(137),a=n(13),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";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(10),r=n(0),a=n(440),i=n(28);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 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";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={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";var o=n(53),r=n(63),a=n(18),i=n(15),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,V=a(p),g=r(V),v=o(h,f,3),k=i(g.length),_=0,y=C||c,L=t?y(p,k):n?y(p,0):undefined;k>_;_++)if((m||_ in g)&&(b=v(N=g[_],_,V),e))if(t)L[_]=b;else if(b)switch(e){case 3:return!0;case 5:return N;case 6:return _;case 2:l.call(L,N)}else if(u)return!1;return s?-1:d||u?u:L}};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(12),r=n(77),a=n(51),i=n(29),c=n(37),l=n(21),d=n(137),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(174);
+ */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={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";var o=n(53),r=n(63),a=n(18),i=n(15),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,V=a(p),g=r(V),v=o(h,f,3),k=i(g.length),y=0,_=C||c,L=t?_(p,k):n?_(p,0):undefined;k>y;y++)if((m||y in g)&&(b=v(N=g[y],y,V),e))if(t)L[y]=b;else if(b)switch(e){case 3:return!0;case 5:return N;case 6:return y;case 2:l.call(L,N)}else if(u)return!1;return s?-1:d||u?u:L}};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(12),r=n(77),a=n(51),i=n(29),c=n(37),l=n(21),d=n(137),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(174);
/**
* @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+""+t+">"}},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(12),r=n(17),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(11);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(139),c=n(9),l=n(11),d=n(33),u=n(21),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(21),r=n(18),a=n(78),i=n(111),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(141),r=n(9),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";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);n1?r-1:0),c=1;c1?o-1:0),a=1;an;)r[n]=t[n++];return r},H=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},G=function(e){var t;return e instanceof P||"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]):A(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||(B.f=Y,L.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,f=r[c],C=f,N=C&&C.prototype,L={},B=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=E(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(b(t)?G(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)})),g&&g(C,D),_(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(!G(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 M("Wrong length");if((i=f-s)<0)throw M("Wrong length")}else if((i=m(o)*a)+s>f)throw M("Wrong length");l=i/a}else l=p(t),r=new P(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new O(r)});u"+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(17).f,r=n(21),a=n(16)("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(16),r=n(47),a=n(17),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(13),r=n(35),a=n(16)("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(142),r=n(102).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(17),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(13),r=n(153);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(11),a=n(21),i=n(17).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(17),a=n(16),i=n(12),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(29),r=n(15),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(142),r=n(102);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(11),r=n(57),a=n(16)("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(16),a=n(105),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(13),r=n(107),a=n(15),i=n(53),c=n(108),l=n(150),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,V=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?V(o(b=e[h])[0],b[1]):V(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,V,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(439),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(9),r=n(12),a=n(112),i=n(33),c=n(72),l=n(6),d=n(59),u=n(34),s=n(15),m=n(155),p=n(249),h=n(39),f=n(55),C=n(52).f,N=n(17).f,b=n(106),V=n(48),g=n(38),v=g.get,k=g.set,_=o.ArrayBuffer,y=_,L=o.DataView,B=L&&L.prototype,x=Object.prototype,w=o.RangeError,S=p.pack,I=p.unpack,T=function(e){return[255&e]},A=function(e){return[255&e,e>>8&255]},E=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},M=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},P=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]}})},R=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()},D=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 y||i(y,j,_[j]);W.constructor=y}f&&h(B)!==x&&f(B,x);var H=new L(new y(2)),G=B.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(B,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.call(this,e,t<<24>>24)}},{unsafe:!0})}else y=function(e){d(this,y,"ArrayBuffer");var t=m(e);k(this,{bytes:b.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},L=function(e,t,n){d(this,L,"DataView"),d(e,y,"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");k(this,{buffer:e,byteLength:n,byteOffset:a}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},r&&(F(y,"byteLength"),F(L,"buffer"),F(L,"byteLength"),F(L,"byteOffset")),c(L.prototype,{getInt8:function(e){return R(this,1,e)[0]<<24>>24},getUint8:function(e){return R(this,1,e)[0]},getInt16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return M(R(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return M(R(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return I(R(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return I(R(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){D(this,1,e,T,t)},setUint8:function(e,t){D(this,1,e,T,t)},setInt16:function(e,t){D(this,2,e,A,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){D(this,2,e,A,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){D(this,4,e,E,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){D(this,4,e,E,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){D(this,4,e,P,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){D(this,8,e,O,t,arguments.length>2?arguments[2]:undefined)}});V(y,"ArrayBuffer"),V(L,"DataView"),e.exports={ArrayBuffer:y,DataView:L}},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(67),i=n(26),c=n(56),l=n(74),d=n(59),u=n(11),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],V=b&&b.prototype,g=b,v={},k=function(e){var t=V[e];i(V,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||V.forEach&&!s((function(){(new b).entries().next()})))))g=n.getConstructor(t,e,f,N),c.REQUIRED=!0;else if(a(e,!0)){var _=new g,y=_[N](C?{}:-0,1)!=_,L=s((function(){_.has(1)})),B=m((function(e){new b(e)})),x=!C&&s((function(){for(var e=new b,t=5;t--;)e[N](t,t);return!e.has(-0)}));B||((g=t((function(t,n){d(t,g,e);var o=h(new b,t,g);return n!=undefined&&l(n,o[N],o,f),o}))).prototype=V,V.constructor=g),(L||x)&&(k("delete"),k("has"),f&&k("get")),(x||y)&&k(N),C&&V.clear&&delete V.clear}return v[e]=g,o({global:!0,forced:g!=b},v),p(g,e),C||n.setStrong(g,e,f),g}},function(e,t,n){"use strict";var o=n(11),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(42),r=n(9),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(13);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(118),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}),V=b[0],g=b[1];o(String.prototype,e,V),o(RegExp.prototype,h,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.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";t.__esModule=!0,t.CrewManifestContent=t.CrewManifest=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(28),l=n(7);t.CrewManifest=function(e,t){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,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.manifest);return(0,o.createComponentVNode)(2,a.Section,{title:"Crew Manifest",noTopPadding:!0,children:i.map((function(e){return!!e.elems.length&&(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:c.COLORS.manifest[e.cat.toLowerCase()],m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:e.cat})}),level:2,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Active"})]}),e.elems.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{color:"average",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,l.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.active})]},e.name+e.rank)}))]})},e.cat)}))})};t.CrewManifestContent=d},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";var o=n(9),r=n(11),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(9),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(138),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(42),r=n(138);(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(103),i=n(13);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(9),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(15);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(16),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(16)("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(16)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(234),a=n(39),i=n(55),c=n(48),l=n(33),d=n(26),u=n(16),s=n(42),m=n(71),p=n(152),h=p.IteratorPrototype,f=p.BUGGY_SAFARI_ITERATORS,C=u("iterator"),N=function(){return this};e.exports=function(e,t,n,u,p,b,V){r(n,t,u);var g,v,k,_=function(e){if(e===p&&w)return w;if(!f&&e in B)return B[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},y=t+" Iterator",L=!1,B=e.prototype,x=B[C]||B["@@iterator"]||p&&B[p],w=!f&&x||_(p),S="Array"==t&&B.entries||x;if(S&&(g=a(S.call(new e)),h!==Object.prototype&&g.next&&(s||a(g)===h||(i?i(g,h):"function"!=typeof g[C]&&l(g,C,N)),c(g,y,!0,!0),s&&(m[y]=N))),"values"==p&&x&&"values"!==x.name&&(L=!0,w=function(){return x.call(this)}),s&&!V||B[C]===w||l(B,C,w),m[t]=w,p)if(v={values:_("values"),keys:b?w:_("keys"),entries:_("entries")},V)for(k in v)(f||L||!(k in B))&&d(B,k,v[k]);else o({target:t,proto:!0,forced:f||L},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(15),r=n(114),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(9),c=n(6),l=n(36),d=n(53),u=n(145),s=n(97),m=n(164),p=i.location,h=i.setImmediate,f=i.clearImmediate,C=i.process,N=i.MessageChannel,b=i.Dispatch,V=0,g={},v=function(e){if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},k=function(e){return function(){v(e)}},_=function(e){v(e.data)},y=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 g[++V]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(V),V},f=function(e){delete g[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=_,o=d(a.postMessage,a,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||c(y)||"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=y,i.addEventListener("message",_,!1))),e.exports={set:h,clear:f}},function(e,t,n){"use strict";var o=n(11),r=n(36),a=n(16)("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(117);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(16)("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(119).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(9),r=n(6),a=n(81),i=n(14).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"}};
+ */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+""+t+">"}},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(12),r=n(17),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(11);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(139),c=n(9),l=n(11),d=n(33),u=n(21),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(21),r=n(18),a=n(78),i=n(111),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(141),r=n(9),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";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);n1?r-1:0),c=1;c1?o-1:0),a=1;an;)r[n]=t[n++];return r},H=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},G=function(e){var t;return e instanceof P||"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]):A(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||(B.f=Y,L.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,f=r[c],C=f,N=C&&C.prototype,L={},B=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=E(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(b(t)?G(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)})),g&&g(C,D),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(!G(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 M("Wrong length");if((i=f-s)<0)throw M("Wrong length")}else if((i=m(o)*a)+s>f)throw M("Wrong length");l=i/a}else l=p(t),r=new P(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new O(r)});u"+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(17).f,r=n(21),a=n(16)("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(16),r=n(47),a=n(17),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(13),r=n(35),a=n(16)("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(142),r=n(102).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(17),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(13),r=n(153);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(11),a=n(21),i=n(17).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(17),a=n(16),i=n(12),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(29),r=n(15),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(142),r=n(102);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(11),r=n(57),a=n(16)("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(16),a=n(105),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(13),r=n(107),a=n(15),i=n(53),c=n(108),l=n(150),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,V=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?V(o(b=e[h])[0],b[1]):V(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,V,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(439),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(9),r=n(12),a=n(112),i=n(33),c=n(72),l=n(6),d=n(59),u=n(34),s=n(15),m=n(155),p=n(249),h=n(39),f=n(55),C=n(52).f,N=n(17).f,b=n(106),V=n(48),g=n(38),v=g.get,k=g.set,y=o.ArrayBuffer,_=y,L=o.DataView,B=L&&L.prototype,x=Object.prototype,w=o.RangeError,S=p.pack,I=p.unpack,T=function(e){return[255&e]},A=function(e){return[255&e,e>>8&255]},E=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},M=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},P=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]}})},R=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()},D=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,y[j]);W.constructor=_}f&&h(B)!==x&&f(B,x);var H=new L(new _(2)),G=B.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(B,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.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)},L=function(e,t,n){d(this,L,"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");k(this,{buffer:e,byteLength:n,byteOffset:a}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},r&&(F(_,"byteLength"),F(L,"buffer"),F(L,"byteLength"),F(L,"byteOffset")),c(L.prototype,{getInt8:function(e){return R(this,1,e)[0]<<24>>24},getUint8:function(e){return R(this,1,e)[0]},getInt16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=R(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return M(R(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return M(R(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return I(R(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return I(R(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){D(this,1,e,T,t)},setUint8:function(e,t){D(this,1,e,T,t)},setInt16:function(e,t){D(this,2,e,A,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){D(this,2,e,A,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){D(this,4,e,E,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){D(this,4,e,E,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){D(this,4,e,P,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){D(this,8,e,O,t,arguments.length>2?arguments[2]:undefined)}});V(_,"ArrayBuffer"),V(L,"DataView"),e.exports={ArrayBuffer:_,DataView:L}},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(67),i=n(26),c=n(56),l=n(74),d=n(59),u=n(11),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],V=b&&b.prototype,g=b,v={},k=function(e){var t=V[e];i(V,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||V.forEach&&!s((function(){(new b).entries().next()})))))g=n.getConstructor(t,e,f,N),c.REQUIRED=!0;else if(a(e,!0)){var y=new g,_=y[N](C?{}:-0,1)!=y,L=s((function(){y.has(1)})),B=m((function(e){new b(e)})),x=!C&&s((function(){for(var e=new b,t=5;t--;)e[N](t,t);return!e.has(-0)}));B||((g=t((function(t,n){d(t,g,e);var o=h(new b,t,g);return n!=undefined&&l(n,o[N],o,f),o}))).prototype=V,V.constructor=g),(L||x)&&(k("delete"),k("has"),f&&k("get")),(x||_)&&k(N),C&&V.clear&&delete V.clear}return v[e]=g,o({global:!0,forced:g!=b},v),p(g,e),C||n.setStrong(g,e,f),g}},function(e,t,n){"use strict";var o=n(11),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(42),r=n(9),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(13);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(118),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}),V=b[0],g=b[1];o(String.prototype,e,V),o(RegExp.prototype,h,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.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";t.__esModule=!0,t.CrewManifestContent=t.CrewManifest=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(28),l=n(7);t.CrewManifest=function(e,t){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,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.manifest);return(0,o.createComponentVNode)(2,a.Section,{title:"Crew Manifest",noTopPadding:!0,children:i.map((function(e){return!!e.elems.length&&(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:c.COLORS.manifest[e.cat.toLowerCase()],m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:e.cat})}),level:2,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Active"})]}),e.elems.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{color:"average",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,l.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.active})]},e.name+e.rank)}))]})},e.cat)}))})};t.CrewManifestContent=d},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";var o=n(9),r=n(11),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(9),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(138),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(42),r=n(138);(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(103),i=n(13);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(9),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(15);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(16),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(16)("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(16)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(234),a=n(39),i=n(55),c=n(48),l=n(33),d=n(26),u=n(16),s=n(42),m=n(71),p=n(152),h=p.IteratorPrototype,f=p.BUGGY_SAFARI_ITERATORS,C=u("iterator"),N=function(){return this};e.exports=function(e,t,n,u,p,b,V){r(n,t,u);var g,v,k,y=function(e){if(e===p&&w)return w;if(!f&&e in B)return B[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},_=t+" Iterator",L=!1,B=e.prototype,x=B[C]||B["@@iterator"]||p&&B[p],w=!f&&x||y(p),S="Array"==t&&B.entries||x;if(S&&(g=a(S.call(new e)),h!==Object.prototype&&g.next&&(s||a(g)===h||(i?i(g,h):"function"!=typeof g[C]&&l(g,C,N)),c(g,_,!0,!0),s&&(m[_]=N))),"values"==p&&x&&"values"!==x.name&&(L=!0,w=function(){return x.call(this)}),s&&!V||B[C]===w||l(B,C,w),m[t]=w,p)if(v={values:y("values"),keys:b?w:y("keys"),entries:y("entries")},V)for(k in v)(f||L||!(k in B))&&d(B,k,v[k]);else o({target:t,proto:!0,forced:f||L},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(15),r=n(114),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(9),c=n(6),l=n(36),d=n(53),u=n(145),s=n(97),m=n(164),p=i.location,h=i.setImmediate,f=i.clearImmediate,C=i.process,N=i.MessageChannel,b=i.Dispatch,V=0,g={},v=function(e){if(g.hasOwnProperty(e)){var t=g[e];delete g[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 g[++V]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(V),V},f=function(e){delete g[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(11),r=n(36),a=n(16)("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(117);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(16)("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(119).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(9),r=n(6),a=n(81),i=n(14).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.Layout=t.refocusLayout=void 0;var o=n(0),r=n(10),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(10),a=n(93),i=n(3),c=n(24),l=n(19),d=n(129),u=n(179);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.iconRotation,h=e.iconSpin,f=e.iconColor,C=e.iconSize,N=e.color,b=e.disabled,V=e.selected,g=e.tooltip,v=e.tooltipPosition,k=e.tooltipScale,_=e.ellipsis,y=e.compact,L=e.circular,B=e.content,x=e.children,w=e.onclick,S=e.onClick,I=m(e,["className","fluid","icon","iconRotation","iconSpin","iconColor","iconSize","color","disabled","selected","tooltip","tooltipPosition","tooltipScale","ellipsis","compact","circular","content","children","onclick","onClick"]),T=!(!B&&!x);return w&&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",b&&"Button--disabled",V&&"Button--selected",T&&"Button--hasContent",_&&"Button--ellipsis",L&&"Button--circular",y&&"Button--compact",N&&"string"==typeof N?"Button--color--"+N:"Button--color--default",t]),tabIndex:!b&&"0",unselectable:Byond.IS_LTE_IE8,onclick:function(e){(0,i.refocusLayout)(),!b&&S&&S(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!b&&S&&S(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},I,{children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:s,spin:h,color:f,fontSize:C}),B,x,g&&(0,o.createComponentVNode)(2,u.Tooltip,{content:g,position:v,scale:k})]})))};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(10),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(10),i=n(127);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,V=d.forcedInputWidth,g=d.height,v=d.lineHeight,k=d.fontSize,_=s;(n||l)&&(_=c);var y=function(e){return e+(m?" "+m:"")},L=u&&!n&&!l&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:_,format:f,children:y})||y(f?f(_):_),B=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:a?undefined:"none",height:g,width:V,"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:_,displayElement:L,inputElement:B,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(10),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(10),i=n(127),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,V=s.height,g=s.width,v=s.lineHeight,k=s.fontSize,_=s.format,y=s.onChange,L=s.onDrag,B=f;(n||u)&&(B=d);var x=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(C?" "+C:""),0,{unselectable:Byond.IS_LTE_IE8})},w=h&&!n&&!u&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:B,format:_,children:x})||x(_?_(B):B);return(0,o.createComponentVNode)(2,c.Box,{className:(0,a.classes)(["NumberInput",p&&"NumberInput--fluid",m]),minWidth:g,minHeight:V,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)((B-N)/(b-N)*100,0,100)+"%"}}),2),w,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:l?undefined:"none",height:V,"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(),y&&y(t,n),L&&L(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(),y&&y(t,n),void(L&&L(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(10),i=n(8),c=n(1),l=n(20),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,g,{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=V;var g=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],V=(0,c.useSharedState)(t,"search_text",""),g=V[0],v=V[1];if(!C||!u[C]){var k=a(l);if(!k)return;b(k)}return g?(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)}}(g,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)}})})]})}),!!g&&(0,r.createComponentVNode)(2,_,{name:"Search Results",parts:n,forceShow:!0,placeholder:"No matching results..."})||Object.keys(n).map((function(e){return(0,r.createComponentVNode)(2,_,{name:e,parts:n[e]},e)}))],0)},_=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,g,{formatmoney:!0,style:{transform:"scale(0.75) translate(0%, 10%)"},name:t,amount:e.cost[t]})},t)}))})],0,e.name)}))]})},y=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,x)}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,B,{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,L,{queueMaterials:u,missingMaterials:s})})})]})},L=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,g,{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)}))})},B=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)},x=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.IdentificationComputerRegions=t.IdentificationComputerAccessModification=t.IdentificationComputerPrinting=t.IdentificationComputerContent=t.IdentificationComputer=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=n(7),d=(n(28),n(94));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,u=c.mode,p=c.has_modify,h=c.printing,f=(0,o.createComponentVNode)(2,m,{ntos:l});return l&&!c.have_id_slot?f=(0,o.createComponentVNode)(2,d.CrewManifestContent):h?f=(0,o.createComponentVNode)(2,s):1===u&&(f=(0,o.createComponentVNode)(2,d.CrewManifestContent)),(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===u,onClick:function(){return r("mode",{mode_target:0})},children:"Access Modification"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"home",selected:1===u,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:!u&&!p,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,V=c.all_centcom_access,g=(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===g,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:V.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},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";t.__esModule=!0,t.AreaCharge=t.PowerMonitorFocus=t.PowerMonitorContent=t.PowerMonitor=t.powerRank=void 0;var o=n(0),r=n(8),a=n(41),i=n(5),c=n(10),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],V=p.supply[p.supply.length-1]||0,g=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]})),_=Math.max.apply(Math,[s].concat(p.supply,p.demand)),y=(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:V,minValue:0,maxValue:_,color:"teal",children:(0,i.toFixed)(V/1e3)+" kW"})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:g,minValue:0,maxValue:_,color:"pink",children:(0,i.toFixed)(g/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,_],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,_],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"})]}),y.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";var o=n(12),r=n(6),a=n(97);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(9),r=n(98),a=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){"use strict";var o=n(9),r=n(99),a=o.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){"use strict";var o=n(21),r=n(101),a=n(23),i=n(17);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(104);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(12),r=n(17),a=n(13),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(29),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(16);t.f=o},function(e,t,n){"use strict";var o=n(18),r=n(46),a=n(15),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(15),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(13);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(29),r=n(49),a=n(71),i=n(38),c=n(110),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(21),d=n(16),u=n(42),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(11);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(29),r=n(34),a=n(15),i=n(43),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(15);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(11),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(11),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(9),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(12),r=n(68),a=n(29),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(9);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(9),m=n(23).f,p=n(36),h=n(116).set,f=n(164),C=s.MutationObserver||s.WebKitMutationObserver,N=s.process,b=s.Promise,V="process"==p(N),g=m(s,"queueMicrotask"),v=g&&g.value;v||(o=function(){var e,t;for(V&&(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()},V?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(13),r=n(11),a=n(167);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(378);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(15),a=n(108),i=n(107),c=n(53),l=n(14).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(13),i=n(11),c=n(59),l=n(74),d=n(22),u=n(21),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=[]},V=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};b.prototype={get:function(e){var t=V(this,e);if(t)return t[1]},has:function(e){return!!V(this,e)},set:function(e,t){var n=V(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(437),r=n(176);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 V=function(e){var t=(0,r.vecAdd)(e,C);return Byond.winset(window.__windowId__,{pos:t[0]+","+t[1]})};t.setWindowPosition=V;var g=function(e){return Byond.winset(window.__windowId__,{size:e[0]+"x"+e[1]})};t.setWindowSize=g;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 _=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",w),document.addEventListener("mouseup",x),w(e)};var x=function T(e){m.log("drag end"),w(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",T),h=!1,_(p)},w=function(e){h&&(e.preventDefault(),V((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 A(e){m.log("resize end",s),I(e),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",A),f=!1,_(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),g(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(8),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(10),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(10),a=n(93),i=n(3),c=n(24),l=n(19),d=n(129),u=n(179);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.iconRotation,h=e.iconSpin,f=e.iconColor,C=e.iconSize,N=e.color,b=e.disabled,V=e.selected,g=e.tooltip,v=e.tooltipPosition,k=e.tooltipScale,y=e.ellipsis,_=e.compact,L=e.circular,B=e.content,x=e.children,w=e.onclick,S=e.onClick,I=m(e,["className","fluid","icon","iconRotation","iconSpin","iconColor","iconSize","color","disabled","selected","tooltip","tooltipPosition","tooltipScale","ellipsis","compact","circular","content","children","onclick","onClick"]),T=!(!B&&!x);return w&&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",b&&"Button--disabled",V&&"Button--selected",T&&"Button--hasContent",y&&"Button--ellipsis",L&&"Button--circular",_&&"Button--compact",N&&"string"==typeof N?"Button--color--"+N:"Button--color--default",t]),tabIndex:!b&&"0",unselectable:Byond.IS_LTE_IE8,onclick:function(e){(0,i.refocusLayout)(),!b&&S&&S(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!b&&S&&S(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},I,{children:[c&&(0,o.createComponentVNode)(2,d.Icon,{name:c,rotation:s,spin:h,color:f,fontSize:C}),B,x,g&&(0,o.createComponentVNode)(2,u.Tooltip,{content:g,position:v,scale:k})]})))};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(10),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(10),i=n(127);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,V=d.forcedInputWidth,g=d.height,v=d.lineHeight,k=d.fontSize,y=s;(n||l)&&(y=c);var _=function(e){return e+(m?" "+m:"")},L=u&&!n&&!l&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:y,format:f,children:_})||_(f?f(y):y),B=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:a?undefined:"none",height:g,width:V,"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:L,inputElement:B,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(10),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(10),i=n(127),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,V=s.height,g=s.width,v=s.lineHeight,k=s.fontSize,y=s.format,_=s.onChange,L=s.onDrag,B=f;(n||u)&&(B=d);var x=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(C?" "+C:""),0,{unselectable:Byond.IS_LTE_IE8})},w=h&&!n&&!u&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:B,format:y,children:x})||x(y?y(B):B);return(0,o.createComponentVNode)(2,c.Box,{className:(0,a.classes)(["NumberInput",p&&"NumberInput--fluid",m]),minWidth:g,minHeight:V,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)((B-N)/(b-N)*100,0,100)+"%"}}),2),w,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:l?undefined:"none",height:V,"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),L&&L(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(L&&L(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(10),i=n(8),c=n(1),l=n(20),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,g,{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=V;var g=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],V=(0,c.useSharedState)(t,"search_text",""),g=V[0],v=V[1];if(!C||!u[C]){var k=a(l);if(!k)return;b(k)}return g?(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)}}(g,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)}})})]})}),!!g&&(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,g,{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,x)}),(0,r.createComponentVNode)(2,d.Flex.Item,{children:(0,r.createComponentVNode)(2,B,{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,L,{queueMaterials:u,missingMaterials:s})})})]})},L=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,g,{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)}))})},B=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)},x=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.IdentificationComputerRegions=t.IdentificationComputerAccessModification=t.IdentificationComputerPrinting=t.IdentificationComputerContent=t.IdentificationComputer=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3),l=n(7),d=(n(28),n(94));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,u=c.mode,p=c.has_modify,h=c.printing,f=(0,o.createComponentVNode)(2,m,{ntos:l});return l&&!c.have_id_slot?f=(0,o.createComponentVNode)(2,d.CrewManifestContent):h?f=(0,o.createComponentVNode)(2,s):1===u&&(f=(0,o.createComponentVNode)(2,d.CrewManifestContent)),(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===u,onClick:function(){return r("mode",{mode_target:0})},children:"Access Modification"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"home",selected:1===u,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:!u&&!p,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,V=c.all_centcom_access,g=(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===g,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:V.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},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";t.__esModule=!0,t.AreaCharge=t.PowerMonitorFocus=t.PowerMonitorContent=t.PowerMonitor=t.powerRank=void 0;var o=n(0),r=n(8),a=n(41),i=n(5),c=n(10),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],V=p.supply[p.supply.length-1]||0,g=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:V,minValue:0,maxValue:y,color:"teal",children:(0,i.toFixed)(V/1e3)+" kW"})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,d.ProgressBar,{value:g,minValue:0,maxValue:y,color:"pink",children:(0,i.toFixed)(g/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";var o=n(12),r=n(6),a=n(97);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(9),r=n(98),a=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){"use strict";var o=n(9),r=n(99),a=o.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){"use strict";var o=n(21),r=n(101),a=n(23),i=n(17);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(104);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(12),r=n(17),a=n(13),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(29),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(16);t.f=o},function(e,t,n){"use strict";var o=n(18),r=n(46),a=n(15),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(15),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(13);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(29),r=n(49),a=n(71),i=n(38),c=n(110),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(21),d=n(16),u=n(42),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(11);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(29),r=n(34),a=n(15),i=n(43),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(15);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(11),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(11),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(9),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(12),r=n(68),a=n(29),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(9);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(9),m=n(23).f,p=n(36),h=n(116).set,f=n(164),C=s.MutationObserver||s.WebKitMutationObserver,N=s.process,b=s.Promise,V="process"==p(N),g=m(s,"queueMicrotask"),v=g&&g.value;v||(o=function(){var e,t;for(V&&(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()},V?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(13),r=n(11),a=n(167);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(378);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(15),a=n(108),i=n(107),c=n(53),l=n(14).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(13),i=n(11),c=n(59),l=n(74),d=n(22),u=n(21),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=[]},V=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};b.prototype={get:function(e){var t=V(this,e);if(t)return t[1]},has:function(e){return!!V(this,e)},set:function(e,t){var n=V(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(437),r=n(176);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 V=function(e){var t=(0,r.vecAdd)(e,C);return Byond.winset(window.__windowId__,{pos:t[0]+","+t[1]})};t.setWindowPosition=V;var g=function(e){return Byond.winset(window.__windowId__,{size:e[0]+"x"+e[1]})};t.setWindowSize=g;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",w),document.addEventListener("mouseup",x),w(e)};var x=function T(e){m.log("drag end"),w(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",T),h=!1,y(p)},w=function(e){h&&(e.preventDefault(),V((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 A(e){m.log("resize end",s),I(e),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",A),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),g(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(8),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(10),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(10);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(10),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(10),a=n(7),i=n(1),c=n(2),l=n(28),d=n(125),u=n(175),s=n(24),m=n(177),p=n(126);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,V=C.suspended,g=(0,d.useDebug)(this.context).debugLayout,v=(0,m.useDispatch)(this.context),k=null==(e=N.window)?void 0:e.fancy,_=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,V=void 0!==b&&b,g=e.denialMessage;return V?void 0===g?"Error.":g: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(8),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(8),a=n(41),i=n(10),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 V=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:V.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(493),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,V=c.boss_short,g="View ("+l.length+")",v="Make Priority Announcement";d>0&&(v+=" ("+d+"s)");var k=u?"Message [UNKNOWN]":"Message "+V;s>0&&(k+=" ("+s+"s)");var _=m,y=p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!N,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 Manager-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{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:"Current Alert",color:C,children:_}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:y}),(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:g,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(8),a=n(41),i=n(1),c=n(3),l=n(2),d=n(131);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],V=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.ref)}))]}):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 V(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(135);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.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(20),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,V=d.SM_gas_PH,g=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:V}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2O",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SignalerContent=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){return(0,o.createComponentVNode)(2,c.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.code,u=l.frequency,s=l.minFrequency,m=l.maxFrequency;return(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:s/10,maxValue:m/10,value:u/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return c("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 c("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:d,width:"80px",onDrag:function(e,t){return c("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 c("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 c("signal")}})})})]})};t.SignalerContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=t.ICON_BY_CATEGORY_NAME=void 0;var o=n(0),r=n(10),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,V=p.piping_layer,g=p.pipe_layers,v=p.mode,k=p.preview_rows.flatMap((function(e){return e.previews})),_=(0,i.useLocalState)(t,"categoryName"),y=_[0],L=_[1],B=C.find((function(e){return e.cat_name===y}))||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(g).map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:g[e]===V,content:e,onClick:function(){return m("piping_layer",{piping_layer:g[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===B.cat_name,onClick:function(){return L(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==B?void 0:B.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:B.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(203)},function(e,t,n){"use strict";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(225),n(226),n(227),n(229),n(231),n(232),n(233),n(151),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(250),n(251),n(252),n(253),n(254),n(256),n(257),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(288),n(289),n(290),n(291),n(292),n(293),n(295),n(296),n(298),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(320),n(321),n(322),n(324),n(325),n(326),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(341),n(342),n(343),n(168),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(375),n(376),n(377),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),n(414),n(415),n(416);var o=n(0);n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433);var r=n(173),a=(n(174),n(1)),i=n(175),c=n(24),l=n(177);
+ */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(10),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(10);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(10),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(10),a=n(7),i=n(1),c=n(2),l=n(28),d=n(125),u=n(175),s=n(24),m=n(177),p=n(126);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,V=C.suspended,g=(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,V=void 0!==b&&b,g=e.denialMessage;return V?void 0===g?"Error.":g: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(8),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(8),a=n(41),i=n(10),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 V=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:V.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(493),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,V=c.boss_short,g="View ("+l.length+")",v="Make Priority Announcement";d>0&&(v+=" ("+d+"s)");var k=u?"Message [UNKNOWN]":"Message "+V;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:!N,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 Manager-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{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:"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:"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:g,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(8),a=n(41),i=n(1),c=n(3),l=n(2),d=n(131);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],V=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.ref)}))]}):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 V(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(135);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.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(20),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,V=d.SM_gas_PH,g=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:V}),"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"N\xb2O",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SignalerContent=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){return(0,o.createComponentVNode)(2,c.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.code,u=l.frequency,s=l.minFrequency,m=l.maxFrequency;return(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:s/10,maxValue:m/10,value:u/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return c("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 c("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:d,width:"80px",onDrag:function(e,t){return c("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 c("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 c("signal")}})})})]})};t.SignalerContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=t.ICON_BY_CATEGORY_NAME=void 0;var o=n(0),r=n(10),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,V=p.piping_layer,g=p.pipe_layers,v=p.mode,k=p.preview_rows.flatMap((function(e){return e.previews})),y=(0,i.useLocalState)(t,"categoryName"),_=y[0],L=y[1],B=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(g).map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:g[e]===V,content:e,onClick:function(){return m("piping_layer",{piping_layer:g[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===B.cat_name,onClick:function(){return L(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==B?void 0:B.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:B.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(203)},function(e,t,n){"use strict";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(225),n(226),n(227),n(229),n(231),n(232),n(233),n(151),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(250),n(251),n(252),n(253),n(254),n(256),n(257),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(288),n(289),n(290),n(291),n(292),n(293),n(295),n(296),n(298),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(320),n(321),n(322),n(324),n(325),n(326),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(341),n(342),n(343),n(168),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(375),n(376),n(377),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),n(414),n(415),n(416);var o=n(0);n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433);var r=n(173),a=(n(174),n(1)),i=n(175),c=n(24),l=n(177);
/**
* @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 h=(0,n(178).getRoutedComponent)(t),f=(0,o.createComponentVNode)(2,l.StoreProvider,{store:u,children:(0,o.createComponentVNode)(2,h)});d||(d=document.getElementById("react-root")),(0,o.render)(f,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(9),a=n(40),i=n(42),c=n(12),l=n(104),d=n(143),u=n(6),s=n(21),m=n(57),p=n(11),h=n(13),f=n(18),C=n(29),N=n(37),b=n(51),V=n(47),g=n(68),v=n(52),k=n(146),_=n(103),y=n(23),L=n(17),B=n(77),x=n(33),w=n(26),S=n(100),I=n(78),T=n(65),A=n(64),E=n(16),M=n(147),P=n(30),O=n(48),F=n(38),R=n(22).forEach,D=I("hidden"),j=E("toPrimitive"),W=F.set,z=F.getterFor("Symbol"),U=Object.prototype,H=r.Symbol,G=a("JSON","stringify"),K=y.f,Y=L.f,q=k.f,$=B.f,X=S("symbols"),Q=S("op-symbols"),J=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!=V(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=K(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]=V(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(Q,t,n),h(e);var o=N(t,!0);return h(n),s(X,o)?(n.enumerable?(s(e,D)&&e[D][o]&&(e[D][o]=!1),n=V(n,{enumerable:b(0,!1)})):(s(e,D)||Y(e,D,b(1,{})),e[D][o]=!0),oe(e,o,n)):Y(e,o,n)},ce=function(e,t){h(e);var n=C(t),o=g(n).concat(me(n));return R(o,(function(t){c&&!de.call(n,t)||ie(e,t,n[t])})),e},le=function(e,t){return t===undefined?V(e):ce(V(e),t)},de=function(e){var t=N(e,!0),n=$.call(this,t);return!(this===U&&s(X,t)&&!s(Q,t))&&(!(n||!s(this,t)||!s(X,t)||s(this,D)&&this[D][t])||n)},ue=function(e,t){var n=C(e),o=N(t,!0);if(n!==U||!s(X,o)||s(Q,o)){var r=K(n,o);return!r||!s(X,o)||s(n,D)&&n[D][o]||(r.enumerable=!0),r}},se=function(e){var t=q(C(e)),n=[];return R(t,(function(e){s(X,e)||s(T,e)||n.push(e)})),n},me=function(e){var t=e===U,n=q(t?Q:C(e)),o=[];return R(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=A(e),n=function o(e){this===U&&o.call(Q,e),s(this,D)&&s(this[D],t)&&(this[D][t]=!1),oe(this,t,b(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(A(e),e)})),B.f=de,L.f=ie,y.f=ue,v.f=k.f=se,_.f=me,M.f=function(e){return re(E(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}),R(g(ee),(function(e){P(e)})),o({target:"Symbol",stat:!0,forced:!l},{"for":function(e){var t=String(e);if(s(J,t))return J[t];var n=H(t);return J[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(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(f(e))}}),G)&&o({target:"JSON",stat:!0,forced:!l||u((function(){var e=H();return"[null]"!=G([e])||"{}"!=G({a:e})||"{}"!=G(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,G.apply(null,r)}});H.prototype[j]||x(H.prototype,j,H.prototype.valueOf),O(H,"Symbol"),T[D]=!0},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(9),i=n(21),c=n(11),l=n(17).f,d=n(140),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(30)("asyncIterator")},function(e,t,n){"use strict";n(30)("hasInstance")},function(e,t,n){"use strict";n(30)("isConcatSpreadable")},function(e,t,n){"use strict";n(30)("iterator")},function(e,t,n){"use strict";n(30)("match")},function(e,t,n){"use strict";n(30)("replace")},function(e,t,n){"use strict";n(30)("search")},function(e,t,n){"use strict";n(30)("species")},function(e,t,n){"use strict";n(30)("split")},function(e,t,n){"use strict";n(30)("toPrimitive")},function(e,t,n){"use strict";n(30)("toStringTag")},function(e,t,n){"use strict";n(30)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(57),i=n(11),c=n(18),l=n(15),d=n(54),u=n(69),s=n(70),m=n(16),p=n(105),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(148),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(43),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(106),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(149),a=n(18),i=n(15),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(149),a=n(18),i=n(15),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(228);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(22).forEach,r=n(43),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(230);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(150),i=n(107),c=n(15),l=n(54),d=n(108);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,V=d(h),g=0;if(b&&(N=o(N,C>2?arguments[2]:undefined,2)),V==undefined||f==Array&&i(V))for(n=new f(t=c(h.length));t>g;g++)p=b?N(h[g],g):h[g],l(n,g,p);else for(m=(s=V.call(h)).next,n=new f;!(u=m.call(s)).done;g++)p=b?a(s,N,[u.value,g],!0):u.value,l(n,g,p);return n.length=g,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(43),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(152).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(29),i=n(43),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(154);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(43),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(43),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(11),a=n(57),i=n(46),c=n(15),l=n(29),d=n(54),u=n(16),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(43),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(15),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),V=arguments.length;if(0===V?n=o=0:1===V?(n=0,o=N-b):(n=V-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(14);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(13),c=n(46),l=n(15),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(258),a=n(16)("toPrimitive"),i=Date.prototype;a in i||o(i,a,r)},function(e,t,n){"use strict";var o=n(13),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(156)})},function(e,t,n){"use strict";var o=n(11),r=n(17),a=n(39),i=n(16)("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(12),r=n(17).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(9);n(48)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(84),r=n(157);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(158),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(115),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(273)})},function(e,t,n){"use strict";var o=n(115),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(158)})},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(115)})},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(12),r=n(9),a=n(67),i=n(26),c=n(21),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(17).f,C=n(60).trim,N=r.Number,b=N.prototype,V="Number"==l(m(b)),g=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&&(V?s((function(){b.valueOf.call(n)})):"Number"!=l(n))?d(new N(g(t)),n,k):g(t)},_=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(","),y=0;_.length>y;y++)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(287)})},function(e,t,n){"use strict";var o=n(9).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(159)})},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(159),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(294);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(9),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(160);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(297),i=n(114),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(299);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(12),r=n(6),a=n(68),i=n(103),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(12)},{create:n(47)})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(88),i=n(18),c=n(35),l=n(17);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(12);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(144)})},function(e,t,n){"use strict";var o=n(4),r=n(12);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(17).f})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(88),i=n(18),c=n(35),l=n(17);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(161).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(11),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(29),i=n(23).f,c=n(12),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(12),a=n(101),i=n(29),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(146).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(111);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(162)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),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(11),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(11),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(12),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(12),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(11),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(11),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(109),r=n(26),a=n(323);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(109),r=n(80);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(161).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(160);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,a,i,c=n(4),l=n(42),d=n(9),u=n(40),s=n(163),m=n(26),p=n(72),h=n(48),f=n(58),C=n(11),N=n(35),b=n(59),V=n(36),g=n(99),v=n(74),k=n(81),_=n(50),y=n(116).set,L=n(165),B=n(166),x=n(327),w=n(167),S=n(328),I=n(38),T=n(67),A=n(16),E=n(105),M=A("species"),P="Promise",O=I.get,F=I.set,R=I.getterFor(P),D=s,j=d.TypeError,W=d.document,z=d.process,U=u("fetch"),H=w.f,G=H,K="process"==V(z),Y=!!(W&&W.createEvent&&d.dispatchEvent),q=T(P,(function(){if(!(g(D)!==String(D))){if(66===E)return!0;if(!K&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!D.prototype["finally"])return!0;if(E>=51&&/native code/.test(D))return!1;var e=D.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[M]=t,!(e.then((function(){}))instanceof t)})),$=q||!k((function(e){D.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;L((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&&x("Unhandled promise rejection",n)},Z=function(e,t){y.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){y.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?L((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&&(D=function(e){b(this,D,P),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:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(D.prototype,{then:function(e,t){var n=R(this),o=H(_(this,D));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)},w.f=H=function(e){return e===D||e===a?new r(e):G(e)},l||"function"!=typeof s||(i=s.prototype.then,m(s.prototype,"then",(function(e,t){var n=this;return new D((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 B(D,U.apply(d,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:D}),h(D,P,!1,!0),f(P),a=u(P),c({target:P,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(undefined,e),t.promise}}),c({target:P,stat:!0,forced:l||q},{resolve:function(e){return B(l&&this===a?D:this,e)}}),c({target:P,stat:!0,forced:$},{all:function(e){var t=this,n=H(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=H(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(9);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(42),a=n(163),i=n(6),c=n(40),l=n(50),d=n(166),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(13),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(13),c=n(11),l=n(47),d=n(156),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(12),a=n(13),i=n(37),c=n(17);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(13),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(11),a=n(13),i=n(21),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(12),a=n(13),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(13),a=n(39);o({target:"Reflect",stat:!0,sham:!n(111)},{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(13),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(101)})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(13);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(13),a=n(11),i=n(21),c=n(6),l=n(17),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(13),a=n(153),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(12),r=n(9),a=n(67),i=n(85),c=n(17).f,l=n(52).f,d=n(117),u=n(89),s=n(118),m=n(26),p=n(6),h=n(38).set,f=n(58),C=n(16)("match"),N=r.RegExp,b=N.prototype,V=/a/g,g=/a/g,v=new N(V)!==V,k=s.UNSUPPORTED_Y;if(o&&a("RegExp",!v||k||p((function(){return g[C]=!1,N(V)!=V||N(g)==g||"/a/i"!=N(V,"i")})))){for(var _=function(e,t){var n,o=this instanceof _,r=d(e),a=t===undefined;if(!o&&r&&e.constructor===_&&a)return e;v?r&&!a&&(e=e.source):e instanceof _&&(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,_);return k&&n&&h(c,{sticky:n}),c},y=function(e){e in _||c(_,e,{configurable:!0,get:function(){return N[e]},set:function(t){N[e]=t}})},L=l(N),B=0;L.length>B;)y(L[B++]);b.constructor=_,_.prototype=b,m(r,"RegExp",_)}f("RegExp")},function(e,t,n){"use strict";var o=n(12),r=n(17),a=n(89),i=n(118).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(13),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(157);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(119).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(15),c=n(120),l=n(25),d=n(121),u=n(42),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(120),a=n(25);o({target:"String",proto:!0,forced:!n(121)("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(119).charAt,r=n(38),a=n(110),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(13),a=n(15),i=n(25),c=n(122),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(113).end;o({target:"String",proto:!0,forced:n(169)},{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(113).start;o({target:"String",proto:!0,forced:n(169)},{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(29),a=n(15);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 g=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),g))}for(var _,y="",L=0,B=0;B=L&&(y+=p.slice(L,w)+E,L=w+x.length)}return y+p.slice(L)}];function V(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(13),a=n(25),i=n(162),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(117),a=n(13),i=n(25),c=n(50),l=n(122),d=n(15),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),V=r===undefined?4294967295:r>>>0;if(0===V)return[];if(0===m.length)return null===u(b,m)?[m]:[];for(var g=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(123)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(60).end,a=n(123)("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(123)("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(31);o({target:"String",proto:!0,forced:n(32)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(44)("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(44)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(44)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(14),r=n(148),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(14),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(14),r=n(106),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(14),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(14),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(14),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(14),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(124);(0,n(14).exportTypedArrayStaticMethod)("from",n(171),o)},function(e,t,n){"use strict";var o=n(14),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(14),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(9),r=n(14),a=n(151),i=n(16)("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(14),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(14),r=n(154),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(14),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(14),r=n(124),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(14),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(14),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(14),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(14),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(14),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(14),r=n(15),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(9),r=n(14),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(14).exportTypedArrayMethod,r=n(6),a=n(9).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(9),a=n(72),i=n(56),c=n(84),l=n(172),d=n(11),u=n(38).enforce,s=n(139),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,V=C.get,g=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)?V.call(this,e):t.frozen.get(e)}return V.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)?g.call(this,e,t):n.frozen.set(e,t)}else g.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(172))},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(116);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(9),a=n(165),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(9),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=we,t._HI=F,t._M=Se,t._MCCC=Ee,t._ME=Te,t._MFCC=Me,t._MP=Be,t._MR=be,t.__render=De,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 x(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 x(n,o)}(e,t,r),t);y.createVNode&&y.createVNode(i);return i},t.createFragment=A,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=E,t.findDOMfromVNode=V,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=E(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=E(t)),a=2;return e.children=n,e.childFlags=a,e}function F(e){return i(e)||r(e)?T(e,null):o(e)?A(e,0,null):16384&e.flags?E(e):e}var R="http://www.w3.org/1999/xlink",D="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":R,"xlink:arcrole":R,"xlink:href":R,"xlink:role":R,"xlink:show":R,"xlink:title":R,"xlink:type":R,"xml:base":D,"xml:lang":D,"xml:space":D};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 G(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&&!w(e,null)&&e.current&&(e.current=null)}function be(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){w(e,t)||void 0===e.current||(e.current=t)}))}function Ve(e,t){ge(e),g(e,t)}function ge(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)Le(c,null,n[c],o,r,a,null);i&&he(t,e,o,n,!0,a)}function xe(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=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=xe(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),Ee(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),Me(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=M());2===c?Se(i,n,r,o,r,a):Ae(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=M();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)L(p,s);else if(1!==m){var h=o&&"foreignObject"!==e.type;2===m?(16384&s.flags&&(e.children=s=E(s)),Se(s,p,n,h,null,i)):8!==m&&4!==m||Ae(s,p,n,h,null,i)}d(t)||f(t,p,r),d(l)||Be(e,c,l,p,o),be(e.ref,p,i)}function Ae(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&&Le(f,C,N,l,o,p,e)}if(h!==m)for(var b in h)a(c[b])&&!a(h[b])&&Le(b,h[b],null,l,o,p,e)}var V=t.children,g=t.className;e.className!==g&&(a(g)?l.removeAttribute("class"):o?l.setAttribute("class",g):l.className=g);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,V):Oe(e.childFlags,t.childFlags,e.children,V,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));Pe(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=M());var s=0!=(2&d);if(12&l){var m=i.length;(8&l&&8&d||s||!s&&c.length>m)&&(u=V(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:Pe(n,o,r,a,i,c,d);break;case 1:Ve(n,r);break;case 16:ge(n),L(r,o);break;default:!function(e,t,n,o,r,a){ge(e),Ae(t,n,o,r,V(e,!0),a),g(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:L(r,o);break;default:Ae(o,r,a,i,c,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:L(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),Ae(o,r,a,i,c,d)}break;default:switch(t){case 16:ve(n),L(r,o);break;case 2:_e(r,l,n),Se(o,r,a,i,c,d);break;case 1:_e(r,l,n);break;default:var u=0|n.length,s=0|o.length;0===u?s>0&&Ae(o,r,a,i,c,d):0===s?_e(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=E(C)),Pe(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=E(C)),Pe(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;)Ve(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,g=a-c+1,k=i-c+1,_=new Int32Array(k+1),y=g===o,L=!1,B=0,x=0;if(r<4||(g|k)<32)for(C=N;C<=a;++C)if(p=e[C],xc?L=!0:B=c,16384&h.flags&&(t[c]=h=E(h)),Pe(p,h,l,n,d,u,m),++x;break}!y&&c>i&&Ve(p,l)}else y||Ve(p,l);else{var w={};for(C=b;C<=i;++C)w[t[C].key]=C;for(C=N;C<=a;++C)if(p=e[C],xN;)Ve(e[N++],l);_[c-b]=C+1,B>c?L=!0:B=c,16384&(h=t[c]).flags&&(t[c]=h=E(h)),Pe(p,h,l,n,d,u,m),++x}else y||Ve(p,l);else y||Ve(p,l)}if(y)_e(l,s,e),Ae(t,l,n,d,u,m);else if(L){var S=function(e){var t=0,n=0,o=0,r=0,a=0,i=0,c=0,l=e.length;l>Re&&(Re=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}(_);for(c=S.length-1,C=k-1;C>=0;C--)0===_[C]?(16384&(h=t[B=C+b]).flags&&(t[B]=h=E(h)),Se(h,l,n,d,(f=B+1)=0;C--)0===_[C]&&(16384&(h=t[B=C+b]).flags&&(t[B]=h=E(h)),Se(h,l,n,d,(f=B+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:_(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;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,G.apply(null,r)}});H.prototype[j]||x(H.prototype,j,H.prototype.valueOf),O(H,"Symbol"),T[D]=!0},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(9),i=n(21),c=n(11),l=n(17).f,d=n(140),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(30)("asyncIterator")},function(e,t,n){"use strict";n(30)("hasInstance")},function(e,t,n){"use strict";n(30)("isConcatSpreadable")},function(e,t,n){"use strict";n(30)("iterator")},function(e,t,n){"use strict";n(30)("match")},function(e,t,n){"use strict";n(30)("replace")},function(e,t,n){"use strict";n(30)("search")},function(e,t,n){"use strict";n(30)("species")},function(e,t,n){"use strict";n(30)("split")},function(e,t,n){"use strict";n(30)("toPrimitive")},function(e,t,n){"use strict";n(30)("toStringTag")},function(e,t,n){"use strict";n(30)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(57),i=n(11),c=n(18),l=n(15),d=n(54),u=n(69),s=n(70),m=n(16),p=n(105),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(148),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(43),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(106),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(149),a=n(18),i=n(15),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(149),a=n(18),i=n(15),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(228);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(22).forEach,r=n(43),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(230);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(150),i=n(107),c=n(15),l=n(54),d=n(108);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,V=d(h),g=0;if(b&&(N=o(N,C>2?arguments[2]:undefined,2)),V==undefined||f==Array&&i(V))for(n=new f(t=c(h.length));t>g;g++)p=b?N(h[g],g):h[g],l(n,g,p);else for(m=(s=V.call(h)).next,n=new f;!(u=m.call(s)).done;g++)p=b?a(s,N,[u.value,g],!0):u.value,l(n,g,p);return n.length=g,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(43),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(152).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(29),i=n(43),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(154);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(43),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(43),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(11),a=n(57),i=n(46),c=n(15),l=n(29),d=n(54),u=n(16),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(43),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(15),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),V=arguments.length;if(0===V?n=o=0:1===V?(n=0,o=N-b):(n=V-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(14);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(13),c=n(46),l=n(15),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(258),a=n(16)("toPrimitive"),i=Date.prototype;a in i||o(i,a,r)},function(e,t,n){"use strict";var o=n(13),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(156)})},function(e,t,n){"use strict";var o=n(11),r=n(17),a=n(39),i=n(16)("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(12),r=n(17).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(9);n(48)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(84),r=n(157);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(158),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(115),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(273)})},function(e,t,n){"use strict";var o=n(115),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(158)})},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(115)})},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(12),r=n(9),a=n(67),i=n(26),c=n(21),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(17).f,C=n(60).trim,N=r.Number,b=N.prototype,V="Number"==l(m(b)),g=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&&(V?s((function(){b.valueOf.call(n)})):"Number"!=l(n))?d(new N(g(t)),n,k):g(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(287)})},function(e,t,n){"use strict";var o=n(9).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(159)})},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(159),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(294);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(9),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(160);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(297),i=n(114),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(299);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(12),r=n(6),a=n(68),i=n(103),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(12)},{create:n(47)})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(88),i=n(18),c=n(35),l=n(17);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(12);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(144)})},function(e,t,n){"use strict";var o=n(4),r=n(12);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(17).f})},function(e,t,n){"use strict";var o=n(4),r=n(12),a=n(88),i=n(18),c=n(35),l=n(17);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(161).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(11),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(29),i=n(23).f,c=n(12),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(12),a=n(101),i=n(29),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(146).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(111);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(162)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),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(11),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(11),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(12),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(12),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(11),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(11),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(109),r=n(26),a=n(323);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(109),r=n(80);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(161).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(160);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,a,i,c=n(4),l=n(42),d=n(9),u=n(40),s=n(163),m=n(26),p=n(72),h=n(48),f=n(58),C=n(11),N=n(35),b=n(59),V=n(36),g=n(99),v=n(74),k=n(81),y=n(50),_=n(116).set,L=n(165),B=n(166),x=n(327),w=n(167),S=n(328),I=n(38),T=n(67),A=n(16),E=n(105),M=A("species"),P="Promise",O=I.get,F=I.set,R=I.getterFor(P),D=s,j=d.TypeError,W=d.document,z=d.process,U=u("fetch"),H=w.f,G=H,K="process"==V(z),Y=!!(W&&W.createEvent&&d.dispatchEvent),q=T(P,(function(){if(!(g(D)!==String(D))){if(66===E)return!0;if(!K&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!D.prototype["finally"])return!0;if(E>=51&&/native code/.test(D))return!1;var e=D.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[M]=t,!(e.then((function(){}))instanceof t)})),$=q||!k((function(e){D.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;L((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&&x("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?L((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&&(D=function(e){b(this,D,P),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:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(D.prototype,{then:function(e,t){var n=R(this),o=H(y(this,D));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)},w.f=H=function(e){return e===D||e===a?new r(e):G(e)},l||"function"!=typeof s||(i=s.prototype.then,m(s.prototype,"then",(function(e,t){var n=this;return new D((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 B(D,U.apply(d,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:D}),h(D,P,!1,!0),f(P),a=u(P),c({target:P,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(undefined,e),t.promise}}),c({target:P,stat:!0,forced:l||q},{resolve:function(e){return B(l&&this===a?D:this,e)}}),c({target:P,stat:!0,forced:$},{all:function(e){var t=this,n=H(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=H(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(9);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(42),a=n(163),i=n(6),c=n(40),l=n(50),d=n(166),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(13),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(13),c=n(11),l=n(47),d=n(156),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(12),a=n(13),i=n(37),c=n(17);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(13),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(11),a=n(13),i=n(21),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(12),a=n(13),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(13),a=n(39);o({target:"Reflect",stat:!0,sham:!n(111)},{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(13),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(101)})},function(e,t,n){"use strict";var o=n(4),r=n(40),a=n(13);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(13),a=n(11),i=n(21),c=n(6),l=n(17),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(13),a=n(153),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(12),r=n(9),a=n(67),i=n(85),c=n(17).f,l=n(52).f,d=n(117),u=n(89),s=n(118),m=n(26),p=n(6),h=n(38).set,f=n(58),C=n(16)("match"),N=r.RegExp,b=N.prototype,V=/a/g,g=/a/g,v=new N(V)!==V,k=s.UNSUPPORTED_Y;if(o&&a("RegExp",!v||k||p((function(){return g[C]=!1,N(V)!=V||N(g)==g||"/a/i"!=N(V,"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}})},L=l(N),B=0;L.length>B;)_(L[B++]);b.constructor=y,y.prototype=b,m(r,"RegExp",y)}f("RegExp")},function(e,t,n){"use strict";var o=n(12),r=n(17),a=n(89),i=n(118).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(13),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(157);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(119).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(15),c=n(120),l=n(25),d=n(121),u=n(42),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(120),a=n(25);o({target:"String",proto:!0,forced:!n(121)("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(119).charAt,r=n(38),a=n(110),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(13),a=n(15),i=n(25),c=n(122),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(113).end;o({target:"String",proto:!0,forced:n(169)},{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(113).start;o({target:"String",proto:!0,forced:n(169)},{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(29),a=n(15);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 g=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),g))}for(var y,_="",L=0,B=0;B=L&&(_+=p.slice(L,w)+E,L=w+x.length)}return _+p.slice(L)}];function V(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(13),a=n(25),i=n(162),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(117),a=n(13),i=n(25),c=n(50),l=n(122),d=n(15),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),V=r===undefined?4294967295:r>>>0;if(0===V)return[];if(0===m.length)return null===u(b,m)?[m]:[];for(var g=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(123)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(60).end,a=n(123)("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(123)("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(31);o({target:"String",proto:!0,forced:n(32)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(31);o({target:"String",proto:!0,forced:n(32)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(44)("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(44)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(44)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(44)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(14),r=n(148),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(14),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(14),r=n(106),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(14),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(14),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(14),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(14),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(124);(0,n(14).exportTypedArrayStaticMethod)("from",n(171),o)},function(e,t,n){"use strict";var o=n(14),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(14),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(9),r=n(14),a=n(151),i=n(16)("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(14),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(14),r=n(154),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(a(this),arguments)}))},function(e,t,n){"use strict";var o=n(14),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(14),r=n(124),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(14),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(14),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(14),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(14),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(14),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(14),r=n(15),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(9),r=n(14),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(14).exportTypedArrayMethod,r=n(6),a=n(9).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(9),a=n(72),i=n(56),c=n(84),l=n(172),d=n(11),u=n(38).enforce,s=n(139),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,V=C.get,g=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)?V.call(this,e):t.frozen.get(e)}return V.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)?g.call(this,e,t):n.frozen.set(e,t)}else g.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(172))},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(116);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(9),a=n(165),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(9),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=we,t._HI=F,t._M=Se,t._MCCC=Ee,t._ME=Te,t._MFCC=Me,t._MP=Be,t._MR=be,t.__render=De,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 x(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 x(n,o)}(e,t,r),t);_.createVNode&&_.createVNode(i);return i},t.createFragment=A,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=E,t.findDOMfromVNode=V,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=E(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=E(t)),a=2;return e.children=n,e.childFlags=a,e}function F(e){return i(e)||r(e)?T(e,null):o(e)?A(e,0,null):16384&e.flags?E(e):e}var R="http://www.w3.org/1999/xlink",D="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":R,"xlink:arcrole":R,"xlink:href":R,"xlink:role":R,"xlink:show":R,"xlink:title":R,"xlink:type":R,"xml:base":D,"xml:lang":D,"xml:space":D};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 G(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&&!w(e,null)&&e.current&&(e.current=null)}function be(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){w(e,t)||void 0===e.current||(e.current=t)}))}function Ve(e,t){ge(e),g(e,t)}function ge(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)Le(c,null,n[c],o,r,a,null);i&&he(t,e,o,n,!0,a)}function xe(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=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=xe(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),Ee(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),Me(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=M());2===c?Se(i,n,r,o,r,a):Ae(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=M();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)L(p,s);else if(1!==m){var h=o&&"foreignObject"!==e.type;2===m?(16384&s.flags&&(e.children=s=E(s)),Se(s,p,n,h,null,i)):8!==m&&4!==m||Ae(s,p,n,h,null,i)}d(t)||f(t,p,r),d(l)||Be(e,c,l,p,o),be(e.ref,p,i)}function Ae(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&&Le(f,C,N,l,o,p,e)}if(h!==m)for(var b in h)a(c[b])&&!a(h[b])&&Le(b,h[b],null,l,o,p,e)}var V=t.children,g=t.className;e.className!==g&&(a(g)?l.removeAttribute("class"):o?l.setAttribute("class",g):l.className=g);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,V):Oe(e.childFlags,t.childFlags,e.children,V,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));Pe(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=M());var s=0!=(2&d);if(12&l){var m=i.length;(8&l&&8&d||s||!s&&c.length>m)&&(u=V(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:Pe(n,o,r,a,i,c,d);break;case 1:Ve(n,r);break;case 16:ge(n),L(r,o);break;default:!function(e,t,n,o,r,a){ge(e),Ae(t,n,o,r,V(e,!0),a),g(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:L(r,o);break;default:Ae(o,r,a,i,c,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:L(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),Ae(o,r,a,i,c,d)}break;default:switch(t){case 16:ve(n),L(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&&Ae(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=E(C)),Pe(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=E(C)),Pe(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;)Ve(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,g=a-c+1,k=i-c+1,y=new Int32Array(k+1),_=g===o,L=!1,B=0,x=0;if(r<4||(g|k)<32)for(C=N;C<=a;++C)if(p=e[C],xc?L=!0:B=c,16384&h.flags&&(t[c]=h=E(h)),Pe(p,h,l,n,d,u,m),++x;break}!_&&c>i&&Ve(p,l)}else _||Ve(p,l);else{var w={};for(C=b;C<=i;++C)w[t[C].key]=C;for(C=N;C<=a;++C)if(p=e[C],xN;)Ve(e[N++],l);y[c-b]=C+1,B>c?L=!0:B=c,16384&(h=t[c]).flags&&(t[c]=h=E(h)),Pe(p,h,l,n,d,u,m),++x}else _||Ve(p,l);else _||Ve(p,l)}if(_)ye(l,s,e),Ae(t,l,n,d,u,m);else if(L){var S=function(e){var t=0,n=0,o=0,r=0,a=0,i=0,c=0,l=e.length;l>Re&&(Re=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[B=C+b]).flags&&(t[B]=h=E(h)),Se(h,l,n,d,(f=B+1)=0;C--)0===y[C]&&(16384&(h=t[B=C+b]).flags&&(t[B]=h=E(h)),Se(h,l,n,d,(f=B+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,V=String(i.key),g=String(i.char),v=i.location,k=i.keyCode||(i.keyCode=V)&&V.charCodeAt(0)||0,_=i.charCode||(i.charCode=g)&&g.charCodeAt(0)||0,y=i.bubbles,L=i.cancelable,B=i.repeat,x=i.locale,w=i.view||e;if(i.which||(i.which=i.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,y,L,w,p,f,h,C,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(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){},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(435),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;o3?c(i):null,V=String(i.key),g=String(i.char),v=i.location,k=i.keyCode||(i.keyCode=V)&&V.charCodeAt(0)||0,y=i.charCode||(i.charCode=g)&&g.charCodeAt(0)||0,_=i.bubbles,L=i.cancelable,B=i.repeat,x=i.locale,w=i.view||e;if(i.which||(i.which=i.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,_,L,w,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){},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(435),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(10),a=n(444),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],V=N[N.length-1];N.push([C[0]+h,V[1]]),N.push([C[0]+h,-h]),N.push([-h,-h]),N.push([-h,b[1]])}var g=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(10),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(10),a=n(19),i=n(129);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"]),V=d?!this.state.open:this.state.open,g=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:V?"chevron-up":"chevron-down"}),2)]}))),g],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(131),a=n(10);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(10),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(10),i=n(19),c=n(130),l=n(132);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,V=e.className,g=e.style,v=e.fillValue,k=e.color,_=e.ranges,y=void 0===_?{}:_,L=e.size,B=e.bipolar,x=(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: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,y)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,B&&"Knob--bipolar",V,(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",x&&"Knob__popupValue--"+x]),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":((B?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":L+"rem"},g)},w)),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(182);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(10),a=n(19),i=n(181);var 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,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","label","labelColor","color","textAlign","verticalAlign","buttons","content","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.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"td",color:l,textAlign:d,verticalAlign:u,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:s?undefined:2},h,{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(10),a=n(19),i=n(180);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(10),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(10),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(10),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(10),i=n(19),c=n(130),l=n(132);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,V=e.fillValue,g=e.color,v=e.ranges,k=void 0===v?{}:v,_=e.children,y=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"]),L=_!==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=V!==undefined&&null!==V,h=((0,r.scale)(n,u,d),(0,r.scale)(null!=V?V:c,u,d)),f=(0,r.scale)(c,u,d),C=g||(0,r.keyOfMatchingRange)(null!=V?V:n,k)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Slider","ProgressBar","ProgressBar--color--"+C,b,(0,i.computeBoxClassName)(y)]),[(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",L?_:l,0),s],0,Object.assign({},(0,i.computeBoxProps)(y),{onMouseDown:m})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(10),a=n(19),i=n(128);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":462,"./APC.js":463,"./AccountsTerminal.js":464,"./AgentCard.js":465,"./AiAirlock.js":466,"./AiRestorer.js":467,"./AiSupermatter.js":468,"./AirAlarm.js":469,"./AlgaeFarm.js":471,"./AppearanceChanger.js":472,"./ArcadeBattle.js":473,"./AreaScrubberControl.js":474,"./AssemblyInfrared.js":475,"./AssemblyProx.js":476,"./AssemblyTimer.js":477,"./AtmosAlertConsole.js":478,"./AtmosControl.js":185,"./AtmosFilter.js":479,"./AtmosMixer.js":480,"./Autolathe.js":481,"./Batteryrack.js":482,"./BeaconLocator.js":483,"./Biogenerator.js":484,"./BodyDesigner.js":485,"./BodyScanner.js":486,"./BombTester.js":487,"./BotanyEditor.js":488,"./BotanyIsolator.js":489,"./BrigTimer.js":490,"./CameraConsole.js":186,"./Canister.js":491,"./ChemDispenser.js":492,"./ChemMaster.js":496,"./ClawMachine.js":497,"./Cleanbot.js":498,"./CloningConsole.js":499,"./ColorMate.js":500,"./CommunicationsConsole.js":188,"./Communicator.js":501,"./ComputerFabricator.js":502,"./CookingAppliance.js":503,"./CrewManifest.js":94,"./CrewMonitor.js":189,"./Cryo.js":504,"./CryoStorage.js":190,"./CryoStorageVr.js":505,"./DNAForensics.js":506,"./DNAModifier.js":507,"./DestinationTagger.js":508,"./DiseaseSplicer.js":509,"./DishIncubator.js":510,"./DisposalBin.js":511,"./DroneConsole.js":512,"./EmbeddedController.js":513,"./ExonetNode.js":514,"./ExosuitFabricator.js":133,"./Farmbot.js":515,"./Fax.js":516,"./FileCabinet.js":517,"./Floorbot.js":518,"./GasPump.js":519,"./GasTemperatureSystem.js":520,"./GeneralAtmoControl.js":521,"./GeneralRecords.js":522,"./Gps.js":523,"./GravityGenerator.js":524,"./GuestPass.js":525,"./GyrotronControl.js":526,"./Holodeck.js":527,"./ICAssembly.js":528,"./ICCircuit.js":529,"./ICDetailer.js":530,"./ICPrinter.js":531,"./IDCard.js":532,"./IdentificationComputer.js":134,"./InventoryPanel.js":533,"./InventoryPanelHuman.js":534,"./IsolationCentrifuge.js":535,"./JanitorCart.js":536,"./Jukebox.js":537,"./LawManager.js":538,"./LookingGlass.js":539,"./MechaControlConsole.js":540,"./Medbot.js":541,"./MedicalRecords.js":542,"./MessageMonitor.js":543,"./Microwave.js":544,"./MiningOreProcessingConsole.js":545,"./MiningStackingConsole.js":546,"./MiningVendor.js":547,"./MuleBot.js":548,"./NIF.js":549,"./NTNetRelay.js":550,"./Newscaster.js":551,"./NoticeBoard.js":552,"./NtosAccessDecrypter.js":553,"./NtosArcade.js":554,"./NtosAtmosControl.js":555,"./NtosCameraConsole.js":556,"./NtosCommunicationsConsole.js":557,"./NtosConfiguration.js":558,"./NtosCrewMonitor.js":559,"./NtosDigitalWarrant.js":560,"./NtosEmailAdministration.js":561,"./NtosEmailClient.js":193,"./NtosFileManager.js":562,"./NtosIdentificationComputer.js":563,"./NtosMain.js":564,"./NtosNetChat.js":565,"./NtosNetDos.js":566,"./NtosNetDownloader.js":567,"./NtosNetMonitor.js":568,"./NtosNetTransfer.js":569,"./NtosNewsBrowser.js":570,"./NtosOvermapNavigation.js":571,"./NtosPowerMonitor.js":572,"./NtosRCON.js":573,"./NtosRevelation.js":574,"./NtosShutoffMonitor.js":575,"./NtosStationAlertConsole.js":576,"./NtosSupermatterMonitor.js":577,"./NtosUAV.js":578,"./NtosWordProcessor.js":579,"./OmniFilter.js":580,"./OmniMixer.js":581,"./OperatingComputer.js":582,"./OvermapDisperser.js":583,"./OvermapEngines.js":584,"./OvermapHelm.js":585,"./OvermapNavigation.js":194,"./OvermapShieldGenerator.js":586,"./OvermapShipSensors.js":587,"./ParticleAccelerator.js":588,"./PartsLathe.js":589,"./PathogenicIsolator.js":590,"./Pda.js":591,"./PersonalCrafting.js":606,"./Photocopier.js":607,"./PipeDispenser.js":608,"./PlantAnalyzer.js":609,"./PointDefenseControl.js":610,"./PortableGenerator.js":611,"./PortablePump.js":612,"./PortableScrubber.js":613,"./PortableTurret.js":614,"./PowerMonitor.js":136,"./PressureRegulator.js":615,"./PrisonerManagement.js":616,"./RCON.js":195,"./RIGSuit.js":617,"./Radio.js":618,"./RapidPipeDispenser.js":200,"./RequestConsole.js":619,"./ResearchConsole.js":620,"./ResearchServerController.js":621,"./ResleevingConsole.js":622,"./ResleevingPod.js":623,"./RoboticsControlConsole.js":624,"./RogueZones.js":625,"./RustCoreMonitor.js":626,"./RustFuelControl.js":627,"./Secbot.js":628,"./SecureSafe.js":629,"./SecurityRecords.js":630,"./SeedStorage.js":631,"./ShieldCapacitor.js":632,"./ShieldGenerator.js":633,"./ShutoffMonitor.js":196,"./ShuttleControl.js":634,"./Signaler.js":199,"./Sleeper.js":635,"./SmartVend.js":636,"./Smes.js":637,"./SolarControl.js":638,"./SpaceHeater.js":639,"./Stack.js":640,"./StationAlertConsole.js":197,"./StationBlueprints.js":641,"./SuitCycler.js":642,"./SuitStorageUnit.js":643,"./SupermatterMonitor.js":198,"./SupplyConsole.js":644,"./TEGenerator.js":645,"./Tank.js":646,"./TankDispenser.js":647,"./TelecommsLogBrowser.js":648,"./TelecommsMachineBrowser.js":649,"./TelecommsMultitoolMenu.js":650,"./Teleporter.js":651,"./TelesciConsole.js":652,"./TimeClock.js":653,"./TransferValve.js":654,"./TurbineControl.js":655,"./Turbolift.js":656,"./Uplink.js":657,"./Vending.js":658,"./VolumePanel.js":659,"./VorePanel.js":660,"./Wires.js":661,"./XenoarchArtifactAnalyzer.js":662,"./XenoarchArtifactHarvester.js":663,"./XenoarchDepthScanner.js":664,"./XenoarchHandheldPowerUtilizer.js":665,"./XenoarchReplicator.js":666,"./XenoarchSpectrometer.js":667,"./XenoarchSuspension.js":668,"./pAIAtmos.js":669,"./pAIDirectives.js":670,"./pAIDoorjack.js":671,"./pAIInterface.js":672,"./pAIMedrecords.js":673,"./pAISecrecords.js":674};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=461},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(184),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.AccountsTerminal=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.AccountsTerminal=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.id_inserted,s=d.id_card,m=d.access_level,p=d.machine_id;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:640,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:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine",color:"average",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eject":"sign-in-alt",fluid:!0,content:s,onClick:function(){return l("insert_card")}})})]})}),m>0&&(0,o.createComponentVNode)(2,c)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,s=c.creating_new_account,m=c.detailed_account_view;return(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:!s&&!m,icon:"home",onClick:function(){return i("view_accounts_list")},children:"Home"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:s,icon:"cog",onClick:function(){return i("create_account")},children:"New Account"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{disabled:s,icon:"print",onClick:function(){return i("print")},children:"Print"})]}),s&&(0,o.createComponentVNode)(2,l)||m&&(0,o.createComponentVNode)(2,d)||(0,o.createComponentVNode)(2,u)]})},l=function(e,t){var n=(0,r.useBackend)(t).act,i=(0,r.useSharedState)(t,"holder",""),c=i[0],l=i[1],d=(0,r.useSharedState)(t,"money",""),u=d[0],s=d[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Create Account",level:2,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,a.Input,{value:c,fluid:!0,onInput:function(e,t){return l(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,a.Input,{value:u,fluid:!0,onInput:function(e,t){return s(t)}})})]}),(0,o.createComponentVNode)(2,a.Button,{disabled:!c||!u,mt:1,fluid:!0,icon:"plus",onClick:function(){return n("finalise_create_account",{holder_name:c,starting_funds:u})},content:"Create"})]})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.access_level,d=c.station_account_number,u=c.account_number,s=c.owner_name,m=c.money,p=c.suspended,h=c.transactions;return(0,o.createComponentVNode)(2,a.Section,{title:"Account Details",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"ban",selected:p,content:"Suspend",onClick:function(){return i("toggle_suspension")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Number",children:["#",u]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Holder",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Balance",children:[m,"\u20ae"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:p?"bad":"good",children:p?"SUSPENDED":"Active"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"CentCom Administrator",level:2,mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Payroll",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"bad",fluid:!0,icon:"ban",confirmIcon:"ban",content:"Revoke",confirmContent:"This cannot be undone.",disabled:u===d,onClick:function(){return i("revoke_payroll")}})})})}),l>=2&&(0,o.createComponentVNode)(2,a.Section,{title:"Silent Funds Transfer",level:2,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("add_funds")},content:"Add Funds"}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("remove_funds")},content:"Remove Funds"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",level:2,mt:1,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:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Target"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),h.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.date," ",e.time]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.amount,"\u20ae"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.source_terminal})]},t)}))]})})]})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.accounts;return(0,o.createComponentVNode)(2,a.Section,{title:"NanoTrasen Accounts",level:2,children:c.length&&(0,o.createComponentVNode)(2,a.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.owner_name+e.suspended,color:e.suspended?"bad":null,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"#"+e.account_number,onClick:function(){return i("view_account_detail",{account_index:e.account_index})}})},e.account_index)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"There are no accounts available."})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCard=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.AgentCard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.entries,u=l.electronic_warfare;return(0,o.createComponentVNode)(2,i.Window,{width:550,height:400,theme:"syndicate",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Table,{children:d.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,{onClick:function(){return c(e.name.toLowerCase().replace(/ /g,""))},icon:"cog"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.value})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Electronic Warfare",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:u?"Electronic warfare is enabled. This will prevent you from being tracked by the AI.":"Electronic warfare disabled.",onClick:function(){return c("electronic_warfare")}})})]})})}},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(20),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(28),l=n(3),d=n(184),u=n(470);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 V}}},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"},V=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(28);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(20),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(8),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,V=h.hair_style,g=h.facial_hair_style,v=h.change_race,k=h.change_gender,_=h.change_eye_color,y=h.change_skin_tone,L=h.change_skin_color,B=h.change_hair_color,x=h.change_facial_hair_color,w=h.change_hair,S=h.change_facial_hair,I=h.mapRef,T=r.title,A=_||y||L||B||x,E=-1;v?E=0:k?E=1:A?E=2:w?E=4:S&&(E=5);var M=(0,i.useLocalState)(t,"tabIndex",E),P=M[0],O=M[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:N?(0,a.capitalize)(N):"Not Set"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Gender Identity",color:A?null:"grey",children:b?(0,a.capitalize)(b):"Not Set"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Hair Style",color:w?null:"grey",children:V?(0,a.capitalize)(V):"Not Set"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Facial Hair Style",color:S?null:"grey",children:g?(0,a.capitalize)(g):"Not Set"})]})}),(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===P,onClick:function(){return O(0)},children:"Race"}):null,k?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===P,onClick:function(){return O(1)},children:"Gender & Sex"}):null,A?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===P,onClick:function(){return O(2)},children:"Colors"}):null,w?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===P,onClick:function(){return O(3)},children:"Hair"}):null,S?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===P,onClick:function(){return O(4)},children:"Facial Hair"}):null]}),(0,o.createComponentVNode)(2,c.Box,{height:"43%",children:[v&&0===P?(0,o.createComponentVNode)(2,d):null,k&&1===P?(0,o.createComponentVNode)(2,u):null,A&&2===P?(0,o.createComponentVNode)(2,s):null,w&&3===P?(0,o.createComponentVNode)(2,m):null,S&&4===P?(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.ArcadeBattle=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ArcadeBattle=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=(l.name,l.temp),u=l.enemyAction,s=l.enemyName,m=l.playerHP,p=l.playerMP,h=l.enemyHP,f=(l.enemyMP,l.gameOver);return(0,o.createComponentVNode)(2,i.Window,{width:400,height:240,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Section,{color:"label",children:[(0,o.createComponentVNode)(2,a.Box,{children:d}),(0,o.createComponentVNode)(2,a.Box,{children:!f&&u})]}),(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Player Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:30,ranges:{olive:[31,Infinity],good:[20,31],average:[10,20],bad:[-Infinity,10]},children:[m,"HP"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Player Magic",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:10,ranges:{purple:[11,Infinity],violet:[3,11],bad:[-Infinity,3]},children:[p,"MP"]})})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enemy HP",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,minValue:0,maxValue:45,ranges:{olive:[31,Infinity],good:[20,31],average:[10,20],bad:[-Infinity,10]},children:[h,"HP"]})})})})]}),f&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,color:"green",content:"New Game",onClick:function(){return c("newgame")}})||(0,o.createComponentVNode)(2,a.Flex,{mt:2,justify:"space-between",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"fist-raised",tooltip:"Go in for the kill!",tooltipPosition:"top",onClick:function(){return c("attack")},content:"Attack!"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"band-aid",tooltip:"Heal yourself!",tooltipPosition:"top",onClick:function(){return c("heal")},content:"Heal!"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"magic",tooltip:"Recharge your magic!",tooltipPosition:"top",onClick:function(){return c("charge")},content:"Recharge!"})})]})]})})})}},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(20);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(20);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(28),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(41)),a=n(8),i=n(1),c=n(2),l=n(3),d=n(133),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()),g=!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:g?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."}]],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,_);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,V,{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.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:d.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Volume",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(d.blood.volume,0)})," units\xa0(",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:(0,r.round)(d.blood.percent,0)}),"%)"]})]})})},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;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(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."})})},V=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,g,{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),!!e.inflamed&&"Appendicitis detected."])}),(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)}))]})})},_=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(20);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(20),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,V=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?V?"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:!!V&&(0,o.createComponentVNode)(2,i.Button,{icon:"eject",color:b&&"danger",content:"Eject",onClick:function(){return d("eject")}}),children:[!!V&&(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:V.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:V.pressure})," kPa"]})]}),!V&&(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(187),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(494)()},function(e,t,n){"use strict";var o=n(495);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(187),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.ClawMachine=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.ClawMachine=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,d=c.data,u=(d.wintick,d.instructions),s=d.gameStatus,m=d.winscreen;return"CLAWMACHINE_NEW"===s?n=(0,o.createComponentVNode)(2,a.Box,{align:"center",children:[(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"b",null,"Pay to Play!",16)," ",(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr"),u,(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr")," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Start",onClick:function(){return l("newgame")}})]}):"CLAWMACHINE_END"===s?n=(0,o.createComponentVNode)(2,a.Box,{align:"center",children:[(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"b",null,"Thank you for playing!",16)," ",(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr"),m,(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr")," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Close",onClick:function(){return l("return")}})]}):"CLAWMACHINE_ON"===s&&(n=(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Progress",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[-Infinity,0],average:[1,7],good:[8,Infinity]},value:d.wintick,minValue:0,maxValue:10})})}),(0,o.createComponentVNode)(2,a.Box,{align:"center",children:[(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr")," ",(0,o.createVNode)(1,"br"),u,(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"hr")," ",(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Up",onClick:function(){return l("pointless")}}),(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Left",onClick:function(){return l("pointless")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Right",onClick:function(){return l("pointless")}}),(0,o.createVNode)(1,"br")," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Down",onClick:function(){return l("pointless")}})]})]})),(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createVNode)(1,"center",null,n,0)})}},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,f=l.vocal,C=l.wet_floors,N=l.spray_blood,b=l.rgbpanel,V=l.red_switch,g=l.green_switch,v=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.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",selected:p,onClick:function(){return c("blood")},children:p?"Clean":"Ignore"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Speaker",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:f?"toggle-on":"toggle-off",selected:f,onClick:function(){return c("vocal")},children:f?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:h?"toggle-on":"toggle-off",selected:h,onClick:function(){return c("patrol")},children:h?"On":"Off"})})]})})||null,!s&&u&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance Panel",children:b&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:V?"toggle-on":"toggle-off",backgroundColor:V?"red":"maroon",onClick:function(){return c("red_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:g?"toggle-on":"toggle-off",backgroundColor:g?"green":"darkgreen",onClick:function(){return c("green_switch")}}),(0,o.createComponentVNode)(2,a.Button,{fontSize:5.39,icon:v?"toggle-on":"toggle-off",backgroundColor:v?"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:C,onClick:function(){return c("wet_floors")},icon:"screwdriver",children:C?"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:N,onClick:function(){return c("spray_blood")},icon:"screwdriver",children:N?"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(28),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.Communicator=void 0;var o=n(0),r=n(8),a=n(7),i=n(1),c=n(2),l=n(3),d=n(94),u={};t.Communicator=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.currentTab);return(0,o.createComponentVNode)(2,l.Window,{width:475,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,c.Box,{height:"88%",mb:1,style:{"overflow-y":"auto"},children:u[r]||(0,o.createComponentVNode)(2,s)}),(0,o.createComponentVNode)(2,p)]})})};var s=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.currentTab);return(0,o.createComponentVNode)(2,c.Section,{title:"Error!",children:["You tried to access tab #",r,", but there was no template defined!"]})},m=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),l=r.time,d=r.connectionStatus,u=r.owner,s=r.occupation;return(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{color:"average",children:l}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{color:1===d?"good":"bad",name:1===d?"signal":"exclamation-triangle"})}),(0,o.createComponentVNode)(2,c.Flex.Item,{color:"average",children:(0,a.decodeHtmlEntities)(u)}),(0,o.createComponentVNode)(2,c.Flex.Item,{color:"average",children:(0,a.decodeHtmlEntities)(s)})]})})},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.flashlight;return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"80%",children:(0,o.createComponentVNode)(2,c.Button,{p:1,fluid:!0,icon:"home",iconSize:2,textAlign:"center",onClick:function(){return r("switch_tab",{switch_tab:1})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"20%",children:(0,o.createComponentVNode)(2,c.Button,{icon:"lightbulb",iconSize:2,p:1,fluid:!0,textAlign:"center",selected:a,tooltip:"Flashlight",tooltipPosition:"top",onClick:function(){return r("Light")}})})]})};u[1]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.homeScreen;return(0,o.createComponentVNode)(2,c.Flex,{mt:2,wrap:"wrap",align:"center",justify:"center",children:a.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"25%",textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,c.Button,{style:{"border-radius":"10%",border:"1px solid #000"},width:"64px",height:"64px",position:"relative",onClick:function(){return r("switch_tab",{switch_tab:e.number})},children:(0,o.createComponentVNode)(2,c.Icon,{name:e.icon,position:"absolute",size:3,top:"25%",left:"25%"})}),(0,o.createComponentVNode)(2,c.Box,{children:e.module})]},e.number)}))})}));var h=function(e,t){for(var n=(0,i.useBackend)(t),r=n.act,a=n.data.targetAddress,l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"].map((function(e){return(0,o.createComponentVNode)(2,c.Button,{content:e,fontSize:2,fluid:!0,onClick:function(){return r("add_hex",{add_hex:e})}},e)})),d=[],u=0;un?t.length>n?t.slice(0,n)+"...":t:e+t};u[40]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.targetAddressName,u=l.targetAddress,s=l.imList,m=(0,i.useLocalState)(t,"clipboardMode",!1),p=m[0],h=m[1];return p?(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Box,{inline:!0,style:{"white-space":"nowrap","overflow-x":"hidden"},width:"90%",children:C("Conversation with ",(0,a.decodeHtmlEntities)(d),30)}),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"100%",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{style:{height:"95%","overflow-y":"auto"},children:s.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{color:f(e,u)?"#4d9121":"#cd7a0d",children:[f(e,u)?"You":"Them",": ",e.im]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",onClick:function(){return r("message",{message:u})},content:"Message"})]}):(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Box,{inline:!0,style:{"white-space":"nowrap","overflow-x":"hidden"},width:"100%",children:C("Conversation with ",(0,a.decodeHtmlEntities)(d),30)}),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"100%",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{style:{height:"95%","overflow-y":"auto"},children:s.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{textAlign:f(e,u)?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,c.Icon,{fontSize:2.5,color:f(e,u)?"#4d9121":"#cd7a0d",position:"absolute",left:f(e,u)?null:"0px",right:f(e,u)?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:f(e,u)?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,c.Box,{inline:!0,backgroundColor:f(e,u)?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:f(e,u)?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"break-all"},children:[f(e,u)?"You:":"Them:"," ",(0,a.decodeHtmlEntities)(e.im)]})]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{icon:"comment",onClick:function(){return r("message",{message:u})},content:"Message"})]})}));var N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data.target_feed;return(0,o.createComponentVNode)(2,c.Section,{title:(0,a.decodeHtmlEntities)(l.name)+" by "+(0,a.decodeHtmlEntities)(l.author),level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Back",icon:"chevron-up",onClick:function(){return r("newsfeed",{newsfeed:null})}}),children:l.messages.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{children:["- ",(0,a.decodeHtmlEntities)(e.body),!!e.img&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+e.img}),(0,a.decodeHtmlEntities)(e.caption)||null]}),(0,o.createComponentVNode)(2,c.Box,{color:"grey",children:["[",e.message_type," by ",(0,a.decodeHtmlEntities)(e.author)," - ",e.time_stamp,"]"]})]},e.ref)}))})},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.feeds,u=l.latest_news;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Recent News",level:2,children:(0,o.createComponentVNode)(2,c.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{mb:2,children:[(0,o.createVNode)(1,"h5",null,[(0,a.decodeHtmlEntities)(e.channel),(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"chevron-up",onClick:function(){return r("newsfeed",{newsfeed:e.index})},content:"Go to"})],0),"- ",(0,a.decodeHtmlEntities)(e.body),!!e.img&&(0,o.createComponentVNode)(2,c.Box,{children:["[image omitted, view story for more details]",e.caption||null]}),(0,o.createComponentVNode)(2,c.Box,{fontSize:.9,children:["[",e.message_type," by ",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"average",children:e.author})," - ",e.time_stamp,"]"]})]},e.index)}))})}),(0,o.createComponentVNode)(2,c.Section,{title:"News Feeds",level:2,children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"chevron-up",onClick:function(){return r("newsfeed",{newsfeed:e.index})},content:e.name},e.index)}))})],4)};u[5]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),a=r.feeds,l=r.target_feed;return(0,o.createComponentVNode)(2,c.Section,{title:"News",stretchContents:!0,height:"100%",children:!a.length&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Error: No newsfeeds available. Please try again later."})||l&&(0,o.createComponentVNode)(2,N)||(0,o.createComponentVNode)(2,b)})}));u[6]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.note;return(0,o.createComponentVNode)(2,c.Section,{title:"Note Keeper",height:"100%",stretchContents:!0,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"pen",onClick:function(){return r("edit")},content:"Edit Notes"}),children:(0,o.createComponentVNode)(2,c.Section,{color:"average",width:"100%",height:"100%",style:{"word-break":"break-all","overflow-y":"auto"},children:a})})}));u[7]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),l=(n.act,n.data),d=l.aircontents,u=l.weather;return(0,o.createComponentVNode)(2,c.Section,{title:"Weather",children:[(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Current Conditions",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,r.filter)((function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}))(d).map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.entry,color:(t=e.val,n=e.bad_low,r=e.poor_low,i=e.poor_high,l=e.bad_high,ti?"average":t>l?"bad":"good"),children:[e.val,(0,a.decodeHtmlEntities)(e.units)]},e.entry);var t,n,r,i,l}))})}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Weather Reports",children:!!u.length&&(0,o.createComponentVNode)(2,c.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.Planet,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Time",children:e.Time}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Weather",children:(0,a.toTitleCase)(e.Weather)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:["Current: ",e.Temperature.toFixed(),"\xb0C | High: ",e.High.toFixed(),"\xb0C | Low: ",e.Low.toFixed(),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Wind Direction",children:e.WindDir}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Wind Speed",children:e.WindSpeed}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Forecast",children:(0,a.decodeHtmlEntities)(e.Forecast)})]})},e.Planet)}))})||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No weather reports available. Please check back later."})})]})})),u[8]=(0,o.createComponentVNode)(2,d.CrewManifestContent);u[9]=(0,o.createComponentVNode)(2,(function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.owner,u=l.occupation,s=l.connectionStatus,m=l.address,p=l.visible,h=l.ring;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Button,{icon:"pen",fluid:!0,content:(0,a.decodeHtmlEntities)(d),onClick:function(){return r("rename")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Occupation",children:(0,a.decodeHtmlEntities)(u)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Connection",children:1===s?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Disconnected"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Device EPv2 Address",children:m}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:p,selected:p,fluid:!0,content:p?"This device can be seen by other devices.":"This device is invisible to other devices.",onClick:function(){return r("toggle_visibility")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ringer",children:(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:h,selected:h,fluid:!0,content:h?"Ringer on.":"Ringer off.",onClick:function(){return r("toggle_ringer")}})})]})})}))},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.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"})}})})]})]}),(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(190);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,g,{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,V)),(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."]})})},V=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."]})})},g=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(20)),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,V=d.max_chemical_volume,g=d.dish_inserted,v=d.blood_already_infected,k=d.virus,_=d.analysed,y=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:V,value:b,children:[b,"/",V]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Breeding Environment",color:N?"good":"average",children:[g?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:!g,onClick:function(){return l("ejectdish")}}),children:g?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,b=l.collects_produce,V=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 Hydroponic Assistance 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"})})})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Plant controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Collect produce",children:(0,o.createComponentVNode)(2,a.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return c("collect")},children:b?"Yes":"No"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remove dead plants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c("removedead")},children:V?"Yes":"No"})})]})})]})||null]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxContent=t.Fax=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(95),l=n(96);t.Fax=function(e,t){return(0,r.useBackend)(t).data.authenticated?(0,o.createComponentVNode)(2,i.Window,{width:600,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.LoginInfo),(0,o.createComponentVNode)(2,d)]})}):(0,o.createComponentVNode)(2,i.Window,{width:600,height:250,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,l.LoginScreen)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.bossName,d=c.copyItem,u=c.cooldown,s=c.destination;return(0,o.createComponentVNode)(2,a.Section,{children:[!!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Transmitter arrays realigning. Please stand by."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:[l," Quantum Entanglement Network"]})}),d&&(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Currently Sending",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"map-marker-alt",content:s,onClick:function(){return i("dept")}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"share-square",onClick:function(){return i("send")},content:"Send",fluid:!0})]})||(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Please insert item to transmit."})]})};t.FaxContent=d;var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act;return n.data.copyItem?(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",onClick:function(){return i("remove")},content:"Remove Item"})}):null}},function(e,t,n){"use strict";t.__esModule=!0,t.FileCabinet=void 0;var o=n(0),r=n(8),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.vocal,p=l.amount,h=l.possible_bmode,f=l.improvefloors,C=l.eattiles,N=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:p})}),(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:"Speaker",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"toggle-on":"toggle-off",selected:m,onClick:function(){return c("vocal")},children:m?"On":"Off"})}),(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:C?"toggle-on":"toggle-off",selected:C,onClick:function(){return c("tiles")},children:C?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Makes Metal Sheets into Tiles",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"toggle-on":"toggle-off",selected:N,onClick:function(){return c("make")},children:N?"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:h,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.GuestPass=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3);t.GuestPass=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=(d.access,d.area),s=d.giver,m=d.giveName,p=d.reason,h=d.duration,f=d.mode,C=d.log,N=d.uid;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:520,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:1===f&&(0,o.createComponentVNode)(2,i.Section,{title:"Activity Log",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"scroll",content:"Activity Log",selected:!0,onClick:function(){return l("mode",{mode:0})}}),children:[(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print",onClick:function(){return l("print")},fluid:!0,mb:1}),(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Logs",children:C.length&&C.map((function(e){return(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:e}},e)}))||(0,o.createComponentVNode)(2,i.Box,{children:"No logs."})})]})||(0,o.createComponentVNode)(2,i.Section,{title:"Guest pass terminal #"+N,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"scroll",content:"Activity Log",onClick:function(){return l("mode",{mode:1})}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Issuing ID",children:(0,o.createComponentVNode)(2,i.Button,{content:s||"Insert ID",onClick:function(){return l("id")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Issued To",children:(0,o.createComponentVNode)(2,i.Button,{content:m,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,i.Button,{content:p,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Duration (minutes)",children:(0,o.createComponentVNode)(2,i.Button,{content:h,onClick:function(){return l("duration")}})})]}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"check",fluid:!0,content:"Issue Pass",onClick:function(){return l("issue")}}),(0,o.createComponentVNode)(2,i.Section,{title:"Access",level:2,children:(0,r.sortBy)((function(e){return e.area_name}))(u).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:e.on,content:e.area_name,onClick:function(){return l("access",{access:e.area})}},e.area)}))})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GyrotronControlContent=t.GyrotronControl=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GyrotronControl=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.gyros;return(0,o.createComponentVNode)(2,i.Section,{title:"Gyrotrons",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Set Tag",onClick:function(){return a("set_tag")}}),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:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Fire Delay"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Strength"})]}),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:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.active?"Online":"Offline",selected:e.active,disabled:!e.deployed,onClick:function(){return a("toggle_active",{gyro:e.ref})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Knob,{forcedInputWidth:"60px",size:1.25,color:!!e.active&&"yellow",value:e.fire_delay,unit:"decisecond(s)",minValue:1,maxValue:60,stepPixelSize:1,onDrag:function(t,n){return a("set_rate",{gyro:e.ref,rate:n})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Knob,{forcedInputWidth:"60px",size:1.25,color:!!e.active&&"yellow",value:e.strength,unit:"penta-dakw",minValue:1,maxValue:50,stepPixelSize:1,onDrag:function(t,n){return a("set_str",{gyro:e.ref,str:n})}})})]},e.name)}))]})})};t.GyrotronControlContent=c},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(20));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,V=u.removable_circuits;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:380,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,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,V.length&&(0,o.createComponentVNode)(2,d,{title:"Removable Components",circuits:V})||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(20);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,V=s.outputs,g=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&&V.length?"33%":b.length||V.length?"45%":"100%",children:(0,o.createComponentVNode)(2,a.Section,{title:p,mb:1,children:(0,o.createComponentVNode)(2,a.Box,{children:m})})}),V.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:V})})})||null]}),(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",children:g.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(8);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(191);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(20),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.JanitorCart=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.JanitorCart=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.mybag,s=d.mybucket,m=d.mymop,p=d.myspray,h=d.myreplacer,f=d.signs;d.icons;return(0,o.createComponentVNode)(2,i.Window,{width:210,height:180,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:u||"Garbage Bag Slot",tooltipPosition:"bottom-right",color:u?"grey":"transparent",style:{border:u?null:"2px solid grey"},onClick:function(){return c("bag")},children:(0,o.createComponentVNode)(2,l,{iconkey:"mybag"})}),(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:s||"Bucket Slot",tooltipPosition:"bottom",color:s?"grey":"transparent",style:{border:s?null:"2px solid grey"},onClick:function(){return c("bucket")},children:(0,o.createComponentVNode)(2,l,{iconkey:"mybucket"})}),(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:m||"Mop Slot",tooltipPosition:"bottom-left",color:m?"grey":"transparent",style:{border:m?null:"2px solid grey"},onClick:function(){return c("mop")},children:(0,o.createComponentVNode)(2,l,{iconkey:"mymop"})}),(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:p||"Spray Slot",tooltipPosition:"top-right",color:p?"grey":"transparent",style:{border:p?null:"2px solid grey"},onClick:function(){return c("spray")},children:(0,o.createComponentVNode)(2,l,{iconkey:"myspray"})}),(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:h||"Light Replacer Slot",tooltipPosition:"top",color:h?"grey":"transparent",style:{border:h?null:"2px solid grey"},onClick:function(){return c("replacer")},children:(0,o.createComponentVNode)(2,l,{iconkey:"myreplacer"})}),(0,o.createComponentVNode)(2,a.Button,{width:"64px",height:"64px",position:"relative",tooltip:f||"Signs Slot",tooltipPosition:"top-left",color:f?"grey":"transparent",style:{border:f?null:"2px solid grey"},onClick:function(){return c("sign")},children:(0,o.createComponentVNode)(2,l,{iconkey:"signs"})})]})})};var c={mybag:"trash",mybucket:"fill",mymop:"broom",myspray:"spray-can",myreplacer:"lightbulb",signs:"sign"},l=function(e,t){var n=(0,r.useBackend)(t).data,i=e.iconkey,l=n.icons;return i in l?(0,o.createVNode)(1,"img",null,null,1,{src:l[i].substr(1,l[i].length-1),style:{position:"absolute",left:0,right:0,top:0,bottom:0,width:"64px",height:"64px","-ms-interpolation-mode":"nearest-neighbor"}}):(0,o.createComponentVNode)(2,a.Icon,{style:{position:"absolute",left:"4px",right:0,top:"20px",bottom:0,width:"64px",height:"64px"},fontSize:2,name:c[i]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(5),a=n(8),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,V=c.inherent_laws,g=c.has_inherent_laws,v=c.supplied_laws,k=c.has_supplied_laws,_=c.isAI,y=c.isMalf,L=c.isAdmin,B=c.channel,x=c.channels,w=f.map((function(e){return e.zero=!0,e})).concat(V);return(0,o.createComponentVNode)(2,a.Section,{children:[b&&(0,o.createComponentVNode)(2,d,{laws:N,title:l+" Laws:",mt:-2})||null,(C||g)&&(0,o.createComponentVNode)(2,d,{laws:w,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:x.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:B===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"})}),_&&(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]})}),y&&(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"})]}),L&&!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,V=l.injection_amount_max,g=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:V,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:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c("use_beaker")},children:g?"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(95),d=n(96),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,V),(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",inline:!0,preserveWhiteSpace:!0,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,preserveWhiteSpace:!0,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)}))},V=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(8),n(192));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(8);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(192);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)),V=b[0],g=(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(g).map((function(e){return e[1].affordable=u&&s.points>=e[1].price,e[1]})).sort(d[N]);if(0!==n.length)return V&&(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.points=450?"Overcharged":e>=250?"Good Charge":"Low Charge":e>=250?"NIF Power Requirement met.":e>=150?"Fluctuations in available power.":"Power failure imminent."},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=(n.config,n.data),u=c.nif_percent,s=c.nif_stat,m=(c.last_notification,c.nutrition),p=c.isSynthetic,h=c.modules,f=e.setViewing;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"NIF Condition",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[50,Infinity],average:[25,50],bad:[-Infinity,0]},children:[l(s,u)," (",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u}),"%)"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"NIF Power",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:700,ranges:{good:[250,Infinity],average:[150,250],bad:[0,150]},children:d(m,p)})})]}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"NIFSoft Modules",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:h.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",color:"bad",confirmContent:"UNINSTALL?",confirmIcon:"trash",tooltip:"Uninstall Module",tooltipPosition:"left",onClick:function(){return i("uninstall",{module:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",onClick:function(){return f(e)},tooltip:"View Information",tooltipPosition:"left"})],4),children:e.activates&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,selected:e.active,content:e.stat_text,onClick:function(){return i("toggle_module",{module:e.ref})}})||(0,o.createComponentVNode)(2,a.Box,{children:e.stat_text})},e.ref)}))})})]})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.theme;return(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"NIF Theme",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"100%",placeholder:"Default",selected:l,options:c,onSelected:function(e){return i("setTheme",{theme:e})}})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NTNetRelay=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=n(61);t.NTNetRelay=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.dos_crashed,u=(a.enabled,a.dos_overload,a.dos_capacity,(0,o.createComponentVNode)(2,l));return c&&(u=(0,o.createComponentVNode)(2,d)),(0,o.createComponentVNode)(2,i.Window,{width:c?700:500,height:c?600:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:u})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=(c.dos_crashed,c.enabled),d=c.dos_overload,u=c.dos_capacity;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:l,content:"Relay "+(l?"On":"Off"),onClick:function(){return i("toggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network Buffer Status",children:[d," / ",u," GQ"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Purge network blacklist",onClick:function(){return i("purge")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),i=n.act;n.data;return(0,o.createComponentVNode)(2,c.FullscreenNotice,{title:"ERROR",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",verticalAlign:"middle",size:3,mr:"1rem"}),(0,o.createVNode)(1,"h2",null,"NETWORK BUFFERS OVERLOADED",16),(0,o.createVNode)(1,"h3",null,"Overload Recovery Mode",16),(0,o.createVNode)(1,"i",null,"This system is suffering temporary outage due to overflow of traffic buffers. Until buffered traffic is processed, all further requests will be dropped. Frequent occurences of this error may indicate insufficient hardware capacity of your network. Please contact your network planning department for instructions on how to resolve this issue.",16),(0,o.createVNode)(1,"h3",null,"ADMINISTRATIVE OVERRIDE",16),(0,o.createVNode)(1,"b",null," CAUTION - Data loss may occur ",16)]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Purge buffered traffic",onClick:function(){return i("restart")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(3),l=n(62);t.Newscaster=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);r.screen,r.user;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.TemporaryNotice,{decode:!0}),(0,o.createComponentVNode)(2,d)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.user,(0,a.useSharedState)(t,"screen","Main Menu")),c=r[0],l=r[1],d=u[c];return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,d,{setScreen:l})})},u={"Main Menu":function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.securityCaster,l=r.wanted_issue,d=e.setScreen;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Main Menu",children:[l&&(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eye",onClick:function(){return d("View Wanted")},color:"bad",children:"Read WANTED Issue"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eye",onClick:function(){return d("View List")},children:"View Feed Channels"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"plus",onClick:function(){return d("New Channel")},children:"Create Feed Channel"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"plus",onClick:function(){return d("New Story")},children:"Create Feed Message"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"print",onClick:function(){return d("Print")},children:"Print Newspaper"})]}),!!c&&(0,o.createComponentVNode)(2,i.Section,{title:"Feed Security Functions",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"plus",onClick:function(){return d("New Wanted")},children:'Manage "Wanted" Issue'})})],0)},"New Channel":function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.channel_name,u=l.c_locked,s=l.user,m=e.setScreen;return(0,o.createComponentVNode)(2,i.Section,{title:"Creating new Feed Channel",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return m("Main Menu")},children:"Back"}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Channel Name",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:(0,r.decodeHtmlEntities)(d),onInput:function(e,t){return c("set_channel_name",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Channel Author",color:"good",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Accept Public Feeds",children:(0,o.createComponentVNode)(2,i.Button,{icon:u?"lock":"lock-open",selected:!u,onClick:function(){return c("set_channel_lock")},children:u?"No":"Yes"})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"good",icon:"plus",onClick:function(){return c("submit_new_channel")},children:"Submit Channel"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"bad",icon:"undo",onClick:function(){return m("Main Menu")},children:"Cancel"})]})},"View List":function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.channels,d=e.setScreen;return(0,o.createComponentVNode)(2,i.Section,{title:"Station Feed Channels",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return d("Main Menu")},children:"Back"}),children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eye",color:e.admin?"good":e.censored?"bad":"",onClick:function(){c("show_channel",{show_channel:e.ref}),d("View Selected Channel")},children:(0,r.decodeHtmlEntities)(e.name)},e.name)}))})},"New Story":function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.channel_name,d=c.user,u=c.msg,s=c.photo_data,m=e.setScreen;return(0,o.createComponentVNode)(2,i.Section,{title:"Creating new Feed Message...",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return m("Main Menu")},children:"Back"}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Receiving Channel",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,onClick:function(){return r("set_channel_receiving")},children:l||"Unset"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Author",color:"good",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Body",verticalAlign:"top",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Section,{width:"99%",inline:!0,children:u||"(no message yet)"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{verticalAlign:"top",onClick:function(){return r("set_new_message")},icon:"pen",tooltip:"Edit Message",tooltipPosition:"left"})})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Attach Photo",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"image",onClick:function(){return r("set_attachment")},children:s?"Photo Attached":"No Photo"})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"good",icon:"plus",onClick:function(){return r("submit_new_message")},children:"Submit Message"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"bad",icon:"undo",onClick:function(){return m("Main Menu")},children:"Cancel"})]})},Print:function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.total_num,d=c.active_num,u=c.message_num,s=c.paper_remaining,m=e.setScreen;return(0,o.createComponentVNode)(2,i.Section,{title:"Printing",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return m("Main Menu")},children:"Back"}),children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",mb:1,children:["Newscaster currently serves a total of ",l," Feed channels, ",d," of which are active, and a total of ",u," Feed stories."]}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Liquid Paper remaining",children:[100*s," cm\xb3"]})}),(0,o.createComponentVNode)(2,i.Button,{mt:1,fluid:!0,color:"good",icon:"plus",onClick:function(){return r("print_paper")},children:"Print Paper"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"bad",icon:"undo",onClick:function(){return m("Main Menu")},children:"Cancel"})]})},"New Wanted":function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.channel_name,u=l.msg,s=l.photo_data,m=l.user,p=l.wanted_issue,h=e.setScreen;return(0,o.createComponentVNode)(2,i.Section,{title:"Wanted Issue Handler",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return h("Main Menu")},children:"Back"}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[!!p&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Already In Circulation",children:"A wanted issue is already in circulation. You can edit or cancel it below."}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Criminal Name",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:(0,r.decodeHtmlEntities)(d),onInput:function(e,t){return c("set_channel_name",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:(0,r.decodeHtmlEntities)(u),onInput:function(e,t){return c("set_wanted_desc",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Attach Photo",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"image",onClick:function(){return c("set_attachment")},children:s?"Photo Attached":"No Photo"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Prosecutor",color:"good",children:m})]}),(0,o.createComponentVNode)(2,i.Button,{mt:1,fluid:!0,color:"good",icon:"plus",onClick:function(){return c("submit_wanted")},children:"Submit Wanted Issue"}),!!p&&(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"average",icon:"minus",onClick:function(){return c("cancel_wanted")},children:"Take Down Issue"}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"bad",icon:"undo",onClick:function(){return h("Main Menu")},children:"Cancel"})]})},"View Wanted":function(e,t){var n=(0,a.useBackend)(t),c=(n.act,n.data.wanted_issue),l=e.setScreen;return c?(0,o.createComponentVNode)(2,i.Section,{title:"--STATIONWIDE WANTED ISSUE--",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return l("Main Menu")},children:"Back"}),children:(0,o.createComponentVNode)(2,i.Box,{color:"white",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Submitted by",color:"good",children:(0,r.decodeHtmlEntities)(c.author)}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Criminal",children:(0,r.decodeHtmlEntities)(c.criminal)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:(0,r.decodeHtmlEntities)(c.desc)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Photo",children:c.img&&(0,o.createVNode)(1,"img",null,null,1,{src:c.img})||"None"})]})})}):(0,o.createComponentVNode)(2,i.Section,{title:"No Outstanding Wanted Issues",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return l("Main Menu")},children:"Back"}),children:"There are no wanted issues currently outstanding."})},"View Selected Channel":function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.viewing_channel,u=l.securityCaster,s=l.company,m=e.setScreen;return d?(0,o.createComponentVNode)(2,i.Section,{title:(0,r.decodeHtmlEntities)(d.name),buttons:(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"bad",icon:"ban",confirmIcon:"ban",content:"Issue D-Notice",onClick:function(){return c("toggle_d_notice",{ref:d.ref})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return m("View List")},children:"Back"})],0),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Channel Created By",children:u&&(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"bad",icon:"strikethrough",confirmIcon:"strikethrough",content:(0,r.decodeHtmlEntities)(d.author),tooltip:"Censor?",confirmContent:"Censor Author",onClick:function(){return c("censor_channel_author",{ref:d.ref})}})||(0,o.createComponentVNode)(2,i.Box,{children:(0,r.decodeHtmlEntities)(d.author)})})}),!!d.censored&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:["ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a ",s," D-Notice. No further feed story additions are allowed while the D-Notice is in effect."]}),!!d.messages.length&&d.messages.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:["- ",(0,r.decodeHtmlEntities)(e.body),!!e.img&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+e.img}),(0,r.decodeHtmlEntities)(e.caption)||null]}),(0,o.createComponentVNode)(2,i.Box,{color:"grey",children:["[Story by ",(0,r.decodeHtmlEntities)(e.author)," - ",e.timestamp,"]"]}),!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Confirm,{mt:1,color:"bad",icon:"strikethrough",confirmIcon:"strikethrough",content:"Censor Story",onClick:function(){return c("censor_channel_story_body",{ref:e.ref})}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"bad",icon:"strikethrough",confirmIcon:"strikethrough",content:"Censor Author",onClick:function(){return c("censor_channel_story_author",{ref:e.ref})}})],4)]},e.ref)}))||!d.censored&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"No feed messages found in channel."})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Channel Not Found",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",onClick:function(){return m("View List")},children:"Back"}),children:"The channel you were looking for no longer exists."})}}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBoard=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);t.NoticeBoard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.notices;return(0,o.createComponentVNode)(2,i.Window,{width:330,height:300,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:l.length?(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.isphoto&&(0,o.createComponentVNode)(2,a.Button,{icon:"image",content:"Look",onClick:function(){return c("look",{ref:e.ref})}})||e.ispaper&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"sticky-note",content:"Read",onClick:function(){return c("read",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Write",onClick:function(){return c("write",{ref:e.ref})}})],4)||"Unknown Entity",(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",content:"Remove",onClick:function(){return c("remove",{ref:e.ref})}})]},t)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No notices posted here."})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAccessDecrypter=void 0;var o=n(0),r=n(1),a=n(3),i=n(134),c=n(2);t.NtosAccessDecrypter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.message,s=d.running,m=d.rate,p=d.factor,h=d.regions,f=function(e){for(var t="";t.lengthp?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(185);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(186);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(188);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(189);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(8);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(193);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(8),n(1)),a=(n(2),n(3)),i=(n(7),n(28),n(134));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,V=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:!V.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: ",V.IDName]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:["Assignment: ",V.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,V=l.messages,g=void 0===V?[]:V,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?g.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,V=l.minlogs,g=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:g.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:V,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(194);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(136);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(195);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(196);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(197);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(198);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(135);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(135);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:760,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,V=i.field_radius,g=i.target_radius,v=i.input_cap_kw,k=i.upkeep_power_usage,_=i.power_usage,y=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",g!==V&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"(Adjusting Radius)"})||(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[2*y,"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:_,maxValue:v,children:[_," / ",v," kW"]})})||(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:_})," 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:V}),", target ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:g}),")"]})]})})},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(133);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(20),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.Pda=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3),c=n(178),l=n(592);t.Pda=function(e,t){var n=(0,r.useBackend)(t),m=(n.act,n.data),p=m.app,h=m.owner,f=m.useRetro;if(!h)return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{stretchContents:!0,children:"Warning: No ID information found! Please swipe ID!"})})});var C=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,c.routingError)("notFound",e);throw o}var n=t[e];return n||(0,c.routingError)("missingExport",e)}(p.template),N=(0,r.useLocalState)(t,"settingsMode",!1),b=N[0],V=N[1];return(0,o.createComponentVNode)(2,i.Window,{width:580,height:670,theme:f?"pda-retro":null,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d,{settingsMode:b,setSettingsMode:V}),b&&(0,o.createComponentVNode)(2,u)||(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:p.icon,mr:1}),p.name]}),p:1,children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,s,{setSettingsMode:V})]})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.settingsMode,d=e.setSettingsMode,u=c.idInserted,s=c.idLink,m=(c.cartridge_name,c.stationTime);return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[!!u&&(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",color:"transparent",onClick:function(){return i("Authenticate")},content:s})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",bold:!0,children:m}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{selected:l,onClick:function(){return d(!l)},icon:"cog"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return i("Retro")},icon:"adjust"})]})]})})},u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.idInserted,d=c.idLink,u=c.cartridge_name,s=c.touch_silent;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"R.E.T.R.O Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Retro Theme",onClick:function(){return i("Retro")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Touch Sounds",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:!s,content:s?"Disabled":"Enabled",onClick:function(){return i("TouchSounds")}})}),!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cartridge",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return i("Eject")},content:u})}),!!l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return i("Authenticate")},content:d})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=e.setSettingsMode,d=c.app,u=c.useRetro;return(0,o.createComponentVNode)(2,a.Box,{position:"fixed",bottom:"0%",left:"0%",right:"0%",backgroundColor:u?"#6f7961":"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",iconColor:d.has_back?"white":"disabled",textAlign:"center",icon:"undo",mb:0,fontSize:1.7,onClick:function(){return i("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",iconColor:d.is_home?"disabled":"white",textAlign:"center",icon:"home",mb:0,fontSize:1.7,onClick:function(){l(!1),i("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":593,"./pda_janitor.js":594,"./pda_main_menu.js":595,"./pda_manifest.js":596,"./pda_medical.js":597,"./pda_messenger.js":598,"./pda_news.js":599,"./pda_notekeeper.js":600,"./pda_power.js":601,"./pda_security.js":602,"./pda_signaller.js":603,"./pda_status_display.js":604,"./pda_supply.js":605};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=592},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(8),a=n(7),i=n(1),c=n(2);t.pda_atmos_scan=function(e,t){var n=(0,i.useBackend)(t),l=(n.act,n.data.aircontents);return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,r.filter)((function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}))(l).map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.entry,color:(t=e.val,n=e.bad_low,r=e.poor_low,i=e.poor_high,l=e.bad_high,ti?"average":t>l?"bad":"good"),children:[e.val,(0,a.decodeHtmlEntities)(e.units)]},e.entry);var t,n,r,i,l}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=(n(8),n(7),n(1)),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.janitor);return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:0===i.user_loc.x&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Unknown"})||(0,o.createComponentVNode)(2,a.Box,{children:[i.user_loc.x," / ",i.user_loc.y]})})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Mop Locations",children:i.mops&&(0,o.createVNode)(1,"ul",null,i.mops.map((function(e,t){return(0,o.createVNode)(1,"li",null,[e.x,(0,o.createTextVNode)(" / "),e.y,(0,o.createTextVNode)(" - "),e.dir,(0,o.createTextVNode)(" - Status: "),e.status],0,null,t)})),0)||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No mops detected nearby."})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Mop Bucket Locations",children:i.buckets&&(0,o.createVNode)(1,"ul",null,i.buckets.map((function(e,t){return(0,o.createVNode)(1,"li",null,[e.x,(0,o.createTextVNode)(" / "),e.y,(0,o.createTextVNode)(" - "),e.dir,(0,o.createTextVNode)(" - Capacity: "),e.volume,(0,o.createTextVNode)("/"),e.max_volume],0,null,t)})),0)||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No buckets detected nearby."})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Cleanbot Locations",children:i.cleanbots&&(0,o.createVNode)(1,"ul",null,i.cleanbots.map((function(e,t){return(0,o.createVNode)(1,"li",null,[e.x,(0,o.createTextVNode)(" / "),e.y,(0,o.createTextVNode)(" - "),e.dir,(0,o.createTextVNode)(" - Status: "),e.status],0,null,t)})),0)||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No cleanbots detected nearby."})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Janitorial Cart Locations",children:i.carts&&(0,o.createVNode)(1,"ul",null,i.carts.map((function(e,t){return(0,o.createVNode)(1,"li",null,[e.x,(0,o.createTextVNode)(" / "),e.y,(0,o.createTextVNode)(" - "),e.dir,(0,o.createTextVNode)(" - Water Level: "),e.volume,(0,o.createTextVNode)("/"),e.max_volume],0,null,t)})),0)||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No janitorial carts detected nearby."})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(5),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.owner,d=c.ownjob,u=c.idInserted,s=c.categories,m=c.pai,p=c.notifying;return(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:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return i("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=c.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.ref in p?e.notify_icon:e.icon,iconSpin:e.ref in p,color:e.ref in p?"red":"transparent",content:e.name,onClick:function(){return i("StartProgram",{program:e.ref})}},e.ref)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return i("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return i("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=(n(8),n(1)),a=n(2),i=n(94);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Box,{color:"white",children:(0,o.createComponentVNode)(2,i.CrewManifestContent)})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=(n(8),n(7),n(1)),a=n(2);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.recordsList,d=c.records;if(d){var u=d.general,s=d.medical;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Section,{level:2,title:"General Data",children:u&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:u.sex}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:u.species}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:u.age}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:u.rank}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprint",children:u.fingerprint}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Physical Status",children:u.p_stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mental Status",children:u.m_stat})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General record lost!"})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Medical Data",children:s&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:s.b_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Minor Disabilities",children:s.mi_dis}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.mi_dis_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Major Disabilities",children:s.ma_dis}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.ma_dis_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allergies",children:s.alg}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.alg_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Disease",children:s.cdi}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.cdi_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Important Notes",preserveWhiteSpace:!0,children:s.notes})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Medical record lost!"})})]})}return(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Select a record",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"eye",fluid:!0,content:e.Name,onClick:function(){return i("Records",{target:e.ref})}},e.ref)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_messenger=void 0;var o=n(0),r=n(8),a=n(1),i=n(2);t.pda_messenger=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);r.auto_scroll,r.convo_name,r.convo_job,r.messages;return r.active_conversation?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,l)};var c=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=(l.auto_scroll,l.convo_name),u=l.convo_job,s=l.messages,m=l.active_conversation,p=l.useRetro,h=(0,a.useLocalState)(t,"clipboardMode",!1),f=h[0],C=h[1],N=(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Conversation with "+d+" ("+u+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eye",selected:f,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return C(!f)}}),height:"450px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,i.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===m}))(s).map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{textAlign:e.sent?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,i.Icon,{fontSize:2.5,color:e.sent?"#4d9121":"#cd7a0d",position:"absolute",left:e.sent?null:"0px",right:e.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:e.sent?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,backgroundColor:e.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:e.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"break-all"},children:[e.sent?"You:":"Them:"," ",e.message]})]},t)}))}),(0,o.createComponentVNode)(2,i.Button,{icon:"comment",onClick:function(){return c("Message",{target:m})},content:"Reply"})]});return f&&(N=(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Conversation with "+d+" ("+u+")",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eye",selected:f,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return C(!f)}}),height:"450px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,i.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===m}))(s).map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.sent?"#4d9121":"#cd7a0d",style:{"word-break":"break-all"},children:[e.sent?"You:":"Them:"," ",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p?"black":null,children:e.message})]},t)}))}),(0,o.createComponentVNode)(2,i.Button,{icon:"comment",onClick:function(){return c("Message",{target:m})},content:"Reply"})]})),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Messenger Functions",children:(0,o.createComponentVNode)(2,i.Button,{icon:"trash",color:"bad",onClick:function(){return c("Clear",{option:"Convo"})},children:"Delete Conversations"})})}),N]})},l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=(c.auto_scroll,c.convopdas),u=c.pdas,s=c.charges,m=(c.plugins,c.silent),p=c.toff;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Messenger Functions",children:[(0,o.createComponentVNode)(2,i.Button,{selected:!m,icon:m?"volume-mute":"volume-up",onClick:function(){return r("Toggle Ringer")},children:["Ringer: ",m?"Off":"On"]}),(0,o.createComponentVNode)(2,i.Button,{color:p?"bad":"green",icon:"power-off",onClick:function(){return r("Toggle Messenger")},children:["Messenger: ",p?"Off":"On"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"bell",onClick:function(){return r("Ringtone")},children:"Set Ringtone"}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",color:"bad",onClick:function(){return r("Clear",{option:"All"})},children:"Delete All Conversations"})]})}),!p&&(0,o.createComponentVNode)(2,i.Box,{children:[!!s&&(0,o.createComponentVNode)(2,i.Box,{children:[s," charges left."]}),!l.length&&!u.length&&(0,o.createComponentVNode)(2,i.Box,{children:"No other PDAs located."})||(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,d,{title:"Current Conversations",pdas:l,msgAct:"Select Conversation"}),(0,o.createComponentVNode)(2,d,{title:"Other PDAs",pdas:u,msgAct:"Message"})]})]})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",mt:2,children:"Messenger Offline."})]})},d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=e.pdas,d=e.title,u=e.msgAct,s=c.charges,m=c.plugins;return l&&l.length?(0,o.createComponentVNode)(2,i.Section,{level:2,title:d,children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:e.Name,onClick:function(){return r(u,{target:e.Reference})}}),!!s&&m.map((function(t){return(0,o.createComponentVNode)(2,i.Button,{icon:t.icon,content:t.name,onClick:function(){return r("Messenger Plugin",{plugin:t.ref,target:e.Reference})}},t.ref)}))]},e.Reference)}))}):(0,o.createComponentVNode)(2,i.Section,{level:2,title:d,children:"No PDAs found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_news=void 0;var o=n(0),r=(n(8),n(7)),a=n(1),i=n(2);t.pda_news=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),d=r.feeds,u=r.target_feed;return(0,o.createComponentVNode)(2,i.Box,{children:!d.length&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Error: No newsfeeds available. Please try again later."})||u&&(0,o.createComponentVNode)(2,c)||(0,o.createComponentVNode)(2,l)})};var c=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data.target_feed;return(0,o.createComponentVNode)(2,i.Section,{title:(0,r.decodeHtmlEntities)(l.name)+" by "+(0,r.decodeHtmlEntities)(l.author),level:2,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"chevron-up",onClick:function(){return c("newsfeed",{newsfeed:null})}}),children:l.messages.length&&l.messages.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:["- ",(0,r.decodeHtmlEntities)(e.body),!!e.img&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+e.img}),(0,r.decodeHtmlEntities)(e.caption)||null]}),(0,o.createComponentVNode)(2,i.Box,{color:"grey",children:["[",e.message_type," by ",(0,r.decodeHtmlEntities)(e.author)," - ",e.time_stamp,"]"]})]},e.ref)}))||(0,o.createComponentVNode)(2,i.Box,{children:["No stories found in ",l.name,"."]})})},l=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.feeds,u=l.latest_news;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Recent News",level:2,children:u.length&&(0,o.createComponentVNode)(2,i.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{mb:2,children:[(0,o.createVNode)(1,"h5",null,[(0,r.decodeHtmlEntities)(e.channel),(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"chevron-up",onClick:function(){return c("newsfeed",{newsfeed:e.index})},content:"Go to"})],0),"- ",(0,r.decodeHtmlEntities)(e.body),!!e.img&&(0,o.createComponentVNode)(2,i.Box,{children:["[image omitted, view story for more details]",e.caption||null]}),(0,o.createComponentVNode)(2,i.Box,{fontSize:.9,children:["[",e.message_type," by ",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"average",children:e.author})," - ",e.time_stamp,"]"]})]},e.index)}))})||(0,o.createComponentVNode)(2,i.Box,{children:"No recent stories found."})}),(0,o.createComponentVNode)(2,i.Section,{title:"News Feeds",level:2,children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"chevron-up",onClick:function(){return c("newsfeed",{newsfeed:e.index})},content:e.name},e.index)}))})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_notekeeper=void 0;var o=n(0),r=n(1),a=n(2);t.pda_notekeeper=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.note;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:c}})}),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",onClick:function(){return i("Edit")},content:"Edit Notes"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_power=void 0;var o=n(0),r=n(1),a=n(136);t.pda_power=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.PowerMonitorContent)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_security=void 0;var o=n(0),r=(n(8),n(7),n(1)),a=n(2);t.pda_security=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.recordsList,d=c.records;if(d){var u=d.general,s=d.security;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Section,{level:2,title:"General Data",children:u&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sex",children:u.sex}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:u.species}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Age",children:u.age}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rank",children:u.rank}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprint",children:u.fingerprint}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Physical Status",children:u.p_stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mental Status",children:u.m_stat})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General record lost!"})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Security Data",children:s&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Criminal Status",children:s.criminal}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Minor Crimes",children:s.mi_crim}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.mi_crim_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Major Crimes",children:s.ma_crim}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Details",children:s.ma_crim_d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Important Notes:",preserveWhiteSpace:!0,children:s.notes||"No data found."})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Security record lost!"})})]})}return(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Select a record",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"eye",fluid:!0,content:e.Name,onClick:function(){return i("Records",{target:e.ref})}},e.ref)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_signaller=void 0;var o=n(0),r=(n(8),n(7),n(1),n(2),n(199));t.pda_signaller=function(e,t){return(0,o.createComponentVNode)(2,r.SignalerContent)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_status_display=void 0;var o=n(0),r=(n(8),n(7),n(1)),a=n(2);t.pda_status_display=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.records;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Code",children:[(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return i("Status",{statdisp:"blank"})}}),(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"cog",content:"Evac ETA",onClick:function(){return i("Status",{statdisp:"shuttle"})}}),(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"cog",content:"Message",onClick:function(){return i("Status",{statdisp:"message"})}}),(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"exclamation-triangle",content:"ALERT",onClick:function(){return i("Status",{statdisp:"alert"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message line 1",children:(0,o.createComponentVNode)(2,a.Button,{content:c.message1+" (set)",icon:"pen",onClick:function(){return i("Status",{statdisp:"setmsg1"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message line 2",children:(0,o.createComponentVNode)(2,a.Button,{content:c.message2+" (set)",icon:"pen",onClick:function(){return i("Status",{statdisp:"setmsg2"})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_supply=void 0;var o=n(0),r=(n(8),n(7),n(1)),a=n(2);t.pda_supply=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.supply);return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:i.shuttle_moving?"Moving to station "+i.shuttle_eta:"Shuttle at "+i.shuttle_loc})}),(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"good",bold:!0,children:"Current Approved Orders"}),i.approved.length&&i.approved.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["#",e.Number," - ",e.Name," approved by ",e.OrderedBy,(0,o.createVNode)(1,"br"),e.Comment]},e.Number)}))||(0,o.createComponentVNode)(2,a.Box,{children:"None!"}),(0,o.createComponentVNode)(2,a.Box,{color:"good",bold:!0,children:"Current Requested Orders"}),i.requests.length&&i.requests.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"average",children:["#",e.Number," - ",e.Name," requested by ",e.OrderedBy,(0,o.createVNode)(1,"br"),e.Comment]},e.Number)}))||(0,o.createComponentVNode)(2,a.Box,{children:"None!"})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);function c(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 l(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 l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=.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(201);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(28),n(3)),c=n(201);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.PortableTurret=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.PortableTurret=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.locked,u=l.on,s=l.lethal,m=l.lethal_is_configurable,p=l.targetting_is_configurable,h=l.check_weapons,f=l.neutralize_noaccess,C=l.neutralize_norecord,N=l.neutralize_criminals,b=l.neutralize_all,V=l.neutralize_nonsynth,g=l.neutralize_unidentified,v=l.neutralize_down;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe an ID card to ",d?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",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")}})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lethals",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"exclamation-triangle":"times",content:s?"On":"Off",color:s?"bad":"",disabled:d,onClick:function(){return c("lethal")}})})]})}),!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Humanoid Targets",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Wanted Criminals",disabled:d,onClick:function(){return c("autharrest")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"No Sec Record",disabled:d,onClick:function(){return c("authnorecord")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Unauthorized Weapons",disabled:d,onClick:function(){return c("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Unauthorized Access",disabled:d,onClick:function(){return c("authaccess")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Other Targets",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:g,content:"Unidentified Lifesigns (Xenos, Animals, Etc)",disabled:d,onClick:function(){return c("authxeno")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:V,content:"All Non-Synthetics",disabled:d,onClick:function(){return c("authsynth")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:v,content:"Downed Targets",disabled:d,onClick:function(){return c("authdown")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"All Entities",disabled:d,onClick:function(){return c("authall")}})]})],4)]})})}},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(20);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:u?(0,c.capitalize)(u):"ERROR"}),(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:m?(0,c.capitalize)(m):"ERROR"}),(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:h?(0,c.capitalize)(h):"ERROR"}),(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:C?(0,c.capitalize)(C):"ERROR"})]})})},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,{spacing:1,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,{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),children:(0,o.createComponentVNode)(2,a.Button,{selected:e.realchargetype===t.index,icon:"arrow-right",onClick:function(){return i("interact_module",{module:e.index,module_mode:"select_charge_type",charge_type:t.index})}})},t.caption)}))]})})}):null]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Radio=void 0;var o=n(0),r=(n(8),n(5)),a=n(1),i=n(2),c=n(28),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,V=u.loudspeaker,g=u.mic_cut,v=u.spk_cut,k=u.useSyndMode,_=c.RADIO_CHANNELS.find((function(e){return e.freq===Number(s)})),y=156;return b&&b.length>0?y+=28*b.length+6:y+=24,N&&(y+=38),(0,o.createComponentVNode)(2,l.Window,{width:310,height:y,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)})}}),_&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:_.color,ml:2,children:["[",_.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:g,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:V?"volume-up":"volume-mute",selected:V,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,V=p.mats,g=p.reagents,v=p.queue,k=(0,a.useSharedState)(t,"protoTab",0),_=k[0],y=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===_,onClick:function(){return y(0)},children:"Build"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"layer-group",iconSpin:b,color:b?"average":"transparent",selected:1===_,onClick:function(){return y(1)},children:"Queue"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"cookie-bite",selected:2===_,onClick:function(){return y(2)},children:"Mat Storage"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{icon:"flask",selected:3===_,onClick:function(){return y(3)},children:"Chem Storage"})]}),0===_&&(0,o.createComponentVNode)(2,m,{target:u,designs:s,buildName:"Protolathe"===d?"build":"imprint",buildFiveName:"Protolathe"===d?"buildfive":null})||1===_&&(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===_&&(0,o.createComponentVNode)(2,i.LabeledList,{children:V.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===_&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:g.length&&g.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(8);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(28),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,g),(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,V,{records:c,actToDo:"view_b_rec"}):3===i&&(n=(0,o.createComponentVNode)(2,V,{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},V=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."]})})},g=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,V=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:V&&(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.RustCoreMonitorContent=t.RustCoreMonitor=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.RustCoreMonitor=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.cores;return(0,o.createComponentVNode)(2,i.Section,{title:"Cores",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Set Tag",onClick:function(){return a("set_tag")}}),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:"Field Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reactant Mode"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Field Instability"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Field Temperature"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Field Strength"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Plasma Content"})]}),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:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.has_field?"Online":"Offline",selected:e.has_field,disabled:!e.core_operational,onClick:function(){return a("toggle_active",{core:e.ref})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.reactant_dump?"Dump":"Maintain",selected:e.has_field,disabled:!e.core_operational,onClick:function(){return a("toggle_reactantdump",{core:e.ref})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.field_instability}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.field_temperature}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Knob,{forcedInputWidth:"60px",size:1.25,color:!!e.has_field&&"yellow",value:e.target_field_strength,unit:"(W.m^-3)",minValue:1,maxValue:1e3,stepPixelSize:1,onDrag:function(t,n){return a("set_fieldstr",{core:e.ref,fieldstr:n})}})}),(0,o.createComponentVNode)(2,i.Table.Cell)]},e.name)}))]})})};t.RustCoreMonitorContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.RustFuelContent=t.RustFuelControl=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.RustFuelControl=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.fuels;return(0,o.createComponentVNode)(2,i.Section,{title:"Fuel Injectors",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Set Tag",onClick:function(){return a("set_tag")}}),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:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Remaining Fuel"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Fuel Rod Composition"})]}),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:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:e.active?"Online":"Offline",selected:e.active,disabled:!e.deployed,onClick:function(){return a("toggle_active",{fuel:e.ref})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.fuel_amt}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.fuel_type})]},e.name)}))]})})};t.RustFuelContent=c},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.bot_patrolling,b=l.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: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.SecureSafe=void 0;var o=n(0),r=n(1),a=n(2),i=n(3),c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.locked,d=c.l_setshort,u=c.code,s=c.emagged;return(0,o.createComponentVNode)(2,a.Box,{width:"185px",children:(0,o.createComponentVNode)(2,a.Grid,{width:"1px",children:[["1","4","7","R"],["2","5","8","0"],["3","6","9","E"]].map((function(e){return(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,mb:"6px",content:e,textAlign:"center",fontSize:"40px",height:"50px",lineHeight:1.25,disabled:!!s||!!d&&1||"R"!==e&&!l||"ERROR"===u&&"R"!==e&&1,onClick:function(){return i("type",{digit:e})}},e)}))},e[0])}))})})};t.SecureSafe=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.code,u=l.l_setshort,s=l.l_set,m=l.emagged,p=l.locked,h=!(s||u);return(0,o.createComponentVNode)(2,i.Window,{width:250,height:380,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Box,{m:"6px",children:[h&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",info:1,children:"ENTER NEW 5-DIGIT PASSCODE."}),!!m&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",danger:1,children:"LOCKING SYSTEM ERROR - 1701"}),!!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",danger:1,children:"ALERT: MEMORY SYSTEM ERROR - 6040 201"}),(0,o.createComponentVNode)(2,a.Section,{height:"60px",children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",position:"center",fontSize:"35px",children:d&&d||(0,o.createComponentVNode)(2,a.Box,{textColor:p?"red":"green",children:p?"LOCKED":"UNLOCKED"})})}),(0,o.createComponentVNode)(2,a.Flex,{ml:"3px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:"6px",width:"129px"})]})]})})})}},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(95),d=n(96),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",inline:!0,preserveWhiteSpace:!0,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,preserveWhiteSpace:!0,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(8);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:760,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(20);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(20),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,V=d.max_field_strength,g=d.shields,v=d.upkeep,k=d.strengthen_rate,_=d.max_strengthen_rate,y=d.gen_power,L=(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)(y)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Currently Shielded",children:[g," m\xb2"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Capacitors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:L?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:_,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:V,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,V=d.cloaked,g=d.can_autopilot,v=d.routes,k=d.is_in_transit,_=d.travel_progress,y=d.time_left,L=d.doors,B=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:V,icon:V?"eye":"eye-o",onClick:function(){return c("toggle_cloaked")},children:V?"Enabled":"Disabled"})})||null,g&&(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:_,children:[y,"s"]})})})})||null,Object.keys(L).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Hatch Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(L).map((function(e){var t=L[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(B).length&&(0,o.createComponentVNode)(2,i.Section,{title:"Sensors",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:Object.keys(B).map((function(e){var t=B[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.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:760,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(8),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(20),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,V=u.outputAttempt,g=u.outputting,v=u.outputLevel,k=u.outputLevelMax,_=u.outputUsed,y=(s>=100?"good":f&&"average")||"bad",L=(g?"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:y,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:V?"power-off":"times",selected:V,onClick:function(){return d("tryoutput")},children:V?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:L,children:g?"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)(_)})]})})]})})}},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(28),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.Stack=void 0;var o=n(0),r=(n(5),n(1)),a=n(2),i=n(3);n(24);t.Stack=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.amount,u=l.recipes;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,{title:"Amount: "+d,children:(0,o.createComponentVNode)(2,c,{recipes:u})})})})};var c=function u(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data,e.recipes);return Object.keys(i).sort().map((function(e){var t=i[e];return t.ref===undefined?(0,o.createComponentVNode)(2,a.Collapsible,{ml:1,mb:-.7,color:"label",title:e,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,children:(0,o.createComponentVNode)(2,u,{recipes:t})})}):(0,o.createComponentVNode)(2,d,{title:e,recipe:t})}))},l=function(e,t){for(var n=(0,r.useBackend)(t),i=n.act,c=(n.data,e.recipe),l=e.maxMultiplier,d=Math.min(l,Math.floor(c.max_res_amount/c.res_amount)),u=[5,10,25],s=[],m=function(){var e=h[p];d>=e&&s.push((0,o.createComponentVNode)(2,a.Button,{content:e*c.res_amount+"x",onClick:function(){return i("make",{ref:c.ref,multiplier:e})}}))},p=0,h=u;p1?"s":""),h+=")",s>1&&(h=s+"x "+h);var f=function(e,t){return e.req_amount>t?0:Math.floor(t/e.req_amount)}(d,c);return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:!f,icon:"wrench",content:h,onClick:function(){return i("make",{ref:d.ref,multiplier:1})}})}),m>1&&f>1&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l,{recipe:d,maxMultiplier:f})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationBlueprintsContent=t.StationBlueprints=void 0;var o=n(0),r=(n(8),n(41),n(10),n(7),n(1)),a=n(2),i=n(3);t.StationBlueprints=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:870,height:708,resizable:!0,children:(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=(n.config,c.mapRef);c.areas,c.turfs;return(0,o.createFragment)([(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:"Honk!"}),2),(0,o.createVNode)(1,"div","CameraConsole__right",(0,o.createComponentVNode)(2,a.ByondUi,{className:"CameraConsole__map",params:{id:l,type:"map"}}),2)],4)};t.StationBlueprintsContent=c},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(8),a=(n(5),n(20)),i=n(1),c=n(2),l=n(45),d=n(3),u=n(41),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(20);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.showToggle,s=void 0===u||u,m=l.maskConnected,p=l.tankPressure,h=l.releasePressure,f=l.defaultReleasePressure,C=l.minReleasePressure,N=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:!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:d?"air-freshener":"lock-open",selected:d,disabled:!m,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:m?"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:p/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:h===C,onClick:function(){return c("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(h),width:"65px",unit:"kPa",minValue:C,maxValue:N,onChange:function(e,t){return c("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===N,onClick:function(){return c("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:h===f,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,V=c.minRange,g=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:V,maxValue:g,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.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),i=n(3);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.locked_name,u=l.station_connected,s=l.hub_connected,m=l.calibrated,p=l.teleporter_on;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:200,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:"Target",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"bullseye",onClick:function(){return c("select_target")},content:d})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibrated",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,color:m?"good":"bad",onClick:function(){return c("test_fire")},content:m?"Accurate":"Test Fire"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleporter",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,color:p?"good":"bad",onClick:function(){return c("toggle_on")},content:p?"Online":"OFFLINE"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Station",children:u?"Connected":"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hub",children:s?"Connected":"Not Connected"})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TelesciConsoleContent=t.TelesciConsole=void 0;var o=n(0),r=n(8),a=n(1),i=n(2),c=n(3);t.TelesciConsole=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.noTelepad);return(0,o.createComponentVNode)(2,c.Window,{width:400,height:450,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:r&&(0,o.createComponentVNode)(2,l)||(0,o.createComponentVNode)(2,d)})})};var l=function(e,t){return(0,o.createComponentVNode)(2,i.Section,{title:"Error",color:"bad",children:["No telepad located.",(0,o.createVNode)(1,"br"),"Please add telepad data."]})},d=function(e,t){var n=(0,a.useBackend)(t),c=n.act,l=n.data,d=l.insertedGps,u=l.rotation,s=l.currentZ,m=l.cooldown,p=l.crystalCount,h=l.maxCrystals,f=(l.maxPossibleDistance,l.maxAllowedDistance),C=l.distance,N=l.tempMsg,b=l.sectorOptions,V=l.lastTeleData;return(0,o.createComponentVNode)(2,i.Section,{title:"Telepad Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!d,onClick:function(){return c("ejectGPS")},content:"Eject GPS"}),children:[(0,o.createComponentVNode)(2,i.NoticeBox,{info:!0,children:m&&(0,o.createComponentVNode)(2,i.Box,{children:["Telepad is recharging. Please wait ",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:m})," seconds."]})||(0,o.createComponentVNode)(2,i.Box,{children:N})}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bearing",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,value:u,format:function(e){return e+"\xb0"},step:1,minValue:-900,maxValue:900,onDrag:function(e,t){return c("setrotation",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Distance",children:(0,o.createComponentVNode)(2,i.NumberInput,{fluid:!0,value:C,format:function(e){return e+"/"+f+" m"},minValue:0,maxValue:f,step:1,stepPixelSize:4,onDrag:function(e,t){return c("setdistance",{val:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sector",children:(0,r.sortBy)((function(e){return Number(e)}))(b).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"check-circle",content:e,selected:s===e,onClick:function(){return c("setz",{setz:e})}},e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"share",iconRotation:-90,onClick:function(){return c("send")},content:"Send"}),(0,o.createComponentVNode)(2,i.Button,{icon:"share",iconRotation:90,onClick:function(){return c("receive")},content:"Receive"}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",iconRotation:90,onClick:function(){return c("recal")},content:"Recalibrate"})]})]}),V&&(0,o.createComponentVNode)(2,i.Section,{mt:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Telepad Location",children:[V.src_x,", ",V.src_y]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Distance",children:[V.distance,"m"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transit Time",children:[V.time," secs"]})]})})||(0,o.createComponentVNode)(2,i.Section,{mt:1,children:"No teleport data found."}),(0,o.createComponentVNode)(2,i.Section,{children:["Crystals: ",p," / ",h]})]})};t.TelesciConsoleContent=d},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(191);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.TurbineControl=void 0;var o=n(0),r=(n(5),n(20)),a=n(1),i=n(2),c=n(3);t.TurbineControl=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=(d.connected,d.compressor_broke),s=d.turbine_broke,m=d.broken,p=d.door_status,h=d.online,f=d.power,C=d.rpm,N=d.temp;return(0,o.createComponentVNode)(2,c.Window,{width:520,height:440,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Turbine Controller",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:m&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:["Setup is broken",(0,o.createComponentVNode)(2,i.Button,{icon:"sync",onClick:function(){return l("reconnect")},content:"Reconnect"})]})||(0,o.createComponentVNode)(2,i.Box,{color:h?"good":"bad",children:!h||u||s?"Offline":"Online"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Compressor",children:u&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Compressor is inoperable."})||s&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Turbine is inoperable."})||(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:h,content:"Compressor Power",onClick:function(){return l(h?"power-off":"power-on")}})})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Vent Doors",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:p,onClick:function(){return l("doors")},content:p?"Closed":"Open"})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Turbine Speed",children:[m?"--":(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:C})," RPM"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Temperature",children:[m?"--":(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:N})," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Generated Power",children:m?"--":(0,o.createComponentVNode)(2,i.AnimatedNumber,{format:function(e){return(0,r.formatPower)(e)},value:Number(f)})})]})})]})})}},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.GenericUplink=t.Uplink=void 0;var o=n(0),r=n(7),a=n(1),i=n(2),c=n(20),l=n(3);t.Uplink=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"screen",0),c=r[0],m=r[1],p=n.telecrystals;return(0,o.createComponentVNode)(2,l.Window,{width:620,height:580,theme:"syndicate",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d,{screen:c,setScreen:m}),0===c&&(0,o.createComponentVNode)(2,s,{currencyAmount:p,currencySymbol:"TC"})||1===c&&(0,o.createComponentVNode)(2,u)||(0,o.createComponentVNode)(2,i.Section,{color:"bad",children:"Error"})]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=e.screen,l=e.setScreen,d=r.discount_name,u=r.discount_amount,s=r.offer_expiry;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Tabs,{style:{"border-bottom":"none","margin-bottom":"0"},children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===c,onClick:function(){return l(0)},children:"Request Items"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===c,onClick:function(){return l(1)},children:"Exploitable Information"})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Item Discount",level:2,children:u<100&&(0,o.createComponentVNode)(2,i.Box,{children:[d," - ",u,"% off. Offer expires at: ",s]})||(0,o.createComponentVNode)(2,i.Box,{children:"No items currently discounted."})})]})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.exploit,d=c.locked_records;return(0,o.createComponentVNode)(2,i.Section,{title:"Exploitable Information",buttons:l&&(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"Back",onClick:function(){return r("view_exploits",{id:0})}}),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.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sex",children:l.sex}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:l.species}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Age",children:l.age}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rank",children:l.rank}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Home System",children:l.home_system}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Citizenship",children:l.citizenship}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Faction",children:l.faction}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Religion",children:l.religion}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fingerprint",children:l.fingerprint}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other Affiliations",children:l.antagfaction}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:"Acquired Information"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Notes",children:l.nanoui_exploit_record})]})})||d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"eye",fluid:!0,content:e.name,onClick:function(){return r("view_exploits",{id:e.id})}},e.id)}))})},s=function(e,t){var n,l,d=e.currencyAmount,u=void 0===d?0:d,s=e.currencySymbol,p=void 0===s?"\u20ae":s,h=(0,a.useBackend)(t),f=h.act,C=h.data,N=C.compactMode,b=C.lockable,V=C.categories,g=void 0===V?[]:V,v=(0,a.useLocalState)(t,"searchText",""),k=v[0],_=v[1],y=(0,a.useLocalState)(t,"category",null==(n=g[0])?void 0:n.name),L=y[0],B=y[1],x=(0,r.createSearch)(k,(function(e){return e.name+e.desc})),w=k.length>0&&g.flatMap((function(e){return e.items||[]})).filter(x).filter((function(e,t){return t<25}))||(null==(l=g.find((function(e){return e.name===L})))?void 0:l.items)||[];return(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:u>0?"good":"bad",children:[(0,c.formatMoney)(u)," ",p]}),buttons:(0,o.createFragment)([(0,o.createTextVNode)("Search"),(0,o.createComponentVNode)(2,i.Input,{autoFocus:!0,value:k,onInput:function(e,t){return _(t)},mx:1}),(0,o.createComponentVNode)(2,i.Button,{icon:N?"list":"info",content:N?"Compact":"Detailed",onClick:function(){return f("compact_toggle")}}),!!b&&(0,o.createComponentVNode)(2,i.Button,{icon:"lock",content:"Lock",onClick:function(){return f("lock")}})],0),children:(0,o.createComponentVNode)(2,i.Flex,{children:[0===k.length&&(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Tabs,{vertical:!0,children:g.map((function(e){var t;return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:e.name===L,onClick:function(){return B(e.name)},children:[e.name," (",(null==(t=e.items)?void 0:t.length)||0,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:[0===w.length&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:0===k.length?"No items in this category.":"No results found."}),(0,o.createComponentVNode)(2,m,{compactMode:k.length>0||N,currencyAmount:u,currencySymbol:p,items:w})]})]})})};t.GenericUplink=s;var m=function(e,t){var n=e.compactMode,l=e.currencyAmount,d=e.currencySymbol,u=(0,a.useBackend)(t).act,s=(0,a.useLocalState)(t,"hoveredItem",{}),m=s[0],p=s[1],h=m&&m.cost||0,f=e.items.map((function(e){var t=m&&m.name!==e.name,n=l-h0&&(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,V=d.coolant_usage_max,g=(d.unused_coolant_abs,d.unused_coolant_per),v=d.coolant_purity,k=d.optimal_wavelength,_=d.maser_wavelength,y=d.maser_wavelength_max,L=d.maser_efficiency,B=d.radiation,x=(d.t_left_radspike,d.rad_shield_on);return(0,o.createComponentVNode)(2,i.Window,{width:900,height:760,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:L,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:_,fillValue:k,minValue:1,maxValue:y,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:x,icon:"radiation",onClick:function(){return l("toggle_rad_shield")},children:x?"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:B,maxValue:100,ranges:{bad:[65,Infinity],average:[15,65],good:[0,15]},children:[B," 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*g,maxValue:1e3,ranges:{good:[65,Infinity],average:[15,65],bad:[0,15]},children:[10*g," u"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Coolant Flow Rate",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,value:b,maxValue:V,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)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pAIAtmos=void 0;var o=n(0),r=n(8),a=n(7),i=n(1),c=n(2),l=n(3);t.pAIAtmos=function(e,t){var n=(0,i.useBackend)(t),d=(n.act,n.data.aircontents);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,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,r.filter)((function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}))(d).map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.entry,color:(t=e.val,n=e.bad_low,r=e.poor_low,i=e.poor_high,l=e.bad_high,t