diff --git a/README.md b/README.md
index ba147006b56f0..76a2089db7625 100644
--- a/README.md
+++ b/README.md
@@ -19,4 +19,6 @@ Sprites added in commit d407e97e26ee5e6bb1daf945a8eb3bd9a6b11976 are CC-BY-NC 3.
All sounds added/remixed in the PR https://github.com/tgstation/TerraGov-Marine-Corps/pull/5261 are licensed under CC-BY-NC-SA 3.0
+Sound added in PR https://github.com/tgstation/TerraGov-Marine-Corps/pull/5603 is taken from https://freesound.org/people/nicStage/sounds/127731/ (CC Attribution)
+
The TGS DMAPI API is licensed as a subproject under the MIT license.
diff --git a/code/__HELPERS/movable.dm b/code/__HELPERS/movable.dm
deleted file mode 100644
index b8aa5c36f31f1..0000000000000
--- a/code/__HELPERS/movable.dm
+++ /dev/null
@@ -1,43 +0,0 @@
-/atom/movable/proc/line_of_sight(atom/target, view_dist = WORLD_VIEW_NUM)
- if(QDELETED(target))
- return FALSE
-
- if(z != target.z) //No multi-z.
- return FALSE
-
- var/total_distance = get_dist(src, target)
-
- if(total_distance > view_dist)
- return FALSE
-
- switch(total_distance)
- if(-1)
- if(target == src) //We can see ourselves alright.
- return TRUE
- else //Standard get_dist() error condition.
- return FALSE
- if(null) //Error, does not compute.
- CRASH("get_dist returned null on line_of_sight() with [src] as src and [target] as target")
- if(0, 1) //We can see our own tile and the next one regardless.
- return TRUE
-
- var/turf/turf_to_check = get_turf(src)
- var/turf/target_turf = get_turf(target)
-
- for(var/i in 1 to total_distance - 1)
- turf_to_check = get_step(turf_to_check, get_dir(turf_to_check, target_turf))
- if(IS_OPAQUE_TURF(turf_to_check))
- return FALSE //First and last turfs' opacity don't matter, but the ones in-between do.
- for(var/obj/stuff_in_turf in turf_to_check)
- if(!stuff_in_turf.opacity)
- continue //Transparent, we can see through it.
- if(!CHECK_BITFIELD(stuff_in_turf.flags_atom, ON_BORDER))
- return FALSE //Opaque and not on border. We can't see through this tile, it's over.
- if(ISDIAGONALDIR(stuff_in_turf.dir))
- return FALSE //Opaque fulltile window.
- if(CHECK_BITFIELD(dir, stuff_in_turf.dir))
- return FALSE //Same direction and opaque, blocks our view.
- if(CHECK_BITFIELD(dir, reverse_direction(stuff_in_turf.dir)))
- return FALSE //Doesn't block this tile, but it does block the next, and this is not the last pass.
-
- return TRUE
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 1e5d715777b06..66dce5707f528 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1008,26 +1008,6 @@ GLOBAL_LIST_INIT(common_tools, typecacheof(list(
#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) )
-/proc/reverse_direction(direction)
- switch(direction)
- if(NORTH)
- return SOUTH
- if(NORTHEAST)
- return SOUTHWEST
- if(EAST)
- return WEST
- if(SOUTHEAST)
- return NORTHWEST
- if(SOUTH)
- return NORTH
- if(SOUTHWEST)
- return NORTHEAST
- if(WEST)
- return EAST
- if(NORTHWEST)
- return SOUTHEAST
-
-
/proc/reverse_nearby_direction(direction)
switch(direction)
if(NORTH)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index b93066994f797..0fb87b2042874 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -922,3 +922,48 @@
/atom/movable/proc/CanPassThrough(atom/blocker, turf/target, blocker_opinion)
SHOULD_CALL_PARENT(TRUE)
return blocker_opinion
+
+///returns FALSE if there isnt line of sight to target within view dist and TRUE if there is
+/atom/movable/proc/line_of_sight(atom/target, view_dist = WORLD_VIEW_NUM)
+ if(QDELETED(target))
+ return FALSE
+
+ if(z != target.z) //No multi-z.
+ return FALSE
+
+ var/total_distance = get_dist(src, target)
+
+ if(total_distance > view_dist)
+ return FALSE
+
+ switch(total_distance)
+ if(-1)
+ if(target == src) //We can see ourselves alright.
+ return TRUE
+ else //Standard get_dist() error condition.
+ return FALSE
+ if(null) //Error, does not compute.
+ CRASH("get_dist returned null on line_of_sight() with [src] as src and [target] as target")
+ if(0, 1) //We can see our own tile and the next one regardless.
+ return TRUE
+
+ var/turf/turf_to_check = get_turf(src)
+ var/turf/target_turf = get_turf(target)
+
+ for(var/i in 1 to total_distance - 1)
+ turf_to_check = get_step(turf_to_check, get_dir(turf_to_check, target_turf))
+ if(IS_OPAQUE_TURF(turf_to_check))
+ return FALSE //First and last turfs' opacity don't matter, but the ones in-between do.
+ for(var/obj/stuff_in_turf in turf_to_check)
+ if(!stuff_in_turf.opacity)
+ continue //Transparent, we can see through it.
+ if(!CHECK_BITFIELD(stuff_in_turf.flags_atom, ON_BORDER))
+ return FALSE //Opaque and not on border. We can't see through this tile, it's over.
+ if(ISDIAGONALDIR(stuff_in_turf.dir))
+ return FALSE //Opaque fulltile window.
+ if(CHECK_BITFIELD(dir, stuff_in_turf.dir))
+ return FALSE //Same direction and opaque, blocks our view.
+ if(CHECK_BITFIELD(dir, REVERSE_DIR(stuff_in_turf.dir)))
+ return FALSE //Doesn't block this tile, but it does block the next, and this is not the last pass.
+
+ return TRUE
diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
index 3d0807bec45f7..c143d224ce29d 100644
--- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm
+++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
@@ -59,3 +59,23 @@
name = "transfer plasma"
icon_state = "transfer_plasma"
duration = 0.5 SECONDS
+
+
+/obj/effect/temp_visual/xenomorph/runner_afterimage
+ name = "runner afterimage"
+ desc = "It has become speed.."
+ icon = 'icons/Xeno/2x2_Xenos.dmi' //They are now like, 2x1 or something
+ icon_state = "Runner Walking"
+ layer = MOB_LAYER
+ alpha = 64 //Translucent
+ duration = 0.5 SECONDS
+ density = FALSE
+ opacity = FALSE
+ anchored = FALSE
+ animate_movement = SLIDE_STEPS
+
+/obj/effect/temp_visual/heavyimpact
+ name = "heavy impact"
+ icon = 'icons/effects/heavyimpact.dmi'
+ icon_state = "heavyimpact"
+ duration = 13
diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm
index 955a721e50534..9386d87455897 100644
--- a/code/game/objects/effects/temporary_visuals/temporary_visual.dm
+++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm
@@ -35,18 +35,6 @@
setDir(set_dir)
return ..()
-/obj/effect/temp_visual/xenomorph/runner_afterimage
- name = "runner afterimage"
- desc = "It has become speed.."
- icon = 'icons/Xeno/2x2_Xenos.dmi' //They are now like, 2x1 or something
- icon_state = "Runner Walking"
- layer = MOB_LAYER
- alpha = 64 //Translucent
- duration = 0.5 SECONDS
- density = FALSE
- opacity = FALSE
- anchored = FALSE
- animate_movement = SLIDE_STEPS
///Image that appears at the Xeno Rally target; only Xenos can see it
/obj/effect/temp_visual/xenomorph/xeno_tracker_target
diff --git a/code/game/objects/machinery/camera/camera_assembly.dm b/code/game/objects/machinery/camera/camera_assembly.dm
index 3b1c9e9394515..13cd649e41049 100644
--- a/code/game/objects/machinery/camera/camera_assembly.dm
+++ b/code/game/objects/machinery/camera/camera_assembly.dm
@@ -35,7 +35,7 @@
user.visible_message("[user] begins attaching [src] to the wall.", "You being attaching [src] to the wall.")
playsound(loc, 'sound/machines/click.ogg', 15, 1)
- var/constrdir = reverse_direction(user.dir)
+ var/constrdir = REVERSE_DIR(user.dir)
var/constrloc = user.loc
if(!do_after(user, 30, TRUE, wall, BUSY_ICON_BUILD))
diff --git a/code/game/objects/structures/dropship_ammo.dm b/code/game/objects/structures/dropship_ammo.dm
index 3be7513d46351..dd0da9c6c0ace 100644
--- a/code/game/objects/structures/dropship_ammo.dm
+++ b/code/game/objects/structures/dropship_ammo.dm
@@ -11,17 +11,20 @@
throwpass = TRUE
climbable = TRUE
resistance_flags = XENO_DAMAGEABLE
- var/travelling_time = 100 //time to impact
- var/equipment_type //type of equipment that accept this type of ammo.
+ ///Time before the ammo impacts
+ var/travelling_time = 10 SECONDS
+ ///type of equipment that accept this type of ammo.
+ var/equipment_type
var/ammo_count
var/max_ammo_count
var/ammo_name = "round" //what to call the ammo in the ammo transfering message
var/ammo_id
- var/transferable_ammo = FALSE //whether the ammo inside this magazine can be transfered to another magazine.
+ ///whether the ammo inside this magazine can be transfered to another magazine.
+ var/transferable_ammo = FALSE
var/accuracy_range = 3 //how many tiles the ammo can deviate from the laser target
- var/warning_sound = 'sound/machines/hydraulics_2.ogg' //sound played mere seconds before impact
+ ///sound played mere seconds before impact
+ var/warning_sound = 'sound/machines/hydraulics_2.ogg'
var/ammo_used_per_firing = 1
- var/max_inaccuracy = 6 //what's the max deviation allowed when the ammo is no longer guided by a laser.
var/point_cost = 0 //how many points it costs to build this with the fabricator, set to 0 if unbuildable.
@@ -52,7 +55,7 @@
to_chat(user, "You grab [PC.loaded] with [PC].")
update_icon()
return TRUE
- . = ..()
+ return ..()
examine(mob/user)
@@ -64,7 +67,7 @@
to_chat(user, "It's loaded with \a [src].")
return
-/obj/structure/ship_ammo/proc/detonate_on(turf/impact)
+/obj/structure/ship_ammo/proc/detonate_on(turf/impact, attackdir = NORTH)
return
@@ -75,53 +78,66 @@
icon_state = "30mm_crate"
desc = "A crate full of 30mm bullets used on the dropship heavy guns."
equipment_type = /obj/structure/dropship_equipment/weapon/heavygun
+ accuracy_range = 0 //always hits
+ travelling_time = 6 SECONDS
ammo_count = 200
max_ammo_count = 200
transferable_ammo = TRUE
ammo_used_per_firing = 20
point_cost = 50
- var/bullet_spread_range = 4 //how far from the real impact turf can bullets land
+ ///Radius of the square that the bullets will strafe
+ var/bullet_spread_range = 2
+ ///Width of the square we are attacking, so you can make rectangular attacks later
+ var/attack_width = 3
- examine(mob/user)
- ..()
- to_chat(user, "It has [ammo_count] round\s.")
-
- show_loaded_desc(mob/user)
- if(ammo_count)
- to_chat(user, "It's loaded with \a [src] containing [ammo_count] round\s.")
- else
- to_chat(user, "It's loaded with an empty [name].")
-
- detonate_on(turf/impact)
- set waitfor = 0
- var/list/turf_list = list()
- for(var/turf/T in range(impact, bullet_spread_range))
- turf_list += T
- var/soundplaycooldown = 0
- var/debriscooldown = 0
- for(var/i=1, i<=ammo_used_per_firing, i++)
- var/turf/U = pick(turf_list)
- turf_list -= U
- sleep(1)
- U.ex_act(3)
- for(var/atom/movable/AM in U)
- AM.ex_act(3)
- if(!soundplaycooldown) //so we don't play the same sound 20 times very fast.
- playsound(U, get_sfx("explosion"), 40, 1, 20, falloff = 3)
- soundplaycooldown = 3
- soundplaycooldown--
- if(!debriscooldown)
- U.ceiling_debris_check(1)
- debriscooldown = 6
- debriscooldown--
- new /obj/effect/particle_effect/expl_particles(U)
+/obj/structure/ship_ammo/heavygun/examine(mob/user)
+ . = ..()
+ to_chat(user, "It has [ammo_count] round\s.")
+
+/obj/structure/ship_ammo/heavygun/show_loaded_desc(mob/user)
+ if(ammo_count)
+ to_chat(user, "It's loaded with \a [src] containing [ammo_count] round\s.")
+ else
+ to_chat(user, "It's loaded with an empty [name].")
+
+/obj/structure/ship_ammo/heavygun/detonate_on(turf/impact, attackdir = NORTH)
+ playsound(impact, 'sound/effects/casplane_flyby.ogg', 40)
+ var/turf/beginning = impact
+ var/revdir = REVERSE_DIR(attackdir)
+ for(var/i=0 to bullet_spread_range)
+ beginning = get_step(beginning, revdir)
+ var/list/strafelist = list(beginning)
+ strafelist += get_step(beginning, turn(attackdir, 90))
+ strafelist += get_step(beginning, turn(attackdir, -90)) //Build this list 3 turfs at a time for strafe_turfs
+ for(var/b=0 to bullet_spread_range*2)
+ beginning = get_step(beginning, attackdir)
+ strafelist += beginning
+ strafelist += get_step(beginning, turn(attackdir, 90))
+ strafelist += get_step(beginning, turn(attackdir, -90))
+ strafe_turfs(strafelist)
+
+///Takes the top 3 turfs and miniguns them, then repeats until none left
+/obj/structure/ship_ammo/heavygun/proc/strafe_turfs(list/strafelist)
+ var/turf/strafed
+ playsound(strafelist[1], get_sfx("explosion"), 40, 1, 20, falloff = 3)
+ for(var/i=1 to attack_width)
+ strafed = strafelist[1]
+ strafelist -= strafed
+ strafed.ex_act(EXPLODE_LIGHT)
+ new /obj/effect/particle_effect/expl_particles(strafed)
+ new /obj/effect/temp_visual/heavyimpact(strafed)
+ for(var/atom/movable/AM as() in strafed)
+ AM.ex_act(EXPLODE_LIGHT)
+
+ if(length(strafelist))
+ addtimer(CALLBACK(src, .proc/strafe_turfs, strafelist), 2)
/obj/structure/ship_ammo/heavygun/highvelocity
name = "high-velocity 30mm ammo crate"
icon_state = "30mm_crate_hv"
desc = "A crate full of 30mm high-velocity bullets used on the dropship heavy guns."
- travelling_time = 60
+ travelling_time = 6 SECONDS
ammo_count = 400
max_ammo_count = 400
ammo_used_per_firing = 40
@@ -136,22 +152,23 @@
name = "high-capacity laser battery"
icon_state = "laser_battery"
desc = "A high-capacity laser battery used to power laser beam weapons."
- travelling_time = 10
+ travelling_time = 1 SECONDS
ammo_count = 100
max_ammo_count = 100
ammo_used_per_firing = 40
equipment_type = /obj/structure/dropship_equipment/weapon/laser_beam_gun
ammo_name = "charge"
transferable_ammo = TRUE
- accuracy_range = 1
+ accuracy_range = 0 //its a laser
ammo_used_per_firing = 10
- max_inaccuracy = 1
warning_sound = 'sound/effects/nightvision.ogg'
point_cost = 150
+ ///The length of the beam that will come out of when we fire do both ends xxxoxxx where o is where you click
+ var/laze_radius = 4
/obj/structure/ship_ammo/laser_battery/examine(mob/user)
- ..()
+ . = ..()
to_chat(user, "It's at [round(100*ammo_count/max_ammo_count)]% charge.")
@@ -162,28 +179,28 @@
to_chat(user, "It's loaded with an empty [name].")
-/obj/structure/ship_ammo/laser_battery/detonate_on(turf/impact)
- set waitfor = 0
- var/list/turf_list = list()
- for(var/turf/T in range(impact, 3))
- turf_list += T
- var/soundplaycooldown = 0
- for(var/i=1 to 20)
- var/turf/U = pick(turf_list)
- turf_list -= U
- sleep(1)
- laser_burn(U)
- if(!soundplaycooldown) //so we don't play the same sound 20 times very fast.
- playsound(U, 'sound/effects/pred_vision.ogg', 20, 1)
- soundplaycooldown = 3
- soundplaycooldown--
-
- if(!ammo_count && !gc_destroyed)
- qdel(src) //deleted after last laser beam is fired and impact the ground.
-
+/obj/structure/ship_ammo/laser_battery/detonate_on(turf/impact, attackdir = NORTH)
+ var/turf/beginning = impact
+ var/turf/end = impact
+ var/revdir = REVERSE_DIR(attackdir)
+ for(var/i=0 to laze_radius)
+ beginning = get_step(beginning, revdir)
+ end = get_step(end, attackdir)
+ var/list/turf/lazertargets = getline(beginning, end)
+ process_lazer(lazertargets)
+ if(!ammo_count)
+ QDEL_IN(src, laze_radius+1) //deleted after last laser beam is fired and impact the ground.
+///takes the top lazertarget on the stack and fires the lazer at it
+/obj/structure/ship_ammo/laser_battery/proc/process_lazer(list/lazertargets)
+ laser_burn(lazertargets[1])
+ lazertargets -= lazertargets[1]
+ if(length(lazertargets))
+ INVOKE_NEXT_TICK(src, .proc/process_lazer, lazertargets)
+///Lazer ammo acts on the turf passed in
/obj/structure/ship_ammo/laser_battery/proc/laser_burn(turf/T)
+ playsound(T, 'sound/effects/pred_vision.ogg', 30, 1)
for(var/mob/living/L in T)
L.adjustFireLoss(120)
L.adjust_fire_stacks(20)
@@ -204,11 +221,10 @@
ammo_id = ""
bound_width = 64
bound_height = 32
- travelling_time = 60 //faster than 30mm rounds
- max_inaccuracy = 5
+ travelling_time = 6 SECONDS //faster than 30mm rounds
point_cost = 0
-/obj/structure/ship_ammo/rocket/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/detonate_on(turf/impact, attackdir = NORTH)
qdel(src)
@@ -217,11 +233,11 @@
name = "\improper AIM-224 'Widowmaker'"
desc = "The AIM-224 is the latest in air to air missile technology. Earning the nickname of 'Widowmaker' from various dropship pilots after improvements to its guidence warhead prevents it from being jammed leading to its high kill rate. Not well suited for ground bombardment, but its high velocity makes it reach its target quickly."
icon_state = "single"
- travelling_time = 30 //not powerful, but reaches target fast
+ travelling_time = 4 SECONDS //not powerful, but reaches target fast
ammo_id = ""
point_cost = 150
-/obj/structure/ship_ammo/rocket/widowmaker/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/widowmaker/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(3)
explosion(impact, 2, 4, 6)
qdel(src)
@@ -233,7 +249,7 @@
ammo_id = "b"
point_cost = 175
-/obj/structure/ship_ammo/rocket/banshee/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/banshee/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(3)
explosion(impact, 2, 4, 7, 6, flame_range = 7) //more spread out, with flames
qdel(src)
@@ -245,7 +261,7 @@
ammo_id = "k"
point_cost = 300
-/obj/structure/ship_ammo/rocket/keeper/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/keeper/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(3)
explosion(impact, 4, 5, 5, 6, small_animation = TRUE) //tighter blast radius, but more devastating near center
qdel(src)
@@ -256,11 +272,10 @@
desc = "The SM-17 'Fatty' is a cluster-bomb type ordnance that only requires laser-guidance when first launched."
icon_state = "fatty"
ammo_id = "f"
- travelling_time = 70 //slower but deadly accurate, even if laser guidance is stopped mid-travel.
- max_inaccuracy = 1
+ travelling_time = 7 SECONDS //slower but deadly accurate, even if laser guidance is stopped mid-travel.
point_cost = 300
-/obj/structure/ship_ammo/rocket/fatty/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/fatty/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(2)
explosion(impact, 2, 3, 4) //first explosion is small to trick xenos into thinking its a minirocket.
addtimer(CALLBACK(src, .proc/delayed_detonation, impact), 3 SECONDS)
@@ -268,7 +283,7 @@
/obj/structure/ship_ammo/rocket/fatty/proc/delayed_detonation(turf/impact)
var/list/impact_coords = list(list(-3,3),list(0,4),list(3,3),list(-4,0),list(4,0),list(-3,-3),list(0,-4), list(3,-3))
- for(var/i in 1 to 8)
+ for(var/i=1 to 8)
var/list/coords = impact_coords[i]
var/turf/detonation_target = locate(impact.x+coords[1],impact.y+coords[2],impact.z)
detonation_target.ceiling_debris_check(2)
@@ -282,10 +297,13 @@
ammo_id = "n"
point_cost = 350
-/obj/structure/ship_ammo/rocket/napalm/detonate_on(turf/impact)
+/obj/structure/ship_ammo/rocket/napalm/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(3)
explosion(impact, 2, 3, 4, 6, small_animation = TRUE) //relatively weak
flame_radius(5, impact, 60, 30) //cooking for a long time
+ var/datum/effect_system/smoke_spread/phosphorus/warcrime = new
+ warcrime.set_up(6, impact, 7)
+ warcrime.start()
qdel(src)
@@ -300,15 +318,14 @@
ammo_count = 6
max_ammo_count = 6
ammo_name = "minirocket"
- travelling_time = 80 //faster than 30mm cannon, slower than real rockets
+ travelling_time = 7 SECONDS //faster than 30mm cannon, slower than real rockets
transferable_ammo = TRUE
point_cost = 100
-/obj/structure/ship_ammo/minirocket/detonate_on(turf/impact)
+/obj/structure/ship_ammo/minirocket/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(2)
-
explosion(impact, 0, 2, 4, 5, adminlog = FALSE, small_animation = TRUE)//no messaging admin, that'd spam them.
- var/datum/effect_system/expl_particles/P = new
+ var/datum/effect_system/expl_particles/P = new
P.set_up(4, 0, impact)
P.start()
addtimer(CALLBACK(src, .proc/delayed_smoke_spread, impact), 0.5 SECONDS)
@@ -335,9 +352,25 @@
icon_state = "minirocket_inc"
point_cost = 200
-/obj/structure/ship_ammo/detonate_on(turf/impact)
+/obj/structure/ship_ammo/minirocket/incendiary/detonate_on(turf/impact, attackdir = NORTH)
. = ..()
- impact.ignite()
+ flame_radius(3, impact)
+
+/obj/structure/ship_ammo/minirocket/smoke
+ name = "smoke mini rocket stack"
+ desc = "A pack of laser guided smoke mini rockets."
+ icon_state = "minirocket_smoke"
+ point_cost = 25
+
+/obj/structure/ship_ammo/minirocket/smoke/detonate_on(turf/impact, attackdir = NORTH)
+ impact.ceiling_debris_check(2)
+ explosion(impact, 0, 0, 2, 2, throw_range = 0)// Smaller explosion
+ var/datum/effect_system/expl_particles/P = new
+ P.set_up(4, 0, impact)
+ P.start()
+ var/datum/effect_system/smoke_spread/S = new
+ S.set_up(3, impact)
+ S.start()
/obj/structure/ship_ammo/minirocket/illumination
name = "illumination rocket-launched flare stack"
@@ -345,7 +378,7 @@
icon_state = "minirocket_ilm"
point_cost = 25 // Not a real rocket, so its cheap
-/obj/structure/ship_ammo/minirocket/illumination/detonate_on(turf/impact)
+/obj/structure/ship_ammo/minirocket/illumination/detonate_on(turf/impact, attackdir = NORTH)
impact.ceiling_debris_check(2)
var/turf/offset_impact = pick(range(5, impact))
explosion(offset_impact, 0, 0, 2, 2, throw_range = 0)// Smaller explosion to prevent this becoming the PO meta
@@ -375,4 +408,4 @@
set_light(light_power)
T.visible_message("You see a tiny flash, and then a blindingly bright light from a flare as it lights off in the sky!")
playsound(T, 'sound/weapons/guns/fire/flare.ogg', 50, 1, 4) // stolen from the mortar i'm not even sorry
- QDEL_IN(src, rand(700, 900)) // About the same burn time as a flare, considering it requires it's own CAS run.
+ QDEL_IN(src, rand(70 SECONDS, 90 SECONDS)) // About the same burn time as a flare, considering it requires it's own CAS run.
diff --git a/code/game/objects/structures/dropship_equipment.dm b/code/game/objects/structures/dropship_equipment.dm
index b166ebd8e65b0..5d940956f6add 100644
--- a/code/game/objects/structures/dropship_equipment.dm
+++ b/code/game/objects/structures/dropship_equipment.dm
@@ -650,13 +650,11 @@
ammo_equipped.ammo_count = max(ammo_equipped.ammo_count-ammo_equipped.ammo_used_per_firing, 0)
update_icon()
-/obj/structure/dropship_equipment/weapon/proc/open_fire(obj/selected_target)
- set waitfor = 0
+/obj/structure/dropship_equipment/weapon/proc/open_fire(obj/selected_target, attackdir)
var/turf/target_turf = get_turf(selected_target)
if(firing_sound)
playsound(loc, firing_sound, 70, 1)
var/obj/structure/ship_ammo/SA = ammo_equipped //necessary because we nullify ammo_equipped when firing big rockets
- var/ammo_max_inaccuracy = SA.max_inaccuracy
var/ammo_accuracy_range = SA.accuracy_range
var/ammo_travelling_time = SA.travelling_time //how long the rockets/bullets take to reach the ground target.
var/ammo_warn_sound = SA.warning_sound
@@ -665,26 +663,17 @@
if(linked_shuttle)
for(var/obj/structure/dropship_equipment/electronics/targeting_system/TS in linked_shuttle.equipments)
ammo_accuracy_range = max(ammo_accuracy_range-2, 0) //targeting system increase accuracy and reduce travelling time.
- ammo_max_inaccuracy = max(ammo_max_inaccuracy -3, 1)
- ammo_travelling_time = max(ammo_travelling_time - 20, 10)
+ ammo_travelling_time = max(ammo_travelling_time - 2 SECONDS, 1 SECONDS)
break
- if(ammo_travelling_time)
- var/total_seconds = max(round(ammo_travelling_time/10),1)
- for(var/i = 0 to total_seconds)
- sleep(10)
- if(!selected_target || !selected_target.loc)//if laser disappeared before we reached the target,
- ammo_accuracy_range = min(ammo_accuracy_range + 1, ammo_max_inaccuracy) //accuracy decreases
-
var/list/possible_turfs = list()
- for(var/turf/TU in range(ammo_accuracy_range, target_turf))
+ for(var/turf/TU as() in RANGE_TURFS(ammo_accuracy_range, target_turf))
possible_turfs += TU
var/turf/impact = pick(possible_turfs)
if(ammo_warn_sound)
playsound(impact, ammo_warn_sound, 70, 1)
new /obj/effect/overlay/temp/blinking_laser (impact)
- sleep(10)
- SA.detonate_on(impact)
+ addtimer(CALLBACK(SA, /obj/structure/ship_ammo.proc/detonate_on, impact, attackdir), ammo_travelling_time)
/obj/structure/dropship_equipment/weapon/heavygun
name = "\improper GAU-21 30mm cannon"
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index 01c9e88cdd666..0f4fc334d98c3 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -33,7 +33,7 @@
if (bloodDNA && !locate(/obj/structure) in contents)
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,H.dir,0,bloodcolor) // Coming
- var/turf/from = get_step(H,reverse_direction(H.dir))
+ var/turf/from = get_step(H,REVERSE_DIR(H.dir))
if(istype(from) && from)
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,0,H.dir,bloodcolor) // Going
diff --git a/code/modules/mob/living/carbon/xenomorph/facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/facehuggers.dm
index 42b82ab8cddad..f34e7f7f3c36f 100644
--- a/code/modules/mob/living/carbon/xenomorph/facehuggers.dm
+++ b/code/modules/mob/living/carbon/xenomorph/facehuggers.dm
@@ -354,7 +354,7 @@
if(M.in_throw_mode && M.dir != dir && !M.incapacitated() && !M.get_active_held_item())
var/catch_chance = 50
- if(M.dir == reverse_direction(dir))
+ if(M.dir == REVERSE_DIR(dir))
catch_chance += 20
catch_chance -= M.shock_stage * 0.3
if(M.get_inactive_held_item())
diff --git a/code/modules/shuttle/cas_plane.dm b/code/modules/shuttle/cas_plane.dm
index 8175969570aa1..2f7f057b8be1c 100644
--- a/code/modules/shuttle/cas_plane.dm
+++ b/code/modules/shuttle/cas_plane.dm
@@ -149,6 +149,8 @@
///What state our plane is in, i.e can we launch/do we have to deploy stairs etc
var/state = PLANE_STATE_DEACTIVATED
+ ///Direction we will use for attacks while in combat mode
+ var/attackdir = NORTH
///List of engine tiles so we can track them for overlays
var/list/engines = list()
///Chair that handles all the ui and click stuff
@@ -319,7 +321,7 @@
if(!COOLDOWN_CHECK(active_weapon, last_fired))
to_chat(source, "[active_weapon] just fired, wait for it to cool down.")
return
- active_weapon.open_fire(target)
+ active_weapon.open_fire(target, attackdir)
/obj/structure/caspart/caschair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
@@ -342,6 +344,7 @@
.["fuel_left"] = fuel_left
.["fuel_max"] = fuel_max
.["ship_status"] = getStatusText()
+ .["attackdir"] = uppertext(dir2text(attackdir))
var/element_nbr = 1
.["all_weapons"] = list()
for(var/i in equipments)
@@ -411,6 +414,9 @@
owner.turn_on_engines()
if(PLANE_STATE_PREPARED)
owner.turn_off_engines()
+ if("cycle_attackdir")
+ owner.attackdir = turn(owner.attackdir, 90)
+ . = TRUE
diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm
index bfcb6f64d0bf4..e4f0acfb95258 100644
--- a/code/modules/vehicles/cargo_train.dm
+++ b/code/modules/vehicles/cargo_train.dm
@@ -117,7 +117,7 @@
return FALSE
if(is_train_head())
- if(direction == reverse_direction(dir) && tow)
+ if(direction == REVERSE_DIR(dir) && tow)
return 0
return ..()
diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm
index 549f6689a8469..50303db0e6b81 100644
--- a/code/modules/vehicles/train.dm
+++ b/code/modules/vehicles/train.dm
@@ -146,7 +146,7 @@
if(dir == T_dir) //if car is ahead
src.attach_to(T, user, silent)
- else if(reverse_direction(dir) == T_dir) //else if car is behind
+ else if(REVERSE_DIR(dir) == T_dir) //else if car is behind
T.attach_to(src, user, silent)
//returns true if this is the lead car of the train
diff --git a/icons/Marine/mainship_props.dmi b/icons/Marine/mainship_props.dmi
index 7aa2c83670d5f..ccec5fe94e9de 100644
Binary files a/icons/Marine/mainship_props.dmi and b/icons/Marine/mainship_props.dmi differ
diff --git a/icons/effects/heavyimpact.dmi b/icons/effects/heavyimpact.dmi
new file mode 100644
index 0000000000000..dedaca533ac5c
Binary files /dev/null and b/icons/effects/heavyimpact.dmi differ
diff --git a/sound/effects/casplane_flyby.ogg b/sound/effects/casplane_flyby.ogg
new file mode 100644
index 0000000000000..2a0874eb4f973
Binary files /dev/null and b/sound/effects/casplane_flyby.ogg differ
diff --git a/tgmc.dme b/tgmc.dme
index bf5f046ca0915..d83b324c97484 100644
--- a/tgmc.dme
+++ b/tgmc.dme
@@ -110,7 +110,6 @@
#include "code\__HELPERS\level_traits.dm"
#include "code\__HELPERS\matrices.dm"
#include "code\__HELPERS\mobs.dm"
-#include "code\__HELPERS\movable.dm"
#include "code\__HELPERS\patterns.dm"
#include "code\__HELPERS\pencode.dm"
#include "code\__HELPERS\pronouns.dm"
diff --git a/tgui/packages/tgui/interfaces/MarineCasship.js b/tgui/packages/tgui/interfaces/MarineCasship.js
index 9f0b7f7b51eb2..e491a33887f96 100644
--- a/tgui/packages/tgui/interfaces/MarineCasship.js
+++ b/tgui/packages/tgui/interfaces/MarineCasship.js
@@ -151,6 +151,13 @@ const NormalOperation = (props, context) => {
onClick={() => act("deploy")}
disabled={data.plane_state !== 3} />
+
+
);
diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js
index ea10bf915e811..838d8e565a7a7 100644
--- a/tgui/packages/tgui/public/tgui.bundle.js
+++ b/tgui/packages/tgui/public/tgui.bundle.js
@@ -2,4 +2,4 @@
/*! (C) WebReflection Mit Style License */
if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=Object.defineProperties||function(t,n){for(var o in n)if(u.call(n,o))try{i(t,o,n[o])}catch(r){e.console}},c=Object.getOwnPropertyDescriptor,u=Object.prototype.hasOwnProperty,l=e.Element.prototype,s=e.Text.prototype,d=/^[a-z]+$/,f=/loaded|complete/,p={},h=document.createElement("div"),m=document.documentElement,v=m.removeAttribute,g=m.setAttribute,C=function(e){return{enumerable:!0,writable:!0,configurable:!0,value:e}};_(e.HTMLCommentElement.prototype,l,"nodeValue"),_(e.HTMLScriptElement.prototype,null,"text"),_(s,null,"nodeValue"),_(e.HTMLTitleElement.prototype,null,"text"),i(e.HTMLStyleElement.prototype,"textContent",(t=c(e.CSSStyleSheet.prototype,"cssText"),V((function(){return t.get.call(this.styleSheet)}),(function(e){t.set.call(this.styleSheet,e)}))));var y=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;i(e.CSSStyleDeclaration.prototype,"opacity",{get:function(){var e=this.filter.match(y);return e?(e[1]/100).toString():""},set:function(e){this.zoom=1;var t=!1;e=e<1?" alpha(opacity="+Math.round(100*e)+")":"",this.filter=this.filter.replace(y,(function(){return t=!0,e})),!t&&e&&(this.filter+=e)}}),a(l,{textContent:{get:x,set:B},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;t3?c(a):null,y=String(a.key),b=String(a.char),N=a.location,V=a.keyCode||(a.keyCode=y)&&y.charCodeAt(0)||0,_=a.charCode||(a.charCode=b)&&b.charCodeAt(0)||0,w=a.bubbles,x=a.cancelable,S=a.repeat,k=a.locale,E=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in f)f.initKeyEvent(t,w,x,E,p,m,h,v,V,_);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,i){o=i,n=!1,e=undefined,t.dispatchEvent(r)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.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 i(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,i,a=e.CustomEvent,c=e.dispatchEvent,u=e.addEventListener,l=e.removeEventListener,s=0,d=function(){s++},f=[].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{u("_",d,{once:!0}),c(new a("_")),c(new a("_")),l("_",d,{once:!0})}catch(h){}1!==s&&(i=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,a){if(a&&"boolean"!=typeof a){var c,u,l,s=i.get(this),d=p(a);s||i.set(this,s=new n),t in s||(s[t]={handler:[],wrap:[]}),u=s[t],(c=f.call(u.handler,r))<0?(c=u.handler.push(r)-1,u.wrap[c]=l=new n):l=u.wrap[c],d in l||(l[d]=o(t,r,a),e.call(this,t,l[d],l[d].capture))}else e.call(this,t,r,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,a,c,u,l=i.get(this);if(l&&t in l&&(c=l[t],-1<(a=f.call(c.handler,n))&&(r=p(o))in(u=c.wrap[a]))){for(r in e.call(this,t,u[r],u[r].capture),delete u[r],u)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete l[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){"use strict";(function(e){
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
-var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var l=a.styleSheets;if(r)for(var s in r)r.hasOwnProperty(s)&&c.setAttribute(s,r[s]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var d=function h(e){for(var t=c.href,n=l.length;n--;)if(l[n].href===t)return e();setTimeout((function(){h(e)}))};function f(){c.addEventListener&&c.removeEventListener("load",f),c.media=o||"all"}return c.addEventListener&&c.addEventListener("load",f),c.onloadcssdefined=d,d(f),c}}).call(this,n(124))},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=t.vecCreate=void 0;var o=n(55);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),a=1;a1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(1),r=n(12),i=n(409),a=n(23),c=n(56),u=n(16);function l(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=(0,c.createLogger)("ByondUi"),d=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),v=this.state.viewBox,g=function(e,t,n,o){if(0===e.length)return[];var i=(0,r.zipWith)(Math.min).apply(void 0,e),a=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),o!==undefined&&(i[1]=o[0],a[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,i,a,t)}))(e)}(i,v,a,u);if(g.length>0){var C=g[0],y=g[g.length-1];g.push([v[0]+h,y[1]]),g.push([v[0]+h,-h]),g.push([-h,-h]),g.push([-h,C[1]])}var b=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,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},d,{children:l}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:a})]})},a}(o.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(1),r=n(12),i=n(16),a=n(121);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t,n;function u(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=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},l.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)},l.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},l.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},l.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,l=t.over,s=t.noscroll,d=t.nochevron,f=t.width,p=(t.onClick,t.selected,t.disabled),h=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),m=h.className,v=c(h,["className"]),g=l?!this.state.open:this.state.open,C=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([s?"Dropdown__menu-noscroll":"Dropdown__menu",l&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:f}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({width:f,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",m])},v,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!d||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,a.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),C],0)},u}(o.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(1),r=n(122),i=n(12);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.children,n=a(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=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(1),r=n(12),i=n(16);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){return(0,r.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){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,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),i&&i(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=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e))},l.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,i=this.inputRef.current;i&&!n&&o!==r&&(i.value=c(r))},l.setEditing=function(e){this.setState({editing:e})},l.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder"]),u=c.className,l=c.fluid,s=a(c,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Input",l&&"Input--fluid",u])},s,{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)]})))},u}(o.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(1),r=n(44),i=n(12),a=n(23),c=n(16),u=n(167),l=n(123);t.Knob=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,h=e.step,m=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,C=e.value,y=e.className,b=e.style,N=e.fillValue,V=e.color,_=e.ranges,w=void 0===_?{}:_,x=e.size,S=e.bipolar,k=(e.children,function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:h,stepPixelSize:m,suppressFlicker:v,unit:g,value:C},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=(0,r.scale)(null!=N?N:a,d,s),h=(0,r.scale)(a,d,s),m=V||(0,r.keyOfMatchingRange)(null!=N?N:n,w)||"default",v=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+m,S&&"Knob--bipolar",y,(0,c.computeBoxClassName)(k)]),[(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("+v+"deg)"}}),2),t&&(0,o.createVNode)(1,"div","Knob__popupValue",u,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":((S?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),l],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":x+"rem"},b)},k)),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(1),r=n(12),i=n(16),a=n(164);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children"]);return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,l=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","color","info","warning","success","danger"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},l)))};t.NoticeBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var o=n(1),r=n(44),i=n(12),a=n(16);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,l=e.maxValue,s=void 0===l?1:l,d=e.color,f=e.ranges,p=void 0===f?{}:f,h=e.children,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","value","minValue","maxValue","color","ranges","children"]),v=(0,r.scale)(n,u,s),g=h!==undefined,C=d||(0,r.keyOfMatchingRange)(n,p)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+C,t,(0,a.computeBoxClassName)(m)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(v)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",g?h:(0,r.toFixed)(100*v)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(m))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,l=e.content,s=e.children,d=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","content","children"]),f=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(u),p=!(0,r.isFalsy)(l)||!(0,r.isFalsy)(s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+c,t])},d,{children:[f&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",u,0)],4),p&&(0,o.createVNode)(1,"div","Section__content",[l,s],0)]})))};t.Section=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(1),r=n(44),i=n(12),a=n(23),c=n(16),u=n(167),l=n(123);t.Slider=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,h=e.step,m=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,C=e.value,y=e.className,b=e.fillValue,N=e.color,V=e.ranges,_=void 0===V?{}:V,w=e.children,x=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),S=w!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:h,stepPixelSize:m,suppressFlicker:v,unit:g,value:C},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=b!==undefined&&null!==b,h=((0,r.scale)(n,d,s),(0,r.scale)(null!=b?b:a,d,s)),m=(0,r.scale)(a,d,s),v=N||(0,r.keyOfMatchingRange)(null!=b?b:n,_)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+v,y,(0,c.computeBoxClassName)(x)]),[(0,o.createVNode)(1,"div",(0,i.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,m))+"%"}}),(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",u,0)],0,{style:{width:100*(0,r.clamp01)(m)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",S?w:u,0),l],0,Object.assign({},(0,c.computeBoxProps)(x),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(1),r=n(12),i=n(16),a=n(120);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=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,i.computeBoxClassName)(u)]),(0,o.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){var o={"./Apc.js":424,"./CAS.js":426,"./CameraConsole.js":427,"./Cargo.js":169,"./CargoRequest.js":428,"./CentcomPodLauncher.js":429,"./ChemDispenser.js":430,"./ChemMaster.js":431,"./Crew.js":432,"./Cryo.js":433,"./Droppod.js":435,"./DroppodControl.js":436,"./EscapePod.js":437,"./HiveEvolveScreen.js":438,"./IntelComputer.js":439,"./MarineCasship.js":440,"./MarineDropship.js":441,"./MarineSelector.js":442,"./Mortar.js":443,"./Orbit.js":444,"./PodLauncher.js":445,"./PortableGenerator.js":446,"./PortableVendor.js":447,"./SelfDestruct.js":448,"./Sentry.js":449,"./ShuttleManipulator.js":450,"./SmartVend.js":451,"./Smes.js":452,"./Vending.js":454,"./Wires.js":455};function r(e){var t=i(e);return n(t)}function i(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=i,e.exports=r,r.id=423},function(e,t,n){"use strict";t.__esModule=!0,t.Apc=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(425);t.Apc=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var u={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"}},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.locked&&!l.siliconUser,d=u[l.externalPower]||u[0],f=u[l.chargingStatus]||u[0],p=l.powerChannels||[],h=l.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main Breaker",color:d.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!s,disabled:s,onClick:function(){return a("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",value:h})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",color:f.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.chargeMode?"sync":"close",content:l.chargeMode?"Auto":"Off",disabled:s,onClick:function(){return a("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[p.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return a("channel",t.auto)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return a("channel",t.on)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return a("channel",t.off)}})],4),children:e.powerLoad},e.title)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,l.totalLoad,0)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Misc",buttons:!!l.siliconUser&&(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return a("overload")}}),children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){return a("cover")}})})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(1),r=n(4),i=n(5);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=e.siliconUser,l=void 0===u?c.siliconUser:u,s=e.locked,d=void 0===s?c.locked:s,f=e.onLockStatusChange,p=void 0===f?function(){return a("lock")}:f,h=e.accessText,m=void 0===h?"an ID card":h;return l?(0,o.createComponentVNode)(2,i.NoticeBox,{color:l&&"grey",children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{m:0,color:d?"red":"green",icon:d?"lock":"unlock",content:d?"Locked":"Unlocked",onClick:function(){p&&p(!d)}})})]})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe ",m," ","to ",d?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CAS=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.CAS=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[0===i.screen_mode&&(0,o.createComponentVNode)(2,c),1===i.screen_mode&&(0,o.createComponentVNode)(2,u)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Equipment Installed",children:c.equipment_data.length>0?c.equipment_data.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("equip_interact",{equip_interact:e.eqp_tag})},disabled:!e.is_interactable,children:e.name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No equipment installed."})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Weapon Selected: "+c.selected_eqp,buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("deselect")},children:"Deselect"}),children:c.selected_eqp_ammo_name?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo loaded",children:c.selected_eqp_ammo_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo count",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:c.selected_eqp_ammo_amt/c.selected_eqp_max_ammo_amt,content:c.selected_eqp_ammo_amt+" / "+c.selected_eqp_max_ammo_amt})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No ammo loaded"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Available Targets",children:c.targets_data.length>0?c.targets_data.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!c.shuttle_mode,onClick:function(){return a("open_fire",{open_fire:e.target_tag})},children:e.target_name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No laser targets detected."})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleContent=t.CameraConsole=void 0;var o=n(1),r=n(55),i=n(116),a=n(12),c=n(57),u=n(4),l=n(5),s=n(7),d=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){var n=(0,u.useBackend)(t),r=n.act,i=n.data,a=n.config,c=i.mapRef,p=i.activeCamera,h=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]}(d(i.cameras),p),m=h[0],v=h[1];return(0,o.createComponentVNode)(2,s.Window,{resizable:!0,children:[(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,f)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),p&&p.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,l.Button,{icon:"chevron-left",disabled:!m,onClick:function(){return r("switch_camera",{name:m})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"chevron-right",disabled:!v,onClick:function(){return r("switch_camera",{name:v})}})],4),(0,o.createComponentVNode)(2,l.ByondUi,{className:"CameraConsole__map",params:{id:c,parent:a.window,type:"map"}})],4)]})};var f=function(e,t){var n=(0,u.useBackend)(t),r=n.act,i=n.data,c=(0,u.useLocalState)(t,"searchText",""),f=c[0],p=c[1],h=i.activeCamera,m=d(i.cameras,f);return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,l.Section,{children:m.map((function(e){return(0,o.createVNode)(1,"div",(0,a.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",h&&e.name===h.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,s.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)};t.CameraConsoleContent=f},function(e,t,n){"use strict";t.__esModule=!0,t.CargoRequest=void 0;var o=n(169);t.CargoRequest=o.CargoRequest},function(e,t,n){"use strict";t.__esModule=!0,t.CentcomPodLauncher=void 0;var o=n(1),r=(n(57),n(4)),i=n(5),a=n(7);t.CentcomPodLauncher=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:"To use this, simply spawn the atoms you want in one of the five Centcom Supplypod Bays. Items in the bay will then be launched inside your supplypod, one turf-full at a time! You can optionally use the following buttons to configure how the supplypod acts."}),(0,o.createComponentVNode)(2,i.Section,{title:"Centcom Pod Customization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Supply Bay",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Bay #1",selected:1===u.bayNumber,onClick:function(){return c("bay1")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #2",selected:2===u.bayNumber,onClick:function(){return c("bay2")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #3",selected:3===u.bayNumber,onClick:function(){return c("bay3")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #4",selected:4===u.bayNumber,onClick:function(){return c("bay4")}}),(0,o.createComponentVNode)(2,i.Button,{content:"ERT Bay",selected:5===u.bayNumber,tooltip:"This bay is located on the western edge of CentCom. Its the\nglass room directly west of where ERT spawn, and south of the\nCentCom ferry. Useful for launching ERT/Deathsquads/etc. onto\nthe station via drop pods.",onClick:function(){return c("bay5")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Teleport to",children:[(0,o.createComponentVNode)(2,i.Button,{content:u.bay,onClick:function(){return c("teleportCentcom")}}),(0,o.createComponentVNode)(2,i.Button,{content:u.oldArea?u.oldArea:"Where you were",disabled:!u.oldArea,onClick:function(){return c("teleportBack")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Clone Mode",children:(0,o.createComponentVNode)(2,i.Button,{content:"Launch Clones",selected:u.launchClone,tooltip:"Choosing this will create a duplicate of the item to be\nlaunched in Centcom, allowing you to send one type of item\nmultiple times. Either way, the atoms are forceMoved into\nthe supplypod after it lands (but before it opens).",onClick:function(){return c("launchClone")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Launch style",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Ordered",selected:1===u.launchChoice,tooltip:'Instead of launching everything in the bay at once, this\nwill "scan" things (one turf-full at a time) in order, left\nto right and top to bottom. undoing will reset the "scanner"\nto the top-leftmost position.',onClick:function(){return c("launchOrdered")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Random",selected:2===u.launchChoice,tooltip:"Instead of launching everything in the bay at once, this\nwill launch one random turf of items at a time.",onClick:function(){return c("launchRandom")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Explosion",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Size",selected:1===u.explosionChoice,tooltip:"This will cause an explosion of whatever size you like\n(including flame range) to occur as soon as the supplypod\nlands. Dont worry, supply-pods are explosion-proof!",onClick:function(){return c("explosionCustom")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Adminbus",selected:2===u.explosionChoice,tooltip:"This will cause a maxcap explosion (dependent on server\nconfig) to occur as soon as the supplypod lands. Dont worry,\nsupply-pods are explosion-proof!",onClick:function(){return c("explosionBus")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Damage",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Damage",selected:1===u.damageChoice,tooltip:"Anyone caught under the pod when it lands will be dealt\nthis amount of brute damage. Sucks to be them!",onClick:function(){return c("damageCustom")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Gib",selected:2===u.damageChoice,tooltip:"This will attempt to gib any mob caught under the pod when\nit lands, as well as dealing a nice 5000 brute damage. Ya\nknow, just to be sure!",onClick:function(){return c("damageGib")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Effects",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Stun",selected:u.effectStun,tooltip:"Anyone who is on the turf when the supplypod is launched\nwill be stunned until the supplypod lands. They cant get\naway that easy!",onClick:function(){return c("effectStun")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Delimb",selected:u.effectLimb,tooltip:"This will cause anyone caught under the pod to lose a limb,\nexcluding their head.",onClick:function(){return c("effectLimb")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Yeet Organs",selected:u.effectOrgans,tooltip:"This will cause anyone caught under the pod to lose all\ntheir limbs and organs in a spectacular fashion.",onClick:function(){return c("effectOrgans")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Movement",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Bluespace",selected:u.effectBluespace,tooltip:"Gives the supplypod an advanced Bluespace Recyling Device.\nAfter opening, the supplypod will be warped directly to the\nsurface of a nearby NT-designated trash planet (/r/ss13).",onClick:function(){return c("effectBluespace")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Stealth",selected:u.effectStealth,tooltip:'This hides the red target icon from appearing when you\nlaunch the supplypod. Combos well with the "Invisible"\nstyle. Sneak attack, go!',onClick:function(){return c("effectStealth")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Quiet",selected:u.effectQuiet,tooltip:"This will keep the supplypod from making any sounds, except\nfor those specifically set by admins in the Sound section.",onClick:function(){return c("effectQuiet")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reverse Mode",selected:u.effectReverse,tooltip:"This pod will not send any items. Instead, after landing,\nthe supplypod will close (similar to a normal closet closing),\nand then launch back to the right centcom bay to drop off any\nnew contents.",onClick:function(){return c("effectReverse")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Missile Mode",selected:u.effectMissile,tooltip:"This pod will not send any items. Instead, it will immediately\ndelete after landing (Similar visually to setting openDelay\n& departDelay to 0, but this looks nicer). Useful if you just\nwanna fuck some shit up. Combos well with the Missile style.",onClick:function(){return c("effectMissile")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Any Descent Angle",selected:u.effectCircle,tooltip:"This will make the supplypod come in from any angle. Im not\nsure why this feature exists, but here it is.",onClick:function(){return c("effectCircle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Machine Gun Mode",selected:u.effectBurst,tooltip:"This will make each click launch 5 supplypods inaccuratly\naround the target turf (a 3x3 area). Combos well with the\nMissile Mode if you dont want shit lying everywhere after.",onClick:function(){return c("effectBurst")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Specific Target",selected:u.effectTarget,tooltip:"This will make the supplypod target a specific atom, instead\nof the mouses position. Smiting does this automatically!",onClick:function(){return c("effectTarget")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name/Desc",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Name/Desc",selected:u.effectName,tooltip:"Allows you to add a custom name and description.",onClick:function(){return c("effectName")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Alert Ghosts",selected:u.effectAnnounce,tooltip:"Alerts ghosts when a pod is launched. Useful if some dumb\nshit is aboutta come outta the pod.",onClick:function(){return c("effectAnnounce")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sound",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Falling Sound",selected:u.fallingSound,tooltip:"Choose a sound to play as the pod falls. Note that for this\nto work right you should know the exact length of the sound,\nin seconds.",onClick:function(){return c("fallSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Landing Sound",selected:u.landingSound,tooltip:"Choose a sound to play when the pod lands.",onClick:function(){return c("landingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Opening Sound",selected:u.openingSound,tooltip:"Choose a sound to play when the pod opens.",onClick:function(){return c("openingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Leaving Sound",selected:u.leavingSound,tooltip:"Choose a sound to play when the pod departs (whether that be\ndelection in the case of a bluespace pod, or leaving for\ncentcom for a reversing pod).",onClick:function(){return c("leavingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Admin Sound Volume",selected:u.soundVolume,tooltip:"Choose the volume for the sound to play at. Default values\nare between 1 and 100, but hey, do whatever. Im a tooltip,\nnot a cop.",onClick:function(){return c("soundVolume")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timers",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Falling Duration",selected:4!==u.fallDuration,tooltip:"Set how long the animation for the pod falling lasts. Create\ndramatic, slow falling pods!",onClick:function(){return c("fallDuration")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Landing Time",selected:20!==u.landingDelay,tooltip:"Choose the amount of time it takes for the supplypod to hit\nthe station. By default this value is 0.5 seconds.",onClick:function(){return c("landingDelay")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Opening Time",selected:30!==u.openingDelay,tooltip:"Choose the amount of time it takes for the supplypod to open\nafter landing. Useful for giving whatevers inside the pod a\nnice dramatic entrance! By default this value is 3 seconds.",onClick:function(){return c("openingDelay")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Leaving Time",selected:30!==u.departureDelay,tooltip:"Choose the amount of time it takes for the supplypod to leave\nafter landing. By default this value is 3 seconds.",onClick:function(){return c("departureDelay")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Style",children:u.styles.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e[1],selected:u.styleChoice===e[3],tooltip:e[2],onClick:function(){return c("setstyle",{style:e[0]})}},e.id)}))})]})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u.numObjects+" turfs in "+u.bay,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"undo Pody Bay",tooltip:"Manually undoes the possible things to launch in the\npod bay.",onClick:function(){return c("undo")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Enter Launch Mode",selected:u.giveLauncher,tooltip:"THE CODEX ASTARTES CALLS THIS MANEUVER: STEEL RAIN",onClick:function(){return c("giveLauncher")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Selected Bay",color:"bad",tooltip:"This will delete all objs and mobs from the selected bay.",tooltipPosition:"left",onClick:function(){return c("clearBay")}})],4)})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(1),r=n(44),i=n(57),a=n(4),c=n(5),u=n(7);t.ChemDispenser=function(e,t){var n=(0,a.useBackend)(t),l=n.act,s=n.data,d=!!s.recordingRecipe,f=Object.keys(s.recipes).map((function(e){return{name:e,contents:s.recipes[e]}})),p=s.beakerTransferAmounts||[],h=d&&Object.keys(s.recordingRecipe).map((function(e){return{id:e,name:(0,i.toTitleCase)(e.replace(/_/," ")),volume:s.recordingRecipe[e]}}))||s.beakerContents||[];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:d&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,color:"red",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"circle",mr:1}),"Recording"]}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:s.energy/s.maxEnergy,children:(0,r.toFixed)(s.energy)+" units"})})})}),(0,o.createComponentVNode)(2,c.Section,{title:"Recipes",buttons:(0,o.createFragment)([!d&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:"Clear recipes",onClick:function(){return l("clear_recipes")}})}),!d&&(0,o.createComponentVNode)(2,c.Button,{icon:"circle",disabled:!s.isBeakerLoaded,content:"Record",onClick:function(){return l("record_recipe")}}),d&&(0,o.createComponentVNode)(2,c.Button,{icon:"ban",color:"transparent",content:"Discard",onClick:function(){return l("cancel_recording")}}),d&&(0,o.createComponentVNode)(2,c.Button,{icon:"save",color:"green",content:"Save",onClick:function(){return l("save_recording")}})],0),children:(0,o.createComponentVNode)(2,c.Box,{mr:-1,children:[f.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",width:"129.5px",lineHeight:"21px",content:e.name,onClick:function(){return l("dispense_recipe",{recipe:e.name})}},e.name)})),0===f.length&&(0,o.createComponentVNode)(2,c.Box,{color:"light-gray",children:"No recipes."})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Dispense",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"plus",selected:e===s.amount,content:e,onClick:function(){return l("amount",{target:e})}},e)})),children:(0,o.createComponentVNode)(2,c.Box,{mr:-1,children:s.chemicals.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",width:"129.5px",lineHeight:"21px",content:e.title,onClick:function(){return l("dispense",{reagent:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"minus",disabled:d,content:e,onClick:function(){return l("remove",{amount:e})}},e)})),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Beaker",buttons:!!s.isBeakerLoaded&&(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",disabled:!s.isBeakerLoaded,onClick:function(){return l("eject")}}),children:(d?"Virtual beaker":s.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.AnimatedNumber,{initial:0,value:s.beakerCurrentVolume}),(0,o.createTextVNode)("/"),s.beakerMaxVolume,(0,o.createTextVNode)(" units")],0))||"No beaker"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contents",children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",children:s.isBeakerLoaded||d?0===h.length&&"Nothing":"N/A"}),h.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{initial:0,value:e.volume})," ","units of ",e.name]},e.name)}))]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data.screen;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:"analyze"===n&&(0,o.createComponentVNode)(2,f)||(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.screen,p=c.beakerContents,h=void 0===p?[]:p,m=c.bufferContents,v=void 0===m?[]:m,g=c.beakerCurrentVolume,C=c.beakerMaxVolume,y=c.isBeakerLoaded,b=c.isPillBottleLoaded,N=c.pillBottleCurrentAmount,V=c.pillBottleMaxAmount;return"analyze"===s?(0,o.createComponentVNode)(2,f):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:!!c.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:g,initial:0})," / "+C+" units"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return a("eject")}})],4),children:[!y&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"No beaker loaded."}),!!y&&0===h.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"Beaker is empty."}),(0,o.createComponentVNode)(2,u,{children:h.map((function(e){return(0,o.createComponentVNode)(2,l,{chemical:e,transferTo:"buffer"},e.id)}))})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Buffer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:1,children:"Mode:"}),(0,o.createComponentVNode)(2,i.Button,{color:c.mode?"good":"bad",icon:c.mode?"exchange-alt":"times",content:c.mode?"Transfer":"Destroy",onClick:function(){return a("toggleMode")}})],4),children:[0===v.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"Buffer is empty."}),(0,o.createComponentVNode)(2,u,{children:v.map((function(e){return(0,o.createComponentVNode)(2,l,{chemical:e,transferTo:"beaker"},e.id)}))})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Packaging",children:(0,o.createComponentVNode)(2,d)}),!!b&&(0,o.createComponentVNode)(2,i.Section,{title:"Pill Bottle",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[N," / ",V," pills"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return a("ejectPillBottle")}})],4)})],0)},u=i.Table,l=function(e,t){var n=(0,r.useBackend)(t).act,a=e.chemical,c=e.transferTo;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{color:"label",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:a.volume,initial:0})," units of "+a.name]}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,i.Button,{content:"1",onClick:function(){return n("transfer",{id:a.id,amount:1,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"5",onClick:function(){return n("transfer",{id:a.id,amount:5,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"10",onClick:function(){return n("transfer",{id:a.id,amount:10,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"All",onClick:function(){return n("transfer",{id:a.id,amount:1e3,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"ellipsis-h",title:"Custom amount",onClick:function(){return n("transfer",{id:a.id,amount:-1,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"question",title:"Analyze",onClick:function(){return n("analyze",{id:a.id})}})]})]},a.id)},s=function(e){var t=e.label,n=e.amountUnit,r=e.amount,a=e.onChangeAmount,c=e.onCreate,u=e.sideNote;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:[(0,o.createComponentVNode)(2,i.NumberInput,{width:"84px",unit:n,step:1,stepPixelSize:15,value:r,minValue:1,maxValue:10,onChange:a}),(0,o.createComponentVNode)(2,i.Button,{ml:1,content:"Create",onClick:c}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,color:"label",children:u})]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=(0,r.useSharedState)(t,"pillAmount",1),l=u[0],d=u[1],f=(0,r.useSharedState)(t,"patchAmount",1),p=f[0],h=f[1],m=(0,r.useSharedState)(t,"bottleAmount",1),v=m[0],g=m[1],C=(0,r.useSharedState)(t,"packAmount",1),y=C[0],b=C[1],N=c.condi,V=c.chosenPillStyle,_=c.pillStyles,w=void 0===_?[]:_;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[!N&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pill type",children:w.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{width:"30px",selected:e.id===V,textAlign:"center",color:"transparent",onClick:function(){return a("pillStyle",{id:e.id})},children:(0,o.createComponentVNode)(2,i.Box,{mx:-1,className:e.className})},e.id)}))}),!N&&(0,o.createComponentVNode)(2,s,{label:"Pills",amount:l,amountUnit:"pills",sideNote:"max 50u",onChangeAmount:function(e,t){return d(t)},onCreate:function(){return a("create",{type:"pill",amount:l,volume:"auto"})}}),!N&&(0,o.createComponentVNode)(2,s,{label:"Patches",amount:p,amountUnit:"patches",sideNote:"max 40u",onChangeAmount:function(e,t){return h(t)},onCreate:function(){return a("create",{type:"patch",amount:p,volume:"auto"})}}),!N&&(0,o.createComponentVNode)(2,s,{label:"Bottles",amount:v,amountUnit:"bottles",sideNote:"max 30u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return a("create",{type:"bottle",amount:v,volume:"auto"})}}),!!N&&(0,o.createComponentVNode)(2,s,{label:"Packs",amount:y,amountUnit:"packs",sideNote:"max 10u",onChangeAmount:function(e,t){return b(t)},onCreate:function(){return a("create",{type:"condimentPack",amount:y,volume:"auto"})}}),!!N&&(0,o.createComponentVNode)(2,s,{label:"Bottles",amount:v,amountUnit:"bottles",sideNote:"max 50u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return a("create",{type:"condimentBottle",amount:v,volume:"auto"})}})]})},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.analyzeVars;return(0,o.createComponentVNode)(2,i.Section,{title:"Analysis Results",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return a("goScreen",{screen:"home"})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:c.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State",children:c.state}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,i.ColorBox,{color:c.color,mr:1}),c.color]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:c.description}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metabolization Rate",children:[c.metaRate," u/minute"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Overdose Threshold",children:c.overD}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Addiction Threshold",children:c.addicD})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Crew=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Crew=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Location to scan",children:[{label:"Ship",zlevel:"0"},{label:"Planet",zlevel:"1"},{label:"Low Orbit",zlevel:"2"}].map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:e.zlevel===u.zlevel,onClick:function(){return c("zlevel",{zlevel:e.zlevel})},children:e.label},e.id)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Found signals",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[{label:"Name",sortkey:"name",icon:"user-alt"},{label:"Rank",sortkey:"rank",icon:"tag"},{label:"Status",sortkey:"status",icon:"heartbeat"},{label:"Area",sortkey:"area",icon:"map-marker-alt"}].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:e.icon,onClick:function(){return c("sortkey",{sortkey:e.sortkey})},children:e.label})},e.id)}))}),u.crewmembers.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.rank}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:0===e.status?"good":1===e.status?"average":"bad",children:0===e.status?"Living":1===e.status?"Unconscious":"Deceased"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[1===e.sensor_type&&"Not Available",2===e.sensor_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"cyan",children:e.oxy}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"green",children:e.tox}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"orange",children:e.fire}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"red",children:e.brute})],4)]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:3===e.sensor_type?e.area+" "+e.x+", "+e.y:"Not Available"})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(1),r=n(4),i=n(5),a=n(434),c=n(7),u=[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}];t.Cryo=function(){return(0,o.createComponentVNode)(2,c.Window,{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=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Occupant",children:l.occupant.name||"No Occupant"}),!!l.hasOccupant&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State",color:l.occupant.statstate,children:l.occupant.stat}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",color:l.occupant.temperaturestatus,children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant.bodyTemperature})," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:l.occupant.health/l.occupant.maxHealth,color:l.occupant.health>0?"good":"average",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant.health})})}),u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:l.occupant[e.type]/100,children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant[e.type]})})},e.id)}))],0)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Cell",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.isOperating?"power-off":"times",disabled:l.isOpen,onClick:function(){return c("power")},color:l.isOperating&&"green",children:l.isOperating?"On":"Off"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.cellTemperature})," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!l.hasOccupant,onClick:function(){return c("eject")},content:"eject patient"}),(0,o.createComponentVNode)(2,i.Button,{icon:l.autoEject?"sign-out-alt":"sign-in-alt",onClick:function(){return c("autoeject")},content:l.autoEject?"Auto":"Manual"})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!l.isBeakerLoaded,onClick:function(){return c("ejectbeaker")},content:"Eject"}),children:(0,o.createComponentVNode)(2,a.BeakerContents,{beakerLoaded:l.isBeakerLoaded,beakerContents:l.beakerContents})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(1),r=n(5);t.BeakerContents=function(e){var t=e.beakerLoaded,n=e.beakerContents;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===n.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),n.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{color:"label",children:[e.volume," units of ",e.name]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Droppod=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(70);t.Droppod=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:1===n.drop_state?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,i.NoticeBox,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"DROP ACTIVE"}),(0,o.createComponentVNode)(2,i.Box,{children:"DEPLOYMENT UNDERWAY"})]})})})};var u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,u=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Welcome, "+u.occupant,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"X Coordinate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:u.target_x,onChange:function(e,t){return a("set_x_target",{set_x:""+t})}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Y Coordinate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:u.target_y,onChange:function(e,t){return a("set_y_target",{set_y:""+t})}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Check drop validity",children:(0,o.createComponentVNode)(2,i.Button,{content:"Check drop point validity",color:"blue",onClick:function(){return a("check_droppoint")}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Launching",children:(0,o.createComponentVNode)(2,i.Button,{content:"LAUNCH DROPPOD",color:"red",onClick:function(){return a("launch")}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Exit Drop pod",children:(0,o.createComponentVNode)(2,i.Button,{content:"Exit Pod",color:"green",onClick:function(){return a("exitpod")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DroppodControl=void 0;var o=n(1),r=n(7),i=n(4),a=n(5);t.DroppodControl=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,r.Window,{children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Launch Control",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Relink current pods",color:"blue",onClick:function(){return c("relink")}}),(0,o.createComponentVNode)(2,a.Button,{content:"LAUNCH ALL PODS",color:"red",onClick:function(){return c("launchall")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[" ","Currently "+u.pods+" connected pods."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EscapePod=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.EscapePod=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Escape Pod",children:["Welcome to Nanotransens least luxurious survival pod! Have a pleasant stay!",(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{m:"50",content:"Launch evacuation pod",disabled:u.can_launch,color:"red",onClick:function(){return c("launch")}})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HiveEvolveScreen=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Evolution progress - "+e.current+"/"+e.max,height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/e.max})})},u=function(e){var t=["Rest","Regurgitate"],n=Object.values(e.abilites).filter((function(e){return-1===t.indexOf(e.name)}));Object.keys(e.abilites).slice(-1)[0];return(0,o.createComponentVNode)(2,i.Section,{title:e.name+" - Abilities",children:e.abilites?n.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:1,color:"transparent",tooltip:e.desc,tooltipPosition:"bottom",content:e.name},e.name)})):"This caste has no abilites"})};t.HiveEvolveScreen=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.name,f=s.evolution,p=s.abilities,h=s.evolves_to,m=s.can_evolve&&f.current>=f.max,v=["Shrike","Queen"],g=Object.values(h);return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Current Evolution",children:[(0,o.createComponentVNode)(2,u,{act:l,current:!0,name:d,abilites:p}),(0,o.createComponentVNode)(2,c,{current:f.current,max:f.max})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Available Evolutions",children:g.map((function(e,t){return(0,o.createComponentVNode)(2,i.Collapsible,{title:e.name+" (click for details)",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!m&&!v.includes(e.name),onClick:function(){return l("evolve",{path:e.type_path})},children:"Evolve"}),children:(0,o.createComponentVNode)(2,u,{name:e.name,abilites:e.abilities,canEvolve:m})},e.type_path)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.IntelComputercontent=t.IntelComputer=t.FakeTerminal=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);var c=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,i.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component);t.FakeTerminal=c;var u=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Running search.bat - "+e.current+"%",height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/100})})},l=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Running transmit.bat - "+e.current+"%",height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/100})})};t.IntelComputer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{theme:"syndicate",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,s)})})};var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,s=n.data;return s.logged_in?s.logged_in&&s.first_login?(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"525px",children:(0,o.createComponentVNode)(2,c,{allMessages:["WARNING UNREGISTERED USER...","Override detected...","ACCESS CONFIRMED...","Contacting central database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, welcome auth 'akjv9c88asdf12nb'...","Credentials accepted. Welcome, akjv9c88asdf12nb...","Installing OS from external drive...","Installing...","Installing...","Installing...","Installing...","Installation complete...","Connected to TGMC_Raptor_mainframe.mfg","Connection established"],finishedTimeout:3e3,onFinished:function(){return a("first_load")}})}):!s.logged_in||s.first_login||s.printing||s.printed?s.printing&&s.progress<=50?(0,o.createComponentVNode)(2,i.Section,{title:"EXECUTING F:/DATA_RETRIEVAL.exe",children:[(0,o.createComponentVNode)(2,u,{current:2*s.progress}),(0,o.createComponentVNode)(2,l,{current:0})]}):s.printing&&s.progress>=50?(0,o.createComponentVNode)(2,i.Section,{title:"EXECUTING F:/DATA_RETRIEVAL.exe",children:[(0,o.createComponentVNode)(2,u,{current:100}),(0,o.createComponentVNode)(2,l,{current:2*(s.progress-50)})]}):s.printed?(0,o.createComponentVNode)(2,i.Section,{title:"F:/DATA_RETRIEVAL.exe returns SUCCESS",children:[(0,o.createComponentVNode)(2,u,{current:100}),(0,o.createComponentVNode)(2,l,{current:100})]}):void 0:(0,o.createComponentVNode)(2,i.Section,{minHeight:"525px",children:(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"EXECUTE F:/DATA_RETRIEVAL.exe",color:"transparent",onClick:function(){return a("start_progressing")}})})}):(0,o.createComponentVNode)(2,i.Section,{minHeight:"525px",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{content:"LOGIN REGISTERED USER",color:"transparent",confirmContent:"Confirm Military Override?",onClick:function(){return a("login")}})}),!!s.error&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:s.error})]})};t.IntelComputercontent=s},function(e,t,n){"use strict";t.__esModule=!0,t.MarineCasship=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.MarineCasship=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{theme:"ntos",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:0===i.plane_state?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,u)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:c.ship_status}),(0,o.createComponentVNode)(2,i.Section,{title:"Engine Control",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Spool Engines",onClick:function(){return a("toggle_engines")},disabled:c.fuel_left<=0})}),(0,o.createComponentVNode)(2,i.Box,{content:"Fuel capacity:",width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Fuel level ",c.fuel_left/c.fuel_max*100,"%"]})})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:c.ship_status}),(0,o.createComponentVNode)(2,i.NoticeBox,{children:[c.active_lasers," Active Lasers Detected"]}),(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Fuel level"}),(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[-Infinity,.25]},value:c.fuel_left/c.fuel_max})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Weapons",children:c.all_weapons.length>0?c.all_weapons.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("change_weapon",{selection:e.eqp_tag})},disabled:e.eqp_tag===c.active_weapon_tag,children:e.name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No equipment installed."})}),c.active_weapon_name?(0,o.createComponentVNode)(2,i.Section,{title:"Weapon Selected: "+c.active_weapon_name,buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("deselect")},children:"Deselect"}),children:c.active_weapon_ammo_name?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo loaded",children:c.active_weapon_ammo_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo count",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:c.active_weapon_ammo/c.active_weapon_max_ammo,content:c.active_weapon_ammo+" / "+c.active_weapon_max_ammo})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No ammo loaded"})}):(0,o.createComponentVNode)(2,i.Section,{title:"No active equipment."}),(0,o.createComponentVNode)(2,i.Section,{title:"Piloting control",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Launch plane",onClick:function(){return a("launch")},disabled:3===c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Land plane",onClick:function(){return a("land")},disabled:3!==c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Disable Engines",onClick:function(){return a("toggle_engines")},disabled:2!==c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Begin Firemission",onClick:function(){return a("deploy")},disabled:3!==c.plane_state})})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.MarineDropship=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.MarineDropship=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:u.hijack_state?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,i.NoticeBox,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"POSSIBLE HIJACK"}),(0,o.createComponentVNode)(2,i.Box,{children:"SYSTEMS REBOOTING..."})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=[{label:"Left",name:"left",lockdown:c.left},{label:"Right",name:"right",lockdown:c.right},{label:"Rear",name:"rear",lockdown:c.rear}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:c.ship_status}),(0,o.createComponentVNode)(2,i.Section,{title:"Destinations",children:c.destinations.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("move",{move:e.id})},disabled:c.shuttle_mode,children:e.name})},e.id)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Door Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"All",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("lockdown")},disabled:2===c.lockdown,children:"Lockdown"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("release")},disabled:0===c.lockdown,children:"Release"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("lock",{lock:e.name})},disabled:2===e.lockdown,children:"Lockdown"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("unlock",{unlock:e.name})},disabled:0===e.lockdown,children:"Unlock"})]},e.id)}))]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.MarineSelector=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(70);t.MarineSelector=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=(0,r.useLocalState)(t,"showEmpty",0),s=l[0],d=l[1],f=(0,r.useLocalState)(t,"showDesc",null),p=f[0],h=f[1],m=c.current_m_points,v=c.total_marine_points,g=c.show_points,C=Object.keys(c.displayed_records).map((function(e){return Object.assign({},c.cats[e],{name:e,entries:c.displayed_records[e]})})).filter((function(e){return e.entries.length>0&&(s||e.remaining>0||!e.total&&!!m)}));return(0,o.createComponentVNode)(2,a.Window,{children:[!!p&&(0,o.createComponentVNode)(2,i.Modal,{width:"400px",children:[(0,o.createComponentVNode)(2,i.Box,{children:p}),(0,o.createComponentVNode)(2,i.Button,{content:"Dismiss",onClick:function(){return h(null)}})]}),(0,o.createVNode)(1,"div",null,[(0,o.createVNode)(1,"div","VendingWindow__header",(0,o.createComponentVNode)(2,i.Section,{title:"Choose your equipment",buttons:(0,o.createFragment)([!!g&&(0,o.createComponentVNode)(2,i.ProgressBar,{width:"100px",value:m/v,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]},children:m+"/"+v+" Points"}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"4px"}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,onClick:function(){return d(!s)},children:"Show Empty Categories"})],0)}),2),(0,o.createVNode)(1,"div","VendingWindow__content",(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:C.map((function(e){return(0,o.createComponentVNode)(2,u,{category:e},e.id)}))})}),2)],4)]})};var u=function(e,t){var n=e.category,r=n.entries,a=n.name,c=n.remaining,u=n.total,s=u&&!c;return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:!!u&&(0,o.createComponentVNode)(2,i.ProgressBar,{value:c/u,ranges:{good:[1,Infinity],average:[.1,1],bad:[-Infinity,.1]},children:c+"/"+u+" Choices"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:r.map((function(e){return(0,o.createComponentVNode)(2,l,{display_record:e,cant_buy:s},e.id)}))})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,u=n.data,l=(0,r.useLocalState)(t,"showDesc",null),s=(l[0],l[1]),d=u.current_m_points,f=e.display_record,p=f.id,h=f.prod_cost,m=f.prod_index,v=f.prod_color,g=f.prod_name,C=f.prod_desc,y=e.cant_buy;return(0,o.createComponentVNode)(2,c.LabeledListItem,{buttons:(0,o.createFragment)(["white"===v&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,children:"Essential!"}),"orange"===v&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,color:"orange",children:"Recommended"}),h>0&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"75px",mr:1,ml:1,children:[h," points"]}),(0,o.createComponentVNode)(2,i.Button,{disabled:y||h>d,onClick:function(){return a("vend",{vend:m})},selected:"white"===v,children:"Vend"})],0),label:g,labelColor:"white",children:!!C&&(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return s(C)},children:"?"})},p)}},function(e,t,n){"use strict";t.__esModule=!0,t.Mortar=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Mortar=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,l=u.X,s=u.Y,d=u.DX,f=u.DY,p=u.last_three_inputs;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LONGITUDE"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LATITUDE"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LONGITUDE OFFSET"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LATITUDE OFFSET"})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:l,minValue:0,maxValue:255,width:"43px",onChange:function(e,t){return c("change_target_x",{target_x:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:s,minValue:0,maxValue:255,width:"43px",onChange:function(e,t){return c("change_target_y",{target_y:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:d,minValue:-10,width:"43px",maxValue:10,onChange:function(e,t){return c("change_dial_x",{dial_one:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:f,minValue:-10,maxValue:10,width:"43px",onChange:function(e,t){return c("change_dial_y",{dial_two:t})}})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Save 1:",inline:!0,onClick:function(){return c("change_saved_coord_one",{name:p.coords_one.name})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save 2:",inline:!0,onClick:function(){return c("change_saved_coord_two",{name:p.coords_two.name})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save 3:",inline:!0,onClick:function(){return c("change_saved_coord_three",{name:p.coords_three.name})}})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Table,{justify:"space-evenly",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_one")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_one.name,width:"100px",onChange:function(e,t){return c("change_saved_one_name",{name:t})}})}),Object.values(p.coords_one).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_one_"+t)}))]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_two")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_two.name,width:"100px",onChange:function(e,t){return c("change_saved_two_name",{name:t})}})}),Object.values(p.coords_two).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_two_"+t)}))]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_three")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_three.name,width:"100px",onChange:function(e,t){return c("change_saved_three_name",{name:t})}})}),Object.values(p.coords_three).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_three_"+t)}))]})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(1),r=n(57),i=n(5),a=n(7),c=n(4),u=/ \[(?:ghost|dead)\]$/,l=/ \(([0-9]+)\)$/,s=function(e){return(0,r.createSearch)(e,(function(e){return e.name}))},d=function(e,t){var n=e.name,o=t.name,r=n.match(l),i=o.match(l);return r&&i&&n.replace(l,"")===o.replace(l,"")?parseInt(r[1],10)-parseInt(i[1],10):function(e,t){return et}(n,o)},f=function(e,t){var n=(0,c.useBackend)(t).act,r=e.searchText,a=e.source,l=e.title,f=a.filter(s(r));return f.sort(d),a.length>0&&(0,o.createComponentVNode)(2,i.Section,{title:l+" - ("+a.length+")",children:f.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name.replace(u,""),onClick:function(){return n("orbit",{name:e.name})}},e.name)}))})};t.Orbit=function(e,t){var n=(0,c.useBackend)(t),r=n.act,u=n.data,l=u.humans,p=u.marines,h=u.survivors,m=u.xenos,v=(u.dead,u.ghosts),g=u.misc,C=u.npcs,y=(0,c.useLocalState)(t,"searchText",""),b=y[0],N=y[1];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:b,onInput:function(e,t){return N(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[l,p,h,m];t50?"good":l>15&&"average")||"bad";return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!u.anchored&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,i.Button,{icon:u.active?"power-off":"times",onClick:function(){return c("toggle_power")},disabled:!u.ready_to_boot,children:u.active?"On":"Off"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u.sheet_name+" sheets",children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:s,children:u.sheets}),u.sheets>=1&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eject",disabled:u.active,onClick:function(){return c("eject")},children:"Eject"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current sheet level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.stack_percent/100,ranges:{good:[.1,Infinity],average:[.01,.1],bad:[-Infinity,.01]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Heat level",children:u.current_heat<100?(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Nominal"}):u.current_heat<200?(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"average",children:"Caution"}):(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"DANGER"})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current output",children:u.power_output}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"minus",onClick:function(){return c("lower_power")},children:u.power_generated}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",onClick:function(){return c("higher_power")},children:u.power_generated})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:!u.connected&&"bad",children:u.connected?u.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableVendor=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.PortableVendor=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u.show_points>0&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:u.current_points/u.max_points,children:u.current_points+"/"+u.max_points}),u.displayed_records.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:[e.prod_color?(0,o.createComponentVNode)(2,i.Button,{disabled:!e.prod_available,onClick:function(){return c("vend",{vend:e.prod_index})},children:e.prod_name}):(0,o.createComponentVNode)(2,i.Box,{children:e.prod_name}),e.prod_desc&&(0,o.createComponentVNode)(2,i.Box,{children:e.prod_desc})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SelfDestruct=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.SelfDestruct=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"STATUS:",children:0===u.dest_status&&(0,o.createVNode)(1,"span","idle","DISARMED",16)||1===u.dest_status&&(0,o.createVNode)(1,"span","average","AWAITING INPUT",16)||2===u.dest_status&&(0,o.createVNode)(1,"span","good","ARMED",16)||(0,o.createVNode)(1,"span","bad","ERROR",16)})}),(0,o.createComponentVNode)(2,i.Box,{children:1===u.dest_status&&(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"ACTIVATE SYSTEM",color:"yellow",onClick:function(){return c("dest_start")}})||2===u.dest_status&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"INITIATE",color:"red",onClick:function(){return c("dest_trigger")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"CANCEL",color:"yellow",onClick:function(){return c("dest_cancel")}})],4)||(0,o.createVNode)(1,"span","bad","ERROR",16)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sentry=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Sentry=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:u.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:u.is_on,onClick:function(){return c("power")},children:u.is_on?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell Status",children:(0,o.createComponentVNode)(2,i.ProgressBar,{content:u.has_cell?u.cell_charge+" W out of "+u.cell_maxcharge+" W":"No cell inserted",value:u.cell_charge/u.cell_maxcharge,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Structural Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.health/u.health_max,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Rounds",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.rounds/u.rounds_max,content:u.rounds+" out of "+u.rounds_max,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.burst_fire,onClick:function(){return c("burst")},icon:u.burst_fire?"step-forward":"play",disabled:!u.is_on,children:"Burst Fire"}),label:"Burst Fire"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return c("burstup")},icon:"plus",disabled:!u.is_on}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,children:u.burst_size}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return c("burstdown")},icon:"minus",disabled:!u.is_on})],4),label:"Burst Count"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.safety_toggle,onClick:function(){return c("safety")},icon:u.safety_toggle?"check":"times",disabled:!u.is_on,children:"Safety"}),label:"Weapon Safety",children:u.safety_toggle?"Only Xenos":"Everything"}),!u.mini&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.manual_override,onClick:function(){return c("manual")},icon:u.manual_override?"check":"times",disabled:!u.is_on,children:"Manual Override"}),label:"Manual Override"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.radial_mode,onClick:function(){return c("toggle_radial")},icon:u.radial_mode?"check":"times",disabled:!u.is_on,children:"Radial Mode"}),label:"Radial Mode"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.alerts_on,onClick:function(){return c("toggle_alert")},icon:u.alerts_on?"check":"times",disabled:!u.is_on,children:"Alert Mode"}),label:"Alert Mode"})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulatorModification=t.ShuttleManipulatorTemplates=t.ShuttleManipulatorStatus=t.ShuttleManipulator=void 0;var o=n(1),r=n(55),i=n(4),a=n(5),c=n(7);t.ShuttleManipulator=function(e,t){var n=(0,i.useLocalState)(t,"tab",1),r=n[0],d=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===r,onClick:function(){return d(1)},children:"Status"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===r,onClick:function(){return d(2)},children:"Templates"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===r,onClick:function(){return d(3)},children:"Modification"})]}),1===r&&(0,o.createComponentVNode)(2,u),2===r&&(0,o.createComponentVNode)(2,l),3===r&&(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.shuttles||[];return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{children:c.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,{content:"JMP",onClick:function(){return r("jump_to",{type:"mobile",id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Fly",disabled:!e.can_fly,onClick:function(){return r("fly",{id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.status}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.mode,!!e.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),e.timeleft,(0,o.createTextVNode)(")"),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",disabled:!e.can_fast_travel,onClick:function(){return r("fast_travel",{id:e.id})}},e.id)],0)]})]},e.id)}))})})};t.ShuttleManipulatorStatus=u;var l=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,l=c.data,s=l.templates||{},d=l.selected||{},f=(0,i.useLocalState)(t,"templateId",Object.keys(s)[0]),p=f[0],h=f[1],m=null==(n=s[p])?void 0:n.templates;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:p===t,onClick:function(){return h(t)},children:e.port_id},t)}))(s)})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:m.map((function(e){var t=e.shuttle_id===d.shuttle_id;return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:t?"Selected":"Select",selected:t,onClick:function(){return u("select_template",{shuttle_id:e.shuttle_id})}}),children:(!!e.description||!!e.admin_notes)&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),!!e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes})]})},e.shuttle_id)}))})]})})};t.ShuttleManipulatorTemplates=l;var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,u=c.selected||{},l=c.existing_shuttle||{};return(0,o.createComponentVNode)(2,a.Section,{children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{level:2,title:u.name,children:(!!u.description||!!u.admin_notes)&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:u.description}),!!u.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:u.admin_notes})]})}),l?(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Existing Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",onClick:function(){return r("jump_to",{type:"mobile",id:l.id})}}),children:[l.status,!!l.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),l.timeleft,(0,o.createTextVNode)(")")],0)]})})}):(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Existing Shuttle: None"}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",onClick:function(){return r("preview",{shuttle_id:u.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",color:"bad",onClick:function(){return r("load",{shuttle_id:u.shuttle_id})}})]})],0):"No shuttle selected"})};t.ShuttleManipulatorModification=s},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(1),r=n(4),i=n(5),a=n(55),c=n(7);t.SmartVend=function(e,t){var n=(0,r.useBackend)(t),u=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Storage",buttons:!!l.isdryer&&(0,o.createComponentVNode)(2,i.Button,{icon:l.drying?"stop":"tint",onClick:function(){return u("Dry")},children:l.drying?"Stop drying":"Dry"})}),(0,o.createComponentVNode)(2,i.Section,{children:0===l.contents.length?(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Unfortunately, this ",l.name," is empty."]}):(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Item"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Quantity"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:l.verb?l.verb:"Dispense"})]}),(0,a.map)((function(e,t){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.amount}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{disabled:e.amount<1,onClick:function(){return u("Release",{name:e.name,amount:1})},children:"One"}),(0,o.createComponentVNode)(2,i.Button,{disabled:e.amount<=1,onClick:function(){return u("Release",{name:e.name})},children:"Many"})]})]},t)}))(l.contents)]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(1),r=n(4),i=n(5),a=n(453),c=n(7);t.Smes=function(e,t){var n=(0,r.useBackend)(t),u=n.act,l=n.data,s=l.capacityPercent,d=(l.capacity,l.charge),f=l.inputAttempt,p=l.inputting,h=l.inputLevel,m=l.inputLevelMax,v=l.inputAvailable,g=l.outputAttempt,C=l.outputting,y=l.outputLevel,b=l.outputLevelMax,N=l.outputUsed,V=(s>=100?"good":p&&"average")||"bad",_=(C?"good":d>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*s,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:f?"sync-alt":"times",selected:f,onClick:function(){return u("tryinput")},children:f?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:V,children:(s>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return u("input",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===h,onClick:function(){return u("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:h/1e3,fillValue:v/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onDrag:function(e,t){return u("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:h===m,onClick:function(){return u("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:h===m,onClick:function(){return u("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available",children:(0,a.formatPower)(v)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return u("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:_,children:C?"Sending":d>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===y,onClick:function(){return u("output",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===y,onClick:function(){return u("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:y/1e3,minValue:0,maxValue:b/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onDrag:function(e,t){return u("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:y===b,onClick:function(){return u("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:y===b,onClick:function(){return u("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outputting",children:(0,a.formatPower)(N)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.formatMoney=t.formatPower=void 0;var o=n(44),r=["f","p","n","\u03bc","m"," ","k","M","G","T","P","E","Z","Y"],i=r.indexOf(" ");t.formatPower=function(e,t){return void 0===t&&(t=0),function(e,t,n){void 0===t&&(t=-i),void 0===n&&(n="");var a=Math.floor(Math.log10(e)),c=Math.floor(Math.max(3*t,a)),u=Math.floor(a/3),l=Math.floor(c/3),s=(0,o.clamp)(i+l,0,r.length),d=r[s],f=e/Math.pow(1e3,l),p=u>t?2+3*l-c:0;return((0,o.toFixed)(f,p)+" "+d+n).trim()}(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,i=n.indexOf(".");-1===i&&(i=r);for(var a="",c=0;c0&&c0||a.isshared>0)&&(0,o.createComponentVNode)(2,s),a.hidden_records.length>0&&!!a.extended&&(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,p)],0)}),2)],4)]})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"You have selected "+c.currently_vending_name,children:(0,o.createComponentVNode)(2,i.Box,{children:["Please swipe your ID to pay for the article.",(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("swipe")},icon:"id-card",ml:1,children:"Swipe"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("cancel_buying")},icon:"times",children:"Cancel"})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=c.coin_records,l=c.coin_stock,s=c.coin;return(0,o.createComponentVNode)(2,i.Section,{title:"Coin slot: "+(s||"No coin inserted"),buttons:s&&(0,o.createComponentVNode)(2,i.Button,{icon:"donate",onClick:function(){return a("remove_coin")},children:"Remove"}),children:!!s&&(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(0,o.createComponentVNode)(2,d,{stock:l[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.currently_vending_index,s=e.stock,d=e.prod_index,f=e.prod_cat,p=e.product_color,h=e.product_name,m=e.prod_desc,v=(0,r.useLocalState)(t,"showDesc",null),g=(v[0],v[1]);return(0,o.createComponentVNode)(2,u.LabeledListItem,{labelColor:"white",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.ProgressBar,{width:"60px",value:s,maxValue:s,ranges:{good:[10,Infinity],average:[5,10],bad:[-Infinity,5]},children:[s," left"]}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"4px"}),(0,o.createComponentVNode)(2,i.Button,{selected:l===d,onClick:function(){return c("vend",{vend:d,cat:f})},disabled:!s,children:(0,o.createComponentVNode)(2,i.Box,{color:p,bold:1,children:"Vend"})})],4),label:(0,a.decodeHtmlEntities)(h),children:!!m&&(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return g(m)},children:"?"})})},f=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.hidden_records,u=a.hidden_stock;return(0,o.createComponentVNode)(2,i.Section,{title:"$*FD!!F",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(0,o.createComponentVNode)(2,d,{stock:u[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=(0,r.useLocalState)(t,"showEmpty",0),u=c[0],l=(c[1],a.displayed_records),s=a.displayed_stock;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"No product loaded!"}):l.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(u||!!s[n])&&(0,o.createComponentVNode)(2,d,{stock:s[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,l=u.wires||[],s=u.status||[];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{className:"candystripe",label:e.color,labelColor:e.color,color:e.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.color)}))})}),!!s.length&&(0,o.createComponentVNode)(2,i.Section,{children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]})})}}]);
\ No newline at end of file
+var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var l=a.styleSheets;if(r)for(var s in r)r.hasOwnProperty(s)&&c.setAttribute(s,r[s]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var d=function h(e){for(var t=c.href,n=l.length;n--;)if(l[n].href===t)return e();setTimeout((function(){h(e)}))};function f(){c.addEventListener&&c.removeEventListener("load",f),c.media=o||"all"}return c.addEventListener&&c.addEventListener("load",f),c.onloadcssdefined=d,d(f),c}}).call(this,n(124))},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=t.vecCreate=void 0;var o=n(55);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),a=1;a1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(1),r=n(12),i=n(409),a=n(23),c=n(56),u=n(16);function l(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=(0,c.createLogger)("ByondUi"),d=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),v=this.state.viewBox,g=function(e,t,n,o){if(0===e.length)return[];var i=(0,r.zipWith)(Math.min).apply(void 0,e),a=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),o!==undefined&&(i[1]=o[0],a[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,i,a,t)}))(e)}(i,v,a,u);if(g.length>0){var C=g[0],y=g[g.length-1];g.push([v[0]+h,y[1]]),g.push([v[0]+h,-h]),g.push([-h,-h]),g.push([-h,C[1]])}var b=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,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},d,{children:l}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:a})]})},a}(o.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(1),r=n(12),i=n(16),a=n(121);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t,n;function u(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=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},l.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)},l.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},l.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},l.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,l=t.over,s=t.noscroll,d=t.nochevron,f=t.width,p=(t.onClick,t.selected,t.disabled),h=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),m=h.className,v=c(h,["className"]),g=l?!this.state.open:this.state.open,C=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([s?"Dropdown__menu-noscroll":"Dropdown__menu",l&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:f}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({width:f,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",m])},v,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!d||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,a.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),C],0)},u}(o.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(1),r=n(122),i=n(12);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){var t=e.children,n=a(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=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(1),r=n(12),i=n(16);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var c=function(e){return(0,r.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){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,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),i&&i(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=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=u.prototype;return l.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e))},l.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,i=this.inputRef.current;i&&!n&&o!==r&&(i.value=c(r))},l.setEditing=function(e){this.setState({editing:e})},l.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder"]),u=c.className,l=c.fluid,s=a(c,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Input",l&&"Input--fluid",u])},s,{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)]})))},u}(o.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(1),r=n(44),i=n(12),a=n(23),c=n(16),u=n(167),l=n(123);t.Knob=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,h=e.step,m=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,C=e.value,y=e.className,b=e.style,N=e.fillValue,V=e.color,_=e.ranges,w=void 0===_?{}:_,x=e.size,S=e.bipolar,k=(e.children,function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:h,stepPixelSize:m,suppressFlicker:v,unit:g,value:C},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=(0,r.scale)(null!=N?N:a,d,s),h=(0,r.scale)(a,d,s),m=V||(0,r.keyOfMatchingRange)(null!=N?N:n,w)||"default",v=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+m,S&&"Knob--bipolar",y,(0,c.computeBoxClassName)(k)]),[(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("+v+"deg)"}}),2),t&&(0,o.createVNode)(1,"div","Knob__popupValue",u,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":((S?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),l],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":x+"rem"},b)},k)),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(1),r=n(12),i=n(16),a=n(164);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","children"]);return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,l=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","color","info","warning","success","danger"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},l)))};t.NoticeBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var o=n(1),r=n(44),i=n(12),a=n(16);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,l=e.maxValue,s=void 0===l?1:l,d=e.color,f=e.ranges,p=void 0===f?{}:f,h=e.children,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","value","minValue","maxValue","color","ranges","children"]),v=(0,r.scale)(n,u,s),g=h!==undefined,C=d||(0,r.keyOfMatchingRange)(n,p)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+C,t,(0,a.computeBoxClassName)(m)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(v)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",g?h:(0,r.toFixed)(100*v)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(m))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(1),r=n(12),i=n(16);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,l=e.content,s=e.children,d=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","content","children"]),f=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(u),p=!(0,r.isFalsy)(l)||!(0,r.isFalsy)(s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+c,t])},d,{children:[f&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",u,0)],4),p&&(0,o.createVNode)(1,"div","Section__content",[l,s],0)]})))};t.Section=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(1),r=n(44),i=n(12),a=n(23),c=n(16),u=n(167),l=n(123);t.Slider=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,d=e.minValue,f=e.onChange,p=e.onDrag,h=e.step,m=e.stepPixelSize,v=e.suppressFlicker,g=e.unit,C=e.value,y=e.className,b=e.fillValue,N=e.color,V=e.ranges,_=void 0===V?{}:V,w=e.children,x=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),S=w!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:d,onChange:f,onDrag:p,step:h,stepPixelSize:m,suppressFlicker:v,unit:g,value:C},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,l=e.inputElement,f=e.handleDragStart,p=b!==undefined&&null!==b,h=((0,r.scale)(n,d,s),(0,r.scale)(null!=b?b:a,d,s)),m=(0,r.scale)(a,d,s),v=N||(0,r.keyOfMatchingRange)(null!=b?b:n,_)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+v,y,(0,c.computeBoxClassName)(x)]),[(0,o.createVNode)(1,"div",(0,i.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,m))+"%"}}),(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",u,0)],0,{style:{width:100*(0,r.clamp01)(m)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",S?w:u,0),l],0,Object.assign({},(0,c.computeBoxProps)(x),{onMouseDown:f})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(1),r=n(12),i=n(16),a=n(120);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=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,i.computeBoxClassName)(u)]),(0,o.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){var o={"./Apc.js":424,"./CAS.js":426,"./CameraConsole.js":427,"./Cargo.js":169,"./CargoRequest.js":428,"./CentcomPodLauncher.js":429,"./ChemDispenser.js":430,"./ChemMaster.js":431,"./Crew.js":432,"./Cryo.js":433,"./Droppod.js":435,"./DroppodControl.js":436,"./EscapePod.js":437,"./HiveEvolveScreen.js":438,"./IntelComputer.js":439,"./MarineCasship.js":440,"./MarineDropship.js":441,"./MarineSelector.js":442,"./Mortar.js":443,"./Orbit.js":444,"./PodLauncher.js":445,"./PortableGenerator.js":446,"./PortableVendor.js":447,"./SelfDestruct.js":448,"./Sentry.js":449,"./ShuttleManipulator.js":450,"./SmartVend.js":451,"./Smes.js":452,"./Vending.js":454,"./Wires.js":455};function r(e){var t=i(e);return n(t)}function i(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=i,e.exports=r,r.id=423},function(e,t,n){"use strict";t.__esModule=!0,t.Apc=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(425);t.Apc=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var u={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"}},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.locked&&!l.siliconUser,d=u[l.externalPower]||u[0],f=u[l.chargingStatus]||u[0],p=l.powerChannels||[],h=l.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main Breaker",color:d.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!s,disabled:s,onClick:function(){return a("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",value:h})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",color:f.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.chargeMode?"sync":"close",content:l.chargeMode?"Auto":"Off",disabled:s,onClick:function(){return a("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[p.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return a("channel",t.auto)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return a("channel",t.on)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return a("channel",t.off)}})],4),children:e.powerLoad},e.title)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,l.totalLoad,0)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Misc",buttons:!!l.siliconUser&&(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return a("overload")}}),children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){return a("cover")}})})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(1),r=n(4),i=n(5);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=e.siliconUser,l=void 0===u?c.siliconUser:u,s=e.locked,d=void 0===s?c.locked:s,f=e.onLockStatusChange,p=void 0===f?function(){return a("lock")}:f,h=e.accessText,m=void 0===h?"an ID card":h;return l?(0,o.createComponentVNode)(2,i.NoticeBox,{color:l&&"grey",children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{m:0,color:d?"red":"green",icon:d?"lock":"unlock",content:d?"Locked":"Unlocked",onClick:function(){p&&p(!d)}})})]})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe ",m," ","to ",d?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CAS=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.CAS=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[0===i.screen_mode&&(0,o.createComponentVNode)(2,c),1===i.screen_mode&&(0,o.createComponentVNode)(2,u)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Equipment Installed",children:c.equipment_data.length>0?c.equipment_data.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("equip_interact",{equip_interact:e.eqp_tag})},disabled:!e.is_interactable,children:e.name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No equipment installed."})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Weapon Selected: "+c.selected_eqp,buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("deselect")},children:"Deselect"}),children:c.selected_eqp_ammo_name?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo loaded",children:c.selected_eqp_ammo_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo count",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:c.selected_eqp_ammo_amt/c.selected_eqp_max_ammo_amt,content:c.selected_eqp_ammo_amt+" / "+c.selected_eqp_max_ammo_amt})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No ammo loaded"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Available Targets",children:c.targets_data.length>0?c.targets_data.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!c.shuttle_mode,onClick:function(){return a("open_fire",{open_fire:e.target_tag})},children:e.target_name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No laser targets detected."})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleContent=t.CameraConsole=void 0;var o=n(1),r=n(55),i=n(116),a=n(12),c=n(57),u=n(4),l=n(5),s=n(7),d=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){var n=(0,u.useBackend)(t),r=n.act,i=n.data,a=n.config,c=i.mapRef,p=i.activeCamera,h=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]}(d(i.cameras),p),m=h[0],v=h[1];return(0,o.createComponentVNode)(2,s.Window,{resizable:!0,children:[(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,f)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),p&&p.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,l.Button,{icon:"chevron-left",disabled:!m,onClick:function(){return r("switch_camera",{name:m})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"chevron-right",disabled:!v,onClick:function(){return r("switch_camera",{name:v})}})],4),(0,o.createComponentVNode)(2,l.ByondUi,{className:"CameraConsole__map",params:{id:c,parent:a.window,type:"map"}})],4)]})};var f=function(e,t){var n=(0,u.useBackend)(t),r=n.act,i=n.data,c=(0,u.useLocalState)(t,"searchText",""),f=c[0],p=c[1],h=i.activeCamera,m=d(i.cameras,f);return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,l.Section,{children:m.map((function(e){return(0,o.createVNode)(1,"div",(0,a.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",h&&e.name===h.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,s.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)};t.CameraConsoleContent=f},function(e,t,n){"use strict";t.__esModule=!0,t.CargoRequest=void 0;var o=n(169);t.CargoRequest=o.CargoRequest},function(e,t,n){"use strict";t.__esModule=!0,t.CentcomPodLauncher=void 0;var o=n(1),r=(n(57),n(4)),i=n(5),a=n(7);t.CentcomPodLauncher=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:"To use this, simply spawn the atoms you want in one of the five Centcom Supplypod Bays. Items in the bay will then be launched inside your supplypod, one turf-full at a time! You can optionally use the following buttons to configure how the supplypod acts."}),(0,o.createComponentVNode)(2,i.Section,{title:"Centcom Pod Customization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Supply Bay",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Bay #1",selected:1===u.bayNumber,onClick:function(){return c("bay1")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #2",selected:2===u.bayNumber,onClick:function(){return c("bay2")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #3",selected:3===u.bayNumber,onClick:function(){return c("bay3")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Bay #4",selected:4===u.bayNumber,onClick:function(){return c("bay4")}}),(0,o.createComponentVNode)(2,i.Button,{content:"ERT Bay",selected:5===u.bayNumber,tooltip:"This bay is located on the western edge of CentCom. Its the\nglass room directly west of where ERT spawn, and south of the\nCentCom ferry. Useful for launching ERT/Deathsquads/etc. onto\nthe station via drop pods.",onClick:function(){return c("bay5")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Teleport to",children:[(0,o.createComponentVNode)(2,i.Button,{content:u.bay,onClick:function(){return c("teleportCentcom")}}),(0,o.createComponentVNode)(2,i.Button,{content:u.oldArea?u.oldArea:"Where you were",disabled:!u.oldArea,onClick:function(){return c("teleportBack")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Clone Mode",children:(0,o.createComponentVNode)(2,i.Button,{content:"Launch Clones",selected:u.launchClone,tooltip:"Choosing this will create a duplicate of the item to be\nlaunched in Centcom, allowing you to send one type of item\nmultiple times. Either way, the atoms are forceMoved into\nthe supplypod after it lands (but before it opens).",onClick:function(){return c("launchClone")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Launch style",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Ordered",selected:1===u.launchChoice,tooltip:'Instead of launching everything in the bay at once, this\nwill "scan" things (one turf-full at a time) in order, left\nto right and top to bottom. undoing will reset the "scanner"\nto the top-leftmost position.',onClick:function(){return c("launchOrdered")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Random",selected:2===u.launchChoice,tooltip:"Instead of launching everything in the bay at once, this\nwill launch one random turf of items at a time.",onClick:function(){return c("launchRandom")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Explosion",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Size",selected:1===u.explosionChoice,tooltip:"This will cause an explosion of whatever size you like\n(including flame range) to occur as soon as the supplypod\nlands. Dont worry, supply-pods are explosion-proof!",onClick:function(){return c("explosionCustom")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Adminbus",selected:2===u.explosionChoice,tooltip:"This will cause a maxcap explosion (dependent on server\nconfig) to occur as soon as the supplypod lands. Dont worry,\nsupply-pods are explosion-proof!",onClick:function(){return c("explosionBus")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Damage",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Damage",selected:1===u.damageChoice,tooltip:"Anyone caught under the pod when it lands will be dealt\nthis amount of brute damage. Sucks to be them!",onClick:function(){return c("damageCustom")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Gib",selected:2===u.damageChoice,tooltip:"This will attempt to gib any mob caught under the pod when\nit lands, as well as dealing a nice 5000 brute damage. Ya\nknow, just to be sure!",onClick:function(){return c("damageGib")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Effects",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Stun",selected:u.effectStun,tooltip:"Anyone who is on the turf when the supplypod is launched\nwill be stunned until the supplypod lands. They cant get\naway that easy!",onClick:function(){return c("effectStun")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Delimb",selected:u.effectLimb,tooltip:"This will cause anyone caught under the pod to lose a limb,\nexcluding their head.",onClick:function(){return c("effectLimb")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Yeet Organs",selected:u.effectOrgans,tooltip:"This will cause anyone caught under the pod to lose all\ntheir limbs and organs in a spectacular fashion.",onClick:function(){return c("effectOrgans")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Movement",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Bluespace",selected:u.effectBluespace,tooltip:"Gives the supplypod an advanced Bluespace Recyling Device.\nAfter opening, the supplypod will be warped directly to the\nsurface of a nearby NT-designated trash planet (/r/ss13).",onClick:function(){return c("effectBluespace")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Stealth",selected:u.effectStealth,tooltip:'This hides the red target icon from appearing when you\nlaunch the supplypod. Combos well with the "Invisible"\nstyle. Sneak attack, go!',onClick:function(){return c("effectStealth")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Quiet",selected:u.effectQuiet,tooltip:"This will keep the supplypod from making any sounds, except\nfor those specifically set by admins in the Sound section.",onClick:function(){return c("effectQuiet")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reverse Mode",selected:u.effectReverse,tooltip:"This pod will not send any items. Instead, after landing,\nthe supplypod will close (similar to a normal closet closing),\nand then launch back to the right centcom bay to drop off any\nnew contents.",onClick:function(){return c("effectReverse")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Missile Mode",selected:u.effectMissile,tooltip:"This pod will not send any items. Instead, it will immediately\ndelete after landing (Similar visually to setting openDelay\n& departDelay to 0, but this looks nicer). Useful if you just\nwanna fuck some shit up. Combos well with the Missile style.",onClick:function(){return c("effectMissile")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Any Descent Angle",selected:u.effectCircle,tooltip:"This will make the supplypod come in from any angle. Im not\nsure why this feature exists, but here it is.",onClick:function(){return c("effectCircle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Machine Gun Mode",selected:u.effectBurst,tooltip:"This will make each click launch 5 supplypods inaccuratly\naround the target turf (a 3x3 area). Combos well with the\nMissile Mode if you dont want shit lying everywhere after.",onClick:function(){return c("effectBurst")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Specific Target",selected:u.effectTarget,tooltip:"This will make the supplypod target a specific atom, instead\nof the mouses position. Smiting does this automatically!",onClick:function(){return c("effectTarget")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name/Desc",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Name/Desc",selected:u.effectName,tooltip:"Allows you to add a custom name and description.",onClick:function(){return c("effectName")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Alert Ghosts",selected:u.effectAnnounce,tooltip:"Alerts ghosts when a pod is launched. Useful if some dumb\nshit is aboutta come outta the pod.",onClick:function(){return c("effectAnnounce")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sound",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Falling Sound",selected:u.fallingSound,tooltip:"Choose a sound to play as the pod falls. Note that for this\nto work right you should know the exact length of the sound,\nin seconds.",onClick:function(){return c("fallSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Landing Sound",selected:u.landingSound,tooltip:"Choose a sound to play when the pod lands.",onClick:function(){return c("landingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Opening Sound",selected:u.openingSound,tooltip:"Choose a sound to play when the pod opens.",onClick:function(){return c("openingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Leaving Sound",selected:u.leavingSound,tooltip:"Choose a sound to play when the pod departs (whether that be\ndelection in the case of a bluespace pod, or leaving for\ncentcom for a reversing pod).",onClick:function(){return c("leavingSound")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Admin Sound Volume",selected:u.soundVolume,tooltip:"Choose the volume for the sound to play at. Default values\nare between 1 and 100, but hey, do whatever. Im a tooltip,\nnot a cop.",onClick:function(){return c("soundVolume")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timers",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Custom Falling Duration",selected:4!==u.fallDuration,tooltip:"Set how long the animation for the pod falling lasts. Create\ndramatic, slow falling pods!",onClick:function(){return c("fallDuration")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Landing Time",selected:20!==u.landingDelay,tooltip:"Choose the amount of time it takes for the supplypod to hit\nthe station. By default this value is 0.5 seconds.",onClick:function(){return c("landingDelay")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Opening Time",selected:30!==u.openingDelay,tooltip:"Choose the amount of time it takes for the supplypod to open\nafter landing. Useful for giving whatevers inside the pod a\nnice dramatic entrance! By default this value is 3 seconds.",onClick:function(){return c("openingDelay")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Custom Leaving Time",selected:30!==u.departureDelay,tooltip:"Choose the amount of time it takes for the supplypod to leave\nafter landing. By default this value is 3 seconds.",onClick:function(){return c("departureDelay")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Style",children:u.styles.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e[1],selected:u.styleChoice===e[3],tooltip:e[2],onClick:function(){return c("setstyle",{style:e[0]})}},e.id)}))})]})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u.numObjects+" turfs in "+u.bay,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"undo Pody Bay",tooltip:"Manually undoes the possible things to launch in the\npod bay.",onClick:function(){return c("undo")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Enter Launch Mode",selected:u.giveLauncher,tooltip:"THE CODEX ASTARTES CALLS THIS MANEUVER: STEEL RAIN",onClick:function(){return c("giveLauncher")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Selected Bay",color:"bad",tooltip:"This will delete all objs and mobs from the selected bay.",tooltipPosition:"left",onClick:function(){return c("clearBay")}})],4)})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(1),r=n(44),i=n(57),a=n(4),c=n(5),u=n(7);t.ChemDispenser=function(e,t){var n=(0,a.useBackend)(t),l=n.act,s=n.data,d=!!s.recordingRecipe,f=Object.keys(s.recipes).map((function(e){return{name:e,contents:s.recipes[e]}})),p=s.beakerTransferAmounts||[],h=d&&Object.keys(s.recordingRecipe).map((function(e){return{id:e,name:(0,i.toTitleCase)(e.replace(/_/," ")),volume:s.recordingRecipe[e]}}))||s.beakerContents||[];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:d&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,color:"red",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"circle",mr:1}),"Recording"]}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:s.energy/s.maxEnergy,children:(0,r.toFixed)(s.energy)+" units"})})})}),(0,o.createComponentVNode)(2,c.Section,{title:"Recipes",buttons:(0,o.createFragment)([!d&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:"Clear recipes",onClick:function(){return l("clear_recipes")}})}),!d&&(0,o.createComponentVNode)(2,c.Button,{icon:"circle",disabled:!s.isBeakerLoaded,content:"Record",onClick:function(){return l("record_recipe")}}),d&&(0,o.createComponentVNode)(2,c.Button,{icon:"ban",color:"transparent",content:"Discard",onClick:function(){return l("cancel_recording")}}),d&&(0,o.createComponentVNode)(2,c.Button,{icon:"save",color:"green",content:"Save",onClick:function(){return l("save_recording")}})],0),children:(0,o.createComponentVNode)(2,c.Box,{mr:-1,children:[f.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",width:"129.5px",lineHeight:"21px",content:e.name,onClick:function(){return l("dispense_recipe",{recipe:e.name})}},e.name)})),0===f.length&&(0,o.createComponentVNode)(2,c.Box,{color:"light-gray",children:"No recipes."})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Dispense",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"plus",selected:e===s.amount,content:e,onClick:function(){return l("amount",{target:e})}},e)})),children:(0,o.createComponentVNode)(2,c.Box,{mr:-1,children:s.chemicals.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",width:"129.5px",lineHeight:"21px",content:e.title,onClick:function(){return l("dispense",{reagent:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"minus",disabled:d,content:e,onClick:function(){return l("remove",{amount:e})}},e)})),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Beaker",buttons:!!s.isBeakerLoaded&&(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",disabled:!s.isBeakerLoaded,onClick:function(){return l("eject")}}),children:(d?"Virtual beaker":s.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.AnimatedNumber,{initial:0,value:s.beakerCurrentVolume}),(0,o.createTextVNode)("/"),s.beakerMaxVolume,(0,o.createTextVNode)(" units")],0))||"No beaker"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contents",children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",children:s.isBeakerLoaded||d?0===h.length&&"Nothing":"N/A"}),h.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{initial:0,value:e.volume})," ","units of ",e.name]},e.name)}))]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data.screen;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:"analyze"===n&&(0,o.createComponentVNode)(2,f)||(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.screen,p=c.beakerContents,h=void 0===p?[]:p,m=c.bufferContents,v=void 0===m?[]:m,g=c.beakerCurrentVolume,C=c.beakerMaxVolume,y=c.isBeakerLoaded,b=c.isPillBottleLoaded,N=c.pillBottleCurrentAmount,V=c.pillBottleMaxAmount;return"analyze"===s?(0,o.createComponentVNode)(2,f):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:!!c.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:g,initial:0})," / "+C+" units"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return a("eject")}})],4),children:[!y&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"No beaker loaded."}),!!y&&0===h.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"Beaker is empty."}),(0,o.createComponentVNode)(2,u,{children:h.map((function(e){return(0,o.createComponentVNode)(2,l,{chemical:e,transferTo:"buffer"},e.id)}))})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Buffer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:1,children:"Mode:"}),(0,o.createComponentVNode)(2,i.Button,{color:c.mode?"good":"bad",icon:c.mode?"exchange-alt":"times",content:c.mode?"Transfer":"Destroy",onClick:function(){return a("toggleMode")}})],4),children:[0===v.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"3px",mb:"5px",children:"Buffer is empty."}),(0,o.createComponentVNode)(2,u,{children:v.map((function(e){return(0,o.createComponentVNode)(2,l,{chemical:e,transferTo:"beaker"},e.id)}))})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Packaging",children:(0,o.createComponentVNode)(2,d)}),!!b&&(0,o.createComponentVNode)(2,i.Section,{title:"Pill Bottle",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"label",mr:2,children:[N," / ",V," pills"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return a("ejectPillBottle")}})],4)})],0)},u=i.Table,l=function(e,t){var n=(0,r.useBackend)(t).act,a=e.chemical,c=e.transferTo;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{color:"label",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:a.volume,initial:0})," units of "+a.name]}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,i.Button,{content:"1",onClick:function(){return n("transfer",{id:a.id,amount:1,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"5",onClick:function(){return n("transfer",{id:a.id,amount:5,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"10",onClick:function(){return n("transfer",{id:a.id,amount:10,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{content:"All",onClick:function(){return n("transfer",{id:a.id,amount:1e3,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"ellipsis-h",title:"Custom amount",onClick:function(){return n("transfer",{id:a.id,amount:-1,to:c})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"question",title:"Analyze",onClick:function(){return n("analyze",{id:a.id})}})]})]},a.id)},s=function(e){var t=e.label,n=e.amountUnit,r=e.amount,a=e.onChangeAmount,c=e.onCreate,u=e.sideNote;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:[(0,o.createComponentVNode)(2,i.NumberInput,{width:"84px",unit:n,step:1,stepPixelSize:15,value:r,minValue:1,maxValue:10,onChange:a}),(0,o.createComponentVNode)(2,i.Button,{ml:1,content:"Create",onClick:c}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,color:"label",children:u})]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=(0,r.useSharedState)(t,"pillAmount",1),l=u[0],d=u[1],f=(0,r.useSharedState)(t,"patchAmount",1),p=f[0],h=f[1],m=(0,r.useSharedState)(t,"bottleAmount",1),v=m[0],g=m[1],C=(0,r.useSharedState)(t,"packAmount",1),y=C[0],b=C[1],N=c.condi,V=c.chosenPillStyle,_=c.pillStyles,w=void 0===_?[]:_;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[!N&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pill type",children:w.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{width:"30px",selected:e.id===V,textAlign:"center",color:"transparent",onClick:function(){return a("pillStyle",{id:e.id})},children:(0,o.createComponentVNode)(2,i.Box,{mx:-1,className:e.className})},e.id)}))}),!N&&(0,o.createComponentVNode)(2,s,{label:"Pills",amount:l,amountUnit:"pills",sideNote:"max 50u",onChangeAmount:function(e,t){return d(t)},onCreate:function(){return a("create",{type:"pill",amount:l,volume:"auto"})}}),!N&&(0,o.createComponentVNode)(2,s,{label:"Patches",amount:p,amountUnit:"patches",sideNote:"max 40u",onChangeAmount:function(e,t){return h(t)},onCreate:function(){return a("create",{type:"patch",amount:p,volume:"auto"})}}),!N&&(0,o.createComponentVNode)(2,s,{label:"Bottles",amount:v,amountUnit:"bottles",sideNote:"max 30u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return a("create",{type:"bottle",amount:v,volume:"auto"})}}),!!N&&(0,o.createComponentVNode)(2,s,{label:"Packs",amount:y,amountUnit:"packs",sideNote:"max 10u",onChangeAmount:function(e,t){return b(t)},onCreate:function(){return a("create",{type:"condimentPack",amount:y,volume:"auto"})}}),!!N&&(0,o.createComponentVNode)(2,s,{label:"Bottles",amount:v,amountUnit:"bottles",sideNote:"max 50u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return a("create",{type:"condimentBottle",amount:v,volume:"auto"})}})]})},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.analyzeVars;return(0,o.createComponentVNode)(2,i.Section,{title:"Analysis Results",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",onClick:function(){return a("goScreen",{screen:"home"})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:c.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State",children:c.state}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,i.ColorBox,{color:c.color,mr:1}),c.color]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:c.description}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metabolization Rate",children:[c.metaRate," u/minute"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Overdose Threshold",children:c.overD}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Addiction Threshold",children:c.addicD})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Crew=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Crew=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Location to scan",children:[{label:"Ship",zlevel:"0"},{label:"Planet",zlevel:"1"},{label:"Low Orbit",zlevel:"2"}].map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:e.zlevel===u.zlevel,onClick:function(){return c("zlevel",{zlevel:e.zlevel})},children:e.label},e.id)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Found signals",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[{label:"Name",sortkey:"name",icon:"user-alt"},{label:"Rank",sortkey:"rank",icon:"tag"},{label:"Status",sortkey:"status",icon:"heartbeat"},{label:"Area",sortkey:"area",icon:"map-marker-alt"}].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:e.icon,onClick:function(){return c("sortkey",{sortkey:e.sortkey})},children:e.label})},e.id)}))}),u.crewmembers.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.rank}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:0===e.status?"good":1===e.status?"average":"bad",children:0===e.status?"Living":1===e.status?"Unconscious":"Deceased"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[1===e.sensor_type&&"Not Available",2===e.sensor_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"cyan",children:e.oxy}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"green",children:e.tox}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"orange",children:e.fire}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"red",children:e.brute})],4)]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:3===e.sensor_type?e.area+" "+e.x+", "+e.y:"Not Available"})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(1),r=n(4),i=n(5),a=n(434),c=n(7),u=[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}];t.Cryo=function(){return(0,o.createComponentVNode)(2,c.Window,{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=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Occupant",children:l.occupant.name||"No Occupant"}),!!l.hasOccupant&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State",color:l.occupant.statstate,children:l.occupant.stat}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",color:l.occupant.temperaturestatus,children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant.bodyTemperature})," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:l.occupant.health/l.occupant.maxHealth,color:l.occupant.health>0?"good":"average",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant.health})})}),u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:l.occupant[e.type]/100,children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.occupant[e.type]})})},e.id)}))],0)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Cell",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.isOperating?"power-off":"times",disabled:l.isOpen,onClick:function(){return c("power")},color:l.isOperating&&"green",children:l.isOperating?"On":"Off"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:l.cellTemperature})," K"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!l.hasOccupant,onClick:function(){return c("eject")},content:"eject patient"}),(0,o.createComponentVNode)(2,i.Button,{icon:l.autoEject?"sign-out-alt":"sign-in-alt",onClick:function(){return c("autoeject")},content:l.autoEject?"Auto":"Manual"})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!l.isBeakerLoaded,onClick:function(){return c("ejectbeaker")},content:"Eject"}),children:(0,o.createComponentVNode)(2,a.BeakerContents,{beakerLoaded:l.isBeakerLoaded,beakerContents:l.beakerContents})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(1),r=n(5);t.BeakerContents=function(e){var t=e.beakerLoaded,n=e.beakerContents;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===n.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),n.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{color:"label",children:[e.volume," units of ",e.name]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Droppod=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(70);t.Droppod=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:1===n.drop_state?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,i.NoticeBox,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"DROP ACTIVE"}),(0,o.createComponentVNode)(2,i.Box,{children:"DEPLOYMENT UNDERWAY"})]})})})};var u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,u=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"Welcome, "+u.occupant,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"X Coordinate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:u.target_x,onChange:function(e,t){return a("set_x_target",{set_x:""+t})}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Y Coordinate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:u.target_y,onChange:function(e,t){return a("set_y_target",{set_y:""+t})}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Check drop validity",children:(0,o.createComponentVNode)(2,i.Button,{content:"Check drop point validity",color:"blue",onClick:function(){return a("check_droppoint")}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Launching",children:(0,o.createComponentVNode)(2,i.Button,{content:"LAUNCH DROPPOD",color:"red",onClick:function(){return a("launch")}})}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Exit Drop pod",children:(0,o.createComponentVNode)(2,i.Button,{content:"Exit Pod",color:"green",onClick:function(){return a("exitpod")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DroppodControl=void 0;var o=n(1),r=n(7),i=n(4),a=n(5);t.DroppodControl=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,r.Window,{children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Launch Control",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Relink current pods",color:"blue",onClick:function(){return c("relink")}}),(0,o.createComponentVNode)(2,a.Button,{content:"LAUNCH ALL PODS",color:"red",onClick:function(){return c("launchall")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[" ","Currently "+u.pods+" connected pods."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EscapePod=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.EscapePod=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Escape Pod",children:["Welcome to Nanotransens least luxurious survival pod! Have a pleasant stay!",(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{m:"50",content:"Launch evacuation pod",disabled:u.can_launch,color:"red",onClick:function(){return c("launch")}})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HiveEvolveScreen=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Evolution progress - "+e.current+"/"+e.max,height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/e.max})})},u=function(e){var t=["Rest","Regurgitate"],n=Object.values(e.abilites).filter((function(e){return-1===t.indexOf(e.name)}));Object.keys(e.abilites).slice(-1)[0];return(0,o.createComponentVNode)(2,i.Section,{title:e.name+" - Abilities",children:e.abilites?n.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{fluid:1,color:"transparent",tooltip:e.desc,tooltipPosition:"bottom",content:e.name},e.name)})):"This caste has no abilites"})};t.HiveEvolveScreen=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.name,f=s.evolution,p=s.abilities,h=s.evolves_to,m=s.can_evolve&&f.current>=f.max,v=["Shrike","Queen"],g=Object.values(h);return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Current Evolution",children:[(0,o.createComponentVNode)(2,u,{act:l,current:!0,name:d,abilites:p}),(0,o.createComponentVNode)(2,c,{current:f.current,max:f.max})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Available Evolutions",children:g.map((function(e,t){return(0,o.createComponentVNode)(2,i.Collapsible,{title:e.name+" (click for details)",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!m&&!v.includes(e.name),onClick:function(){return l("evolve",{path:e.type_path})},children:"Evolve"}),children:(0,o.createComponentVNode)(2,u,{name:e.name,abilites:e.abilities,canEvolve:m})},e.type_path)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.IntelComputercontent=t.IntelComputer=t.FakeTerminal=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);var c=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,i.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component);t.FakeTerminal=c;var u=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Running search.bat - "+e.current+"%",height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/100})})},l=function(e){return(0,o.createComponentVNode)(2,i.Section,{title:"Running transmit.bat - "+e.current+"%",height:"100%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75,Infinity],average:[-Infinity,.75]},value:e.current/100})})};t.IntelComputer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{theme:"syndicate",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,s)})})};var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,s=n.data;return s.logged_in?s.logged_in&&s.first_login?(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"525px",children:(0,o.createComponentVNode)(2,c,{allMessages:["WARNING UNREGISTERED USER...","Override detected...","ACCESS CONFIRMED...","Contacting central database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, welcome auth 'akjv9c88asdf12nb'...","Credentials accepted. Welcome, akjv9c88asdf12nb...","Installing OS from external drive...","Installing...","Installing...","Installing...","Installing...","Installation complete...","Connected to TGMC_Raptor_mainframe.mfg","Connection established"],finishedTimeout:3e3,onFinished:function(){return a("first_load")}})}):!s.logged_in||s.first_login||s.printing||s.printed?s.printing&&s.progress<=50?(0,o.createComponentVNode)(2,i.Section,{title:"EXECUTING F:/DATA_RETRIEVAL.exe",children:[(0,o.createComponentVNode)(2,u,{current:2*s.progress}),(0,o.createComponentVNode)(2,l,{current:0})]}):s.printing&&s.progress>=50?(0,o.createComponentVNode)(2,i.Section,{title:"EXECUTING F:/DATA_RETRIEVAL.exe",children:[(0,o.createComponentVNode)(2,u,{current:100}),(0,o.createComponentVNode)(2,l,{current:2*(s.progress-50)})]}):s.printed?(0,o.createComponentVNode)(2,i.Section,{title:"F:/DATA_RETRIEVAL.exe returns SUCCESS",children:[(0,o.createComponentVNode)(2,u,{current:100}),(0,o.createComponentVNode)(2,l,{current:100})]}):void 0:(0,o.createComponentVNode)(2,i.Section,{minHeight:"525px",children:(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"EXECUTE F:/DATA_RETRIEVAL.exe",color:"transparent",onClick:function(){return a("start_progressing")}})})}):(0,o.createComponentVNode)(2,i.Section,{minHeight:"525px",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{content:"LOGIN REGISTERED USER",color:"transparent",confirmContent:"Confirm Military Override?",onClick:function(){return a("login")}})}),!!s.error&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:s.error})]})};t.IntelComputercontent=s},function(e,t,n){"use strict";t.__esModule=!0,t.MarineCasship=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.MarineCasship=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{theme:"ntos",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:0===i.plane_state?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,u)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:c.ship_status}),(0,o.createComponentVNode)(2,i.Section,{title:"Engine Control",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Spool Engines",onClick:function(){return a("toggle_engines")},disabled:c.fuel_left<=0})}),(0,o.createComponentVNode)(2,i.Box,{content:"Fuel capacity:",width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Fuel level ",c.fuel_left/c.fuel_max*100,"%"]})})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:c.ship_status}),(0,o.createComponentVNode)(2,i.NoticeBox,{children:[c.active_lasers," Active Lasers Detected"]}),(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Fuel level"}),(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[-Infinity,.25]},value:c.fuel_left/c.fuel_max})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Weapons",children:c.all_weapons.length>0?c.all_weapons.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("change_weapon",{selection:e.eqp_tag})},disabled:e.eqp_tag===c.active_weapon_tag,children:e.name})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{children:"No equipment installed."})}),c.active_weapon_name?(0,o.createComponentVNode)(2,i.Section,{title:"Weapon Selected: "+c.active_weapon_name,buttons:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("deselect")},children:"Deselect"}),children:c.active_weapon_ammo_name?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo loaded",children:c.active_weapon_ammo_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Ammo count",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:c.active_weapon_ammo/c.active_weapon_max_ammo,content:c.active_weapon_ammo+" / "+c.active_weapon_max_ammo})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No ammo loaded"})}):(0,o.createComponentVNode)(2,i.Section,{title:"No active equipment."}),(0,o.createComponentVNode)(2,i.Section,{title:"Piloting control",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Launch plane",onClick:function(){return a("launch")},disabled:3===c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Land plane",onClick:function(){return a("land")},disabled:3!==c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Disable Engines",onClick:function(){return a("toggle_engines")},disabled:2!==c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Begin Firemission",onClick:function(){return a("deploy")},disabled:3!==c.plane_state})}),(0,o.createComponentVNode)(2,i.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"Strafe Direction: "+c.attackdir,onClick:function(){return a("cycle_attackdir")}})})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.MarineDropship=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.MarineDropship=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:u.hijack_state?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,i.NoticeBox,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"POSSIBLE HIJACK"}),(0,o.createComponentVNode)(2,i.Box,{children:"SYSTEMS REBOOTING..."})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=[{label:"Left",name:"left",lockdown:c.left},{label:"Right",name:"right",lockdown:c.right},{label:"Rear",name:"rear",lockdown:c.rear}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Ship Status",children:c.ship_status}),(0,o.createComponentVNode)(2,i.Section,{title:"Destinations",children:c.destinations.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("move",{move:e.id})},disabled:c.shuttle_mode,children:e.name})},e.id)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Door Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"All",children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("lockdown")},disabled:2===c.lockdown,children:"Lockdown"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("release")},disabled:0===c.lockdown,children:"Release"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.label,children:[(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("lock",{lock:e.name})},disabled:2===e.lockdown,children:"Lockdown"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("unlock",{unlock:e.name})},disabled:0===e.lockdown,children:"Unlock"})]},e.id)}))]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.MarineSelector=void 0;var o=n(1),r=n(4),i=n(5),a=n(7),c=n(70);t.MarineSelector=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=(0,r.useLocalState)(t,"showEmpty",0),s=l[0],d=l[1],f=(0,r.useLocalState)(t,"showDesc",null),p=f[0],h=f[1],m=c.current_m_points,v=c.total_marine_points,g=c.show_points,C=Object.keys(c.displayed_records).map((function(e){return Object.assign({},c.cats[e],{name:e,entries:c.displayed_records[e]})})).filter((function(e){return e.entries.length>0&&(s||e.remaining>0||!e.total&&!!m)}));return(0,o.createComponentVNode)(2,a.Window,{children:[!!p&&(0,o.createComponentVNode)(2,i.Modal,{width:"400px",children:[(0,o.createComponentVNode)(2,i.Box,{children:p}),(0,o.createComponentVNode)(2,i.Button,{content:"Dismiss",onClick:function(){return h(null)}})]}),(0,o.createVNode)(1,"div",null,[(0,o.createVNode)(1,"div","VendingWindow__header",(0,o.createComponentVNode)(2,i.Section,{title:"Choose your equipment",buttons:(0,o.createFragment)([!!g&&(0,o.createComponentVNode)(2,i.ProgressBar,{width:"100px",value:m/v,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]},children:m+"/"+v+" Points"}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"4px"}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:s,onClick:function(){return d(!s)},children:"Show Empty Categories"})],0)}),2),(0,o.createVNode)(1,"div","VendingWindow__content",(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:C.map((function(e){return(0,o.createComponentVNode)(2,u,{category:e},e.id)}))})}),2)],4)]})};var u=function(e,t){var n=e.category,r=n.entries,a=n.name,c=n.remaining,u=n.total,s=u&&!c;return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:!!u&&(0,o.createComponentVNode)(2,i.ProgressBar,{value:c/u,ranges:{good:[1,Infinity],average:[.1,1],bad:[-Infinity,.1]},children:c+"/"+u+" Choices"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:r.map((function(e){return(0,o.createComponentVNode)(2,l,{display_record:e,cant_buy:s},e.id)}))})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,u=n.data,l=(0,r.useLocalState)(t,"showDesc",null),s=(l[0],l[1]),d=u.current_m_points,f=e.display_record,p=f.id,h=f.prod_cost,m=f.prod_index,v=f.prod_color,g=f.prod_name,C=f.prod_desc,y=e.cant_buy;return(0,o.createComponentVNode)(2,c.LabeledListItem,{buttons:(0,o.createFragment)(["white"===v&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,children:"Essential!"}),"orange"===v&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,color:"orange",children:"Recommended"}),h>0&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"75px",mr:1,ml:1,children:[h," points"]}),(0,o.createComponentVNode)(2,i.Button,{disabled:y||h>d,onClick:function(){return a("vend",{vend:m})},selected:"white"===v,children:"Vend"})],0),label:g,labelColor:"white",children:!!C&&(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return s(C)},children:"?"})},p)}},function(e,t,n){"use strict";t.__esModule=!0,t.Mortar=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Mortar=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,l=u.X,s=u.Y,d=u.DX,f=u.DY,p=u.last_three_inputs;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LONGITUDE"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LATITUDE"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LONGITUDE OFFSET"}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"LATITUDE OFFSET"})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:l,minValue:0,maxValue:255,width:"43px",onChange:function(e,t){return c("change_target_x",{target_x:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:s,minValue:0,maxValue:255,width:"43px",onChange:function(e,t){return c("change_target_y",{target_y:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:d,minValue:-10,width:"43px",maxValue:10,onChange:function(e,t){return c("change_dial_x",{dial_one:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.NumberInput,{value:f,minValue:-10,maxValue:10,width:"43px",onChange:function(e,t){return c("change_dial_y",{dial_two:t})}})})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Save 1:",inline:!0,onClick:function(){return c("change_saved_coord_one",{name:p.coords_one.name})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save 2:",inline:!0,onClick:function(){return c("change_saved_coord_two",{name:p.coords_two.name})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save 3:",inline:!0,onClick:function(){return c("change_saved_coord_three",{name:p.coords_three.name})}})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Table,{justify:"space-evenly",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_one")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_one.name,width:"100px",onChange:function(e,t){return c("change_saved_one_name",{name:t})}})}),Object.values(p.coords_one).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_one_"+t)}))]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_two")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_two.name,width:"100px",onChange:function(e,t){return c("change_saved_two_name",{name:t})}})}),Object.values(p.coords_two).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_two_"+t)}))]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Select:",onClick:function(){return c("set_saved_coord_three")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Input,{value:p.coords_three.name,width:"100px",onChange:function(e,t){return c("change_saved_three_name",{name:t})}})}),Object.values(p.coords_three).map((function(e,t){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:e},"coords_three_"+t)}))]})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(1),r=n(57),i=n(5),a=n(7),c=n(4),u=/ \[(?:ghost|dead)\]$/,l=/ \(([0-9]+)\)$/,s=function(e){return(0,r.createSearch)(e,(function(e){return e.name}))},d=function(e,t){var n=e.name,o=t.name,r=n.match(l),i=o.match(l);return r&&i&&n.replace(l,"")===o.replace(l,"")?parseInt(r[1],10)-parseInt(i[1],10):function(e,t){return et}(n,o)},f=function(e,t){var n=(0,c.useBackend)(t).act,r=e.searchText,a=e.source,l=e.title,f=a.filter(s(r));return f.sort(d),a.length>0&&(0,o.createComponentVNode)(2,i.Section,{title:l+" - ("+a.length+")",children:f.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name.replace(u,""),onClick:function(){return n("orbit",{name:e.name})}},e.name)}))})};t.Orbit=function(e,t){var n=(0,c.useBackend)(t),r=n.act,u=n.data,l=u.humans,p=u.marines,h=u.survivors,m=u.xenos,v=(u.dead,u.ghosts),g=u.misc,C=u.npcs,y=(0,c.useLocalState)(t,"searchText",""),b=y[0],N=y[1];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:b,onInput:function(e,t){return N(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[l,p,h,m];t50?"good":l>15&&"average")||"bad";return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!u.anchored&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,i.Button,{icon:u.active?"power-off":"times",onClick:function(){return c("toggle_power")},disabled:!u.ready_to_boot,children:u.active?"On":"Off"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:u.sheet_name+" sheets",children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:s,children:u.sheets}),u.sheets>=1&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"eject",disabled:u.active,onClick:function(){return c("eject")},children:"Eject"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current sheet level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.stack_percent/100,ranges:{good:[.1,Infinity],average:[.01,.1],bad:[-Infinity,.01]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Heat level",children:u.current_heat<100?(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"good",children:"Nominal"}):u.current_heat<200?(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"average",children:"Caution"}):(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"DANGER"})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current output",children:u.power_output}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"minus",onClick:function(){return c("lower_power")},children:u.power_generated}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",onClick:function(){return c("higher_power")},children:u.power_generated})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:!u.connected&&"bad",children:u.connected?u.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableVendor=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.PortableVendor=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u.show_points>0&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},value:u.current_points/u.max_points,children:u.current_points+"/"+u.max_points}),u.displayed_records.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{children:[e.prod_color?(0,o.createComponentVNode)(2,i.Button,{disabled:!e.prod_available,onClick:function(){return c("vend",{vend:e.prod_index})},children:e.prod_name}):(0,o.createComponentVNode)(2,i.Box,{children:e.prod_name}),e.prod_desc&&(0,o.createComponentVNode)(2,i.Box,{children:e.prod_desc})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SelfDestruct=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.SelfDestruct=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"STATUS:",children:0===u.dest_status&&(0,o.createVNode)(1,"span","idle","DISARMED",16)||1===u.dest_status&&(0,o.createVNode)(1,"span","average","AWAITING INPUT",16)||2===u.dest_status&&(0,o.createVNode)(1,"span","good","ARMED",16)||(0,o.createVNode)(1,"span","bad","ERROR",16)})}),(0,o.createComponentVNode)(2,i.Box,{children:1===u.dest_status&&(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"ACTIVATE SYSTEM",color:"yellow",onClick:function(){return c("dest_start")}})||2===u.dest_status&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"INITIATE",color:"red",onClick:function(){return c("dest_trigger")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"CANCEL",color:"yellow",onClick:function(){return c("dest_cancel")}})],4)||(0,o.createVNode)(1,"span","bad","ERROR",16)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sentry=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Sentry=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:u.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",selected:u.is_on,onClick:function(){return c("power")},children:u.is_on?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell Status",children:(0,o.createComponentVNode)(2,i.ProgressBar,{content:u.has_cell?u.cell_charge+" W out of "+u.cell_maxcharge+" W":"No cell inserted",value:u.cell_charge/u.cell_maxcharge,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Structural Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.health/u.health_max,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Rounds",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.rounds/u.rounds_max,content:u.rounds+" out of "+u.rounds_max,ranges:{good:[.67,Infinity],average:[.33,.67],bad:[-Infinity,.33]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.burst_fire,onClick:function(){return c("burst")},icon:u.burst_fire?"step-forward":"play",disabled:!u.is_on,children:"Burst Fire"}),label:"Burst Fire"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return c("burstup")},icon:"plus",disabled:!u.is_on}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,ml:1,children:u.burst_size}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return c("burstdown")},icon:"minus",disabled:!u.is_on})],4),label:"Burst Count"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.safety_toggle,onClick:function(){return c("safety")},icon:u.safety_toggle?"check":"times",disabled:!u.is_on,children:"Safety"}),label:"Weapon Safety",children:u.safety_toggle?"Only Xenos":"Everything"}),!u.mini&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.manual_override,onClick:function(){return c("manual")},icon:u.manual_override?"check":"times",disabled:!u.is_on,children:"Manual Override"}),label:"Manual Override"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.radial_mode,onClick:function(){return c("toggle_radial")},icon:u.radial_mode?"check":"times",disabled:!u.is_on,children:"Radial Mode"}),label:"Radial Mode"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{buttons:(0,o.createComponentVNode)(2,i.Button,{selected:u.alerts_on,onClick:function(){return c("toggle_alert")},icon:u.alerts_on?"check":"times",disabled:!u.is_on,children:"Alert Mode"}),label:"Alert Mode"})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulatorModification=t.ShuttleManipulatorTemplates=t.ShuttleManipulatorStatus=t.ShuttleManipulator=void 0;var o=n(1),r=n(55),i=n(4),a=n(5),c=n(7);t.ShuttleManipulator=function(e,t){var n=(0,i.useLocalState)(t,"tab",1),r=n[0],d=n[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===r,onClick:function(){return d(1)},children:"Status"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===r,onClick:function(){return d(2)},children:"Templates"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===r,onClick:function(){return d(3)},children:"Modification"})]}),1===r&&(0,o.createComponentVNode)(2,u),2===r&&(0,o.createComponentVNode)(2,l),3===r&&(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.shuttles||[];return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{children:c.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,{content:"JMP",onClick:function(){return r("jump_to",{type:"mobile",id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Fly",disabled:!e.can_fly,onClick:function(){return r("fly",{id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.status}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.mode,!!e.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),e.timeleft,(0,o.createTextVNode)(")"),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",disabled:!e.can_fast_travel,onClick:function(){return r("fast_travel",{id:e.id})}},e.id)],0)]})]},e.id)}))})})};t.ShuttleManipulatorStatus=u;var l=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,l=c.data,s=l.templates||{},d=l.selected||{},f=(0,i.useLocalState)(t,"templateId",Object.keys(s)[0]),p=f[0],h=f[1],m=null==(n=s[p])?void 0:n.templates;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:p===t,onClick:function(){return h(t)},children:e.port_id},t)}))(s)})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:m.map((function(e){var t=e.shuttle_id===d.shuttle_id;return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:t?"Selected":"Select",selected:t,onClick:function(){return u("select_template",{shuttle_id:e.shuttle_id})}}),children:(!!e.description||!!e.admin_notes)&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),!!e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes})]})},e.shuttle_id)}))})]})})};t.ShuttleManipulatorTemplates=l;var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,u=c.selected||{},l=c.existing_shuttle||{};return(0,o.createComponentVNode)(2,a.Section,{children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{level:2,title:u.name,children:(!!u.description||!!u.admin_notes)&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:u.description}),!!u.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:u.admin_notes})]})}),l?(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Existing Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",onClick:function(){return r("jump_to",{type:"mobile",id:l.id})}}),children:[l.status,!!l.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),l.timeleft,(0,o.createTextVNode)(")")],0)]})})}):(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Existing Shuttle: None"}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",onClick:function(){return r("preview",{shuttle_id:u.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",color:"bad",onClick:function(){return r("load",{shuttle_id:u.shuttle_id})}})]})],0):"No shuttle selected"})};t.ShuttleManipulatorModification=s},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(1),r=n(4),i=n(5),a=n(55),c=n(7);t.SmartVend=function(e,t){var n=(0,r.useBackend)(t),u=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Storage",buttons:!!l.isdryer&&(0,o.createComponentVNode)(2,i.Button,{icon:l.drying?"stop":"tint",onClick:function(){return u("Dry")},children:l.drying?"Stop drying":"Dry"})}),(0,o.createComponentVNode)(2,i.Section,{children:0===l.contents.length?(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Unfortunately, this ",l.name," is empty."]}):(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Item"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Quantity"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:l.verb?l.verb:"Dispense"})]}),(0,a.map)((function(e,t){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.amount}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{disabled:e.amount<1,onClick:function(){return u("Release",{name:e.name,amount:1})},children:"One"}),(0,o.createComponentVNode)(2,i.Button,{disabled:e.amount<=1,onClick:function(){return u("Release",{name:e.name})},children:"Many"})]})]},t)}))(l.contents)]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(1),r=n(4),i=n(5),a=n(453),c=n(7);t.Smes=function(e,t){var n=(0,r.useBackend)(t),u=n.act,l=n.data,s=l.capacityPercent,d=(l.capacity,l.charge),f=l.inputAttempt,p=l.inputting,h=l.inputLevel,m=l.inputLevelMax,v=l.inputAvailable,g=l.outputAttempt,C=l.outputting,y=l.outputLevel,b=l.outputLevelMax,N=l.outputUsed,V=(s>=100?"good":p&&"average")||"bad",_=(C?"good":d>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*s,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:f?"sync-alt":"times",selected:f,onClick:function(){return u("tryinput")},children:f?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:V,children:(s>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return u("input",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===h,onClick:function(){return u("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:h/1e3,fillValue:v/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onDrag:function(e,t){return u("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:h===m,onClick:function(){return u("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:h===m,onClick:function(){return u("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available",children:(0,a.formatPower)(v)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return u("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:_,children:C?"Sending":d>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===y,onClick:function(){return u("output",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===y,onClick:function(){return u("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:y/1e3,minValue:0,maxValue:b/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onDrag:function(e,t){return u("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:y===b,onClick:function(){return u("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:y===b,onClick:function(){return u("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outputting",children:(0,a.formatPower)(N)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.formatMoney=t.formatPower=void 0;var o=n(44),r=["f","p","n","\u03bc","m"," ","k","M","G","T","P","E","Z","Y"],i=r.indexOf(" ");t.formatPower=function(e,t){return void 0===t&&(t=0),function(e,t,n){void 0===t&&(t=-i),void 0===n&&(n="");var a=Math.floor(Math.log10(e)),c=Math.floor(Math.max(3*t,a)),u=Math.floor(a/3),l=Math.floor(c/3),s=(0,o.clamp)(i+l,0,r.length),d=r[s],f=e/Math.pow(1e3,l),p=u>t?2+3*l-c:0;return((0,o.toFixed)(f,p)+" "+d+n).trim()}(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,i=n.indexOf(".");-1===i&&(i=r);for(var a="",c=0;c0&&c0||a.isshared>0)&&(0,o.createComponentVNode)(2,s),a.hidden_records.length>0&&!!a.extended&&(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,p)],0)}),2)],4)]})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"You have selected "+c.currently_vending_name,children:(0,o.createComponentVNode)(2,i.Box,{children:["Please swipe your ID to pay for the article.",(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("swipe")},icon:"id-card",ml:1,children:"Swipe"}),(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return a("cancel_buying")},icon:"times",children:"Cancel"})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,u=c.coin_records,l=c.coin_stock,s=c.coin;return(0,o.createComponentVNode)(2,i.Section,{title:"Coin slot: "+(s||"No coin inserted"),buttons:s&&(0,o.createComponentVNode)(2,i.Button,{icon:"donate",onClick:function(){return a("remove_coin")},children:"Remove"}),children:!!s&&(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(0,o.createComponentVNode)(2,d,{stock:l[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.currently_vending_index,s=e.stock,d=e.prod_index,f=e.prod_cat,p=e.product_color,h=e.product_name,m=e.prod_desc,v=(0,r.useLocalState)(t,"showDesc",null),g=(v[0],v[1]);return(0,o.createComponentVNode)(2,u.LabeledListItem,{labelColor:"white",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.ProgressBar,{width:"60px",value:s,maxValue:s,ranges:{good:[10,Infinity],average:[5,10],bad:[-Infinity,5]},children:[s," left"]}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,width:"4px"}),(0,o.createComponentVNode)(2,i.Button,{selected:l===d,onClick:function(){return c("vend",{vend:d,cat:f})},disabled:!s,children:(0,o.createComponentVNode)(2,i.Box,{color:p,bold:1,children:"Vend"})})],4),label:(0,a.decodeHtmlEntities)(h),children:!!m&&(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return g(m)},children:"?"})})},f=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.hidden_records,u=a.hidden_stock;return(0,o.createComponentVNode)(2,i.Section,{title:"$*FD!!F",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(0,o.createComponentVNode)(2,d,{stock:u[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=(0,r.useLocalState)(t,"showEmpty",0),u=c[0],l=(c[1],a.displayed_records),s=a.displayed_stock;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"No product loaded!"}):l.map((function(e){var t=e.id,n=e.prod_index,r=e.prod_cat,i=e.product_color,a=e.product_name,c=e.prod_desc;return(u||!!s[n])&&(0,o.createComponentVNode)(2,d,{stock:s[n],prod_index:n,prod_cat:r,product_color:i,product_name:a,prod_desc:c},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(1),r=n(4),i=n(5),a=n(7);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,l=u.wires||[],s=u.status||[];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{className:"candystripe",label:e.color,labelColor:e.color,color:e.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.color)}))})}),!!s.length&&(0,o.createComponentVNode)(2,i.Section,{children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]})})}}]);
\ No newline at end of file