diff --git a/code/game/Rogue Star/icons/itemicons/borkmedigun.dmi b/code/game/Rogue Star/icons/itemicons/borkmedigun.dmi new file mode 100644 index 00000000000..121e3c2f2be Binary files /dev/null and b/code/game/Rogue Star/icons/itemicons/borkmedigun.dmi differ diff --git a/code/game/Rogue Star/weapons/Medigun/bork_medigun.dm b/code/game/Rogue Star/weapons/Medigun/bork_medigun.dm new file mode 100644 index 00000000000..97a5a9299d8 --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/bork_medigun.dm @@ -0,0 +1,119 @@ +#define MEDIGUN_IDLE 0 +#define MEDIGUN_CANCELLED 1 +#define MEDIGUN_BUSY 2 + +/obj/item/device/bork_medigun + name = "prototype bluespace medigun" + desc = "The Bork BSM-92 or 'Blue Space Medigun' utilizes advanced bluespace technology to transfer beneficial reagents directly to torn tissue. This way, even larger wounds can be mended efficiently in short periods of time" + icon = 'code/game/Rogue Star/icons/itemicons/borkmedigun.dmi' + icon_state = "medblaster" + var/wielded_item_state = "medblaster-wielded" + var/base_icon_state = "medblaster" + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_guns_rs.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_guns_rs.dmi', + ) + w_class = ITEMSIZE_HUGE + force = 0 + var/beam_range = 3 // How many tiles away it can scan. Changing this also changes the box size. + var/busy = MEDIGUN_IDLE // Set to true when scanning, to stop multiple scans. + var/action_cancelled = FALSE + var/wielded = FALSE + var/mob/current_target + var/mgcmo + canremove = FALSE + +/obj/item/device/bork_medigun/update_twohanding() + var/mob/living/M = loc + if(istype(M) && M.item_is_in_hands(src) && !M.hands_are_full()) + wielded = TRUE + name = "[initial(name)] (wielded)" + else + wielded = FALSE + name = initial(name) + ..() + +/obj/item/device/bork_medigun/update_held_icon() + if(wielded_item_state) + var/mob/living/M = loc + if(istype(M)) + if(M.can_wield_item(src) && src.is_held_twohanded(M)) + LAZYSET(item_state_slots, slot_l_hand_str, wielded_item_state) + LAZYSET(item_state_slots, slot_r_hand_str, wielded_item_state) + else + LAZYSET(item_state_slots, slot_l_hand_str, initial(item_state)) + LAZYSET(item_state_slots, slot_r_hand_str, initial(item_state)) + ..() + +// Draws a box showing the limits of movement while scanning something. +// Only the client supplied will see the box. +/obj/item/device/bork_medigun/proc/draw_box(atom/A, box_size, client/C) + var/list/our_box = list() + // Things moved with pixel_[x|y] will move the box, so this is to correct that. + var/pixel_x_correction = -A.pixel_x + var/pixel_y_correction = -A.pixel_y + + var/our_icon_size = world.icon_size + // First, place the bottom-left corner. + our_box += draw_line(A, SOUTHWEST, (-box_size * our_icon_size) + pixel_x_correction, (-box_size * our_icon_size) + pixel_y_correction, C) + + var/rendered_size = (box_size * 2) - 1 + // Make a line on the bottom, going right. + for(var/i = 1 to rendered_size) + var/x_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_x_correction + var/y_displacement = (-box_size * our_icon_size) + pixel_y_correction + our_box += draw_line(A, SOUTH, x_displacement, y_displacement, C) + + // Bottom-right corner. + our_box += draw_line(A, SOUTHEAST, (box_size * our_icon_size) + pixel_x_correction, (-box_size * our_icon_size) + pixel_y_correction, C) + + // Second line, for the right side going up. + for(var/i = 1 to rendered_size) + var/x_displacement = (box_size * our_icon_size) + pixel_x_correction + var/y_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_y_correction + our_box += draw_line(A, EAST, x_displacement, y_displacement, C) + + // Top-right corner. + our_box += draw_line(A, NORTHEAST, (box_size * our_icon_size) + pixel_x_correction, (box_size * our_icon_size) + pixel_y_correction, C) + + // Third line, for the top, going right. + for(var/i = 1 to rendered_size) + var/x_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_x_correction + var/y_displacement = (box_size * our_icon_size) + pixel_y_correction + our_box += draw_line(A, NORTH, x_displacement, y_displacement, C) + + // Top-left corner. + our_box += draw_line(A, NORTHWEST, (-box_size * our_icon_size) + pixel_x_correction, (box_size * our_icon_size) + pixel_y_correction, C) + + // Fourth and last line, for the left side going up. + for(var/i = 1 to rendered_size) + var/x_displacement = (-box_size * our_icon_size) + pixel_x_correction + var/y_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_y_correction + our_box += draw_line(A, WEST, x_displacement, y_displacement, C) + return our_box + +// Draws an individual segment of the box. +/obj/item/device/bork_medigun/proc/draw_line(atom/A, line_dir, line_pixel_x, line_pixel_y, client/C) + var/image/line = image(icon = 'icons/effects/effects.dmi', loc = A, icon_state = "stripes", dir = line_dir) + line.pixel_x = line_pixel_x + line.pixel_y = line_pixel_y + line.plane = PLANE_FULLSCREEN // It's technically a HUD element but it doesn't need to show above item slots. + line.appearance_flags = RESET_TRANSFORM|RESET_COLOR|RESET_ALPHA|NO_CLIENT_COLOR|TILE_BOUND + line.alpha = 125 + C.images += line + return line + +// Removes the box that was generated before from the client. +/obj/item/device/bork_medigun/proc/delete_box(list/box_segments, client/C) + for(var/i in box_segments) + C.images -= i + qdel(i) + +/obj/item/device/bork_medigun/proc/color_box(list/box_segments, new_color, new_time) + for(var/i in box_segments) + animate(i, color = new_color, time = new_time) + +/obj/item/device/bork_medigun/attack_hand(mob/user) + if(user.get_inactive_hand() == src)// && loc != get_turf) + return + return ..() diff --git a/code/game/Rogue Star/weapons/Medigun/linked_medigun.dm b/code/game/Rogue Star/weapons/Medigun/linked_medigun.dm new file mode 100644 index 00000000000..ac6321272f8 --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/linked_medigun.dm @@ -0,0 +1,293 @@ +/obj/item/device/bork_medigun/linked + var/obj/item/device/medigun_backpack/medigun_base_unit + +/obj/item/device/bork_medigun/linked/Initialize(mapload, var/obj/item/device/medigun_backpack/backpack) + . = ..() + medigun_base_unit = backpack + if(!medigun_base_unit.is_twohanded()) + icon_state = "medblaster_cmo" + base_icon_state = "medblaster_cmo" + wielded_item_state = "" + update_icon() + +/obj/item/device/bork_medigun/linked/Destroy() + if(medigun_base_unit) + //ensure the base unit's icon updates + if(medigun_base_unit.medigun == src) + medigun_base_unit.medigun = null + medigun_base_unit.replace_icon() + if(ismob(loc)) + var/mob/user = loc + user.update_inv_back() + medigun_base_unit = null + return ..() + +/obj/item/device/bork_medigun/linked/forceMove(atom/destination) //Forcemove override, ugh + if(destination == medigun_base_unit || destination == medigun_base_unit.loc || isturf(destination)) + . = doMove(destination, 0, 0) + if(isturf(destination)) + for(var/atom/A as anything in destination) // If we can't scan the turf, see if we can scan anything on it, to help with aiming. + if(istype(A,/obj/structure/closet )) + break + if(ismob(medigun_base_unit.loc)) + var/mob/user = medigun_base_unit.loc + medigun_base_unit.reattach_medigun(user) + +/obj/item/device/bork_medigun/linked/dropped(mob/user) + ..() //update twohanding + + if(medigun_base_unit.containsgun == 0) + //to_chat(user, span_warning("[loc]")) + if(medigun_base_unit) + + //to_chat(user, span_warning("Dropped")) + medigun_base_unit.reattach_medigun(user) //medigun attached to a base unit should never exist outside of their base unit or the mob equipping the base unit + +/obj/item/device/bork_medigun/linked/proc/check_charge(var/charge_amt) + return (medigun_base_unit.bcell && medigun_base_unit.bcell.check_charge(charge_amt)) + +/obj/item/device/bork_medigun/linked/proc/checked_use(var/charge_amt) + return (medigun_base_unit.bcell && medigun_base_unit.bcell.checked_use(charge_amt)) + +/obj/item/device/bork_medigun/linked/attack_self(mob/living/user) + if(medigun_base_unit.is_twohanded()) + update_twohanding() + if(busy) + busy = MEDIGUN_CANCELLED + +/obj/item/device/bork_medigun/linked/proc/should_stop(var/mob/living/target, var/mob/living/user, var/active_hand) + if(!target || !user || (!active_hand && medigun_base_unit.is_twohanded()) || !istype(target) || !istype(user) || busy < MEDIGUN_BUSY) + return TRUE + + if((user.get_active_hand() != active_hand || wielded == 0) && medigun_base_unit.is_twohanded()) + to_chat(user, span_warning("Please keep your hands free!")) + return TRUE + + if(user.incapacitated(INCAPACITATION_ALL)) + return TRUE + + if(user.stat) + return TRUE + + if(target.isSynthetic()) + to_chat(user, span_warning("Target is not organic.")) + return TRUE + + //if(get_dist(user, target) > beam_range) + if(!(target in range(beam_range, user)) || (!(target in view(10, user)) && !(medigun_base_unit.smodule.get_rating() >= 5))) + to_chat(user, span_warning("You are too far away from \the [target] to heal them, Or they are not in view. Get closer.")) + return TRUE + + if(!isliving(target)) + //to_chat(user, span_warning("\the [target] is not a valid target.")) + return TRUE + + if(!ishuman(target)) + return TRUE + + /*if(!H.getBruteLoss() && !H.getFireLoss() && !H.getToxLoss())// && !H.getOxyLoss()) // No point Wasting fuel/power if target healed + playsound(src, 'sound/machines/ping.ogg', 50) + to_chat(user, span_warning("\the [target] is fully healed.")) + return TRUE + */ + return FALSE + +/obj/item/device/bork_medigun/linked/afterattack(atom/target, mob/user, proximity_flag) + // Things that invalidate the scan immediately. + if(isturf(target)) + for(var/atom/A as anything in target) // If we can't scan the turf, see if we can scan anything on it, to help with aiming. + if(isliving(A)) + target = A + break + if(!istype(medigun_base_unit, /obj/item/device/medigun_backpack/cmo)) + update_twohanding() + if(busy && !(target == current_target) && isliving(target)) + to_chat(user, span_warning("\The [src] is already targeting something.")) + return + + if(!ishuman(target)) + return + + if(!medigun_base_unit.smanipulator) + to_chat(user, span_warning("\The [src] Blinks a red error light, Manipulator missing.")) + return + if(!medigun_base_unit.scapacitor) + to_chat(user, span_warning("\The [src] Blinks a blue error light, capacitor missing.")) + return + if(!medigun_base_unit.slaser) + to_chat(user, span_warning("\The [src] Blinks an orange error light, laser missing.")) + return + if(!medigun_base_unit.smodule) + to_chat(user, span_warning("\The [src] Blinks a pink error light, scanning module missing.")) + return + if(!check_charge(5)) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + return + if(get_dist(target, user) > beam_range) + to_chat(user, span_warning("You are too far away from \the [target] to affect it. Get closer.")) + return + + if(target == current_target && busy) + busy = MEDIGUN_CANCELLED + return + if(target == user) + to_chat(user, span_warning("Cant heal yourself.")) + return + if(!(target in range(beam_range, user)) || (!(target in view(10, user)) && !medigun_base_unit.smodule)) + to_chat(user, span_warning("You are too far away from \the [target] to heal them, Or they are not in view. Get closer.")) + return + + current_target = target + busy = MEDIGUN_BUSY + update_icon() + var/myicon = "medbeam_basic" + var/mycolor = "#037ffc" + if(medigun_base_unit.kenzie) + myicon = "medbeam_basic_kenzie" + mycolor = "#8a18ad" + var/datum/beam/scan_beam = user.Beam(target, icon = 'code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', icon_state = myicon, time = 6000) + var/filter = filter(type = "outline", size = 1, color = mycolor) + var/list/box_segments = list() + playsound(src, 'sound/weapons/wave.ogg', 50) + var/mob/living/carbon/human/H = target + to_chat(user, span_notice("Locking on to [H]")) + to_chat(H, span_warning("[user] is targetting you with their medigun")) + if(user.client) + box_segments = draw_box(target, beam_range, user.client) + color_box(box_segments, mycolor, 5) + process_medigun(H, user, filter) + + action_cancelled = FALSE + busy = MEDIGUN_IDLE + current_target = null + + // Now clean up the effects. + update_icon() + QDEL_NULL(scan_beam) + target.filters -= filter + if(user.client) // If for some reason they logged out mid-scan the box will be gone anyways. + delete_box(box_segments, user.client) + +/obj/item/device/bork_medigun/linked/proc/process_medigun(mob/living/carbon/human/H, mob/user, filter, ishealing = FALSE) + if(should_stop(H, user, user.get_active_hand())) + return + + if(do_after(user, 10, ignore_movement = TRUE, needhand = medigun_base_unit.is_twohanded())) + var/washealing = ishealing // Did we heal last cycle + ishealing = FALSE // The default is 'we didn't heal this cycle' + if(!checked_use(5)) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + return + if(H.stat == DEAD) + process_medigun(H, user, filter) + return + var/lastier = medigun_base_unit.slaser.get_rating() + //if(lastier >= 5) + H.add_modifier(/datum/modifier/medbeameffect, 2 SECONDS) + + var/healmod = lastier + /*if(H.getBruteLoss()) + healmod = min(lastier,medigun_base_unit.brutecharge,H.getBruteLoss()) + if(medigun_base_unit.brutecharge >= healmod) + if(!checked_use(healmod)) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + break + if(healmod < 0) + healmod = 0 + else + H.adjustBruteLoss(-healmod) + medigun_base_unit.brutecharge -= healmod + ishealing = 1 + if(H.getFireLoss()) + healmod = min(lastier,medigun_base_unit.burncharge,H.getFireLoss()) + if(medigun_base_unit.burncharge >= healmod) + if(!checked_use(healmod)) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + break + if(healmod < 0) + healmod = 0 + else + H.adjustFireLoss(-healmod) + medigun_base_unit.burncharge -= healmod + ishealing = 1*/ + if(H.getToxLoss()) + healmod = min(lastier,medigun_base_unit.toxcharge,H.getToxLoss()) + if(medigun_base_unit.toxcharge >= healmod) + if(!checked_use(healmod)) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + return + if(healmod < 0) + healmod = 0 + else + H.adjustToxLoss(-healmod) + medigun_base_unit.toxcharge -= healmod + ishealing = TRUE + if(H.getOxyLoss()) + healmod = min(10*lastier,H.getOxyLoss()) + if(!checked_use(min(10,healmod))) + to_chat(user, span_warning("\The [src] doesn't have enough charge left to do that.")) + return + H.adjustOxyLoss(-healmod) + ishealing = TRUE + + ishealing = process_wounds(H, lastier, lastier, ishealing) + //if(medigun_base_unit.brutecharge <= 0 || medigun_base_unit.burncharge <= 0 || medigun_base_unit.toxcharge <= 0) + medigun_base_unit.update_icon() + //if(medigun_base_unit.slaser.get_rating() >= 5) + + //Blood regeneration if there is some space + if(lastier >= 5) + if(H.vessel.get_reagent_amount("blood") < H.species.blood_volume) + var/datum/reagent/blood/B = locate() in H.vessel.reagent_list //Grab some blood + B.volume += min(5, (H.species.blood_volume - H.vessel.get_reagent_amount("blood")))// regenerate blood + + if(ishealing != washealing) // Either we stopped or started healing this cycle + if(ishealing) + H.filters += filter + else + H.filters -= filter + + process_medigun(H, user, filter, ishealing) + +/obj/item/device/bork_medigun/linked/proc/process_wounds(mob/living/carbon/human/H, heal_ticks, remaining_strength, ishealing) + while(heal_ticks > 0) + if(remaining_strength <= 0) + return ishealing + if((!H.getFireLoss() || medigun_base_unit.burncharge <= 0) && (!H.getBruteLoss() || medigun_base_unit.burncharge <= 0)) + return ishealing + + for(var/name in BP_ALL) + var/obj/item/organ/external/O = H.organs_by_name[name] + for(var/datum/wound/W in O.wounds) + if (W.internal) + continue + //if (W.bandaged && W.disinfected) + // continue + if (W.damage_type == BRUISE || W.damage_type == CUT || W.damage_type == PIERCE) + if(medigun_base_unit.brutecharge >= 1) + if(W.damage <= 1) + O.wounds -= W + medigun_base_unit.brutecharge -= 1 + ishealing = TRUE + else if(medigun_base_unit.brutecharge >= 1) + W.damage -= 1 + medigun_base_unit.brutecharge -= 1 + remaining_strength -= 1 + ishealing = TRUE + if (W.damage_type == BURN) + if(medigun_base_unit.burncharge >= 1) + if(W.damage <= 1) + O.wounds -= W + medigun_base_unit.burncharge -= 1 + ishealing = TRUE + else if(medigun_base_unit.burncharge >= 1) + W.damage -= 1 + medigun_base_unit.burncharge -= 1 + remaining_strength -= 1 + ishealing = TRUE + if(remaining_strength <= 0) + return ishealing + if(remaining_strength <= 0) + return ishealing + heal_ticks-- + return ishealing diff --git a/code/game/Rogue Star/weapons/Medigun/medigun_backpack.dm b/code/game/Rogue Star/weapons/Medigun/medigun_backpack.dm new file mode 100644 index 00000000000..562a78a8ebc --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/medigun_backpack.dm @@ -0,0 +1,614 @@ +//backpack item +/obj/item/device/medigun_backpack + name = "protoype bluespace medigun backpack" + desc = "Contains a bluespace medigun, this portable unit digitizes and stores chems and battery power used by the attached gun." + icon = 'code/game/Rogue Star/icons/itemicons/borkmedigun.dmi' + icon_override = 'code/game/Rogue Star/icons/itemicons/borkmedigun.dmi' + icon_state = "mg-backpack" + item_state = "mg-backpack-onmob" + slot_flags = SLOT_BACK + force = 5 + throwforce = 6 + preserve_item = TRUE + w_class = ITEMSIZE_HUGE + unacidable = TRUE + origin_tech = list(TECH_BIO = 4, TECH_POWER = 2, TECH_BLUESPACE = 4) + action_button_name = "Remove/Replace medigun" + + var/obj/item/device/bork_medigun/linked/medigun + var/obj/item/weapon/cell/bcell = /obj/item/weapon/cell + var/obj/item/weapon/stock_parts/matter_bin/sbin = /obj/item/weapon/stock_parts/matter_bin + var/obj/item/weapon/stock_parts/scanning_module/smodule = /obj/item/weapon/stock_parts/scanning_module + var/obj/item/weapon/stock_parts/manipulator/smanipulator = /obj/item/weapon/stock_parts/manipulator + var/obj/item/weapon/stock_parts/capacitor/scapacitor = /obj/item/weapon/stock_parts/capacitor + var/obj/item/weapon/stock_parts/micro_laser/slaser = /obj/item/weapon/stock_parts/micro_laser + var/charging = FALSE + var/phoronvol = 0 + var/brutecharge = 0 + var/toxcharge = 0 + var/burncharge = 0 + var/brutevol = 0 + var/toxvol = 0 + var/burnvol = 0 + var/chemcap = 60 + var/tankmax = 30 + var/containsgun = TRUE + var/maintenance = FALSE + var/smaniptier = 1 + var/sbintier = 1 + var/gridstatus = 0 + var/chargecap = 1000 + var/kenzie = FALSE + +//backpack item +/obj/item/device/medigun_backpack/cmo + name = "prototype bluespace medigun backpack - CMO" + desc = "Contains a compact version of the bluespace medigun able to be used one handed, this portable unit digitizes and stores chems and battery power used by the attached gun." + icon_state = "mg-backpack_cmo" + item_state = "mg-backpack_cmo-onmob" + scapacitor = /obj/item/weapon/stock_parts/capacitor/adv + smanipulator = /obj/item/weapon/stock_parts/manipulator/nano + smodule = /obj/item/weapon/stock_parts/scanning_module/adv + slaser = /obj/item/weapon/stock_parts/micro_laser/high + bcell = /obj/item/weapon/cell/apc + tankmax = 60 + brutecharge = 60 + toxcharge = 60 + burncharge = 60 + chemcap = 120 + brutevol = 120 + toxvol = 120 + burnvol = 120 + chargecap = 5000 + +/obj/item/device/medigun_backpack/proc/is_twohanded() + return TRUE + +/obj/item/device/medigun_backpack/cmo/is_twohanded() + return FALSE + +/obj/item/device/medigun_backpack/proc/apc_charge() + gridstatus = 0 + var/area/A = get_area(src) + if(!istype(A) || !A.powered(EQUIP)) + return FALSE + gridstatus = 1 + if(bcell && (bcell.charge < bcell.maxcharge)) + var/cur_charge = bcell.charge + var/delta = min(50, bcell.maxcharge-cur_charge) + bcell.give(delta) + A.use_power_oneoff(delta*100, EQUIP) + gridstatus = 2 + if(charging && ismob(loc)) + to_chat(loc, span_notice("With the grid connection enabled, the phoron generator sputters then stops.")) + charging = FALSE + return TRUE + +/obj/item/device/medigun_backpack/proc/adjust_brutevol(modifier) + if(modifier > brutevol) + modifier = brutevol + if(modifier > (tankmax - brutecharge)) + modifier = tankmax - brutecharge + brutevol -= modifier + brutecharge += modifier + +/obj/item/device/medigun_backpack/proc/adjust_burnvol(modifier) + if(modifier > burnvol) + modifier = burnvol + if(modifier > (tankmax - burncharge)) + modifier = tankmax - burncharge + burnvol -= modifier + burncharge += modifier + +/obj/item/device/medigun_backpack/proc/adjust_toxvol(modifier) + if(modifier > toxvol) + modifier = toxvol + if(modifier > (tankmax - toxcharge)) + modifier = tankmax - toxcharge + toxvol -= modifier + toxcharge += modifier + +/obj/item/device/medigun_backpack/process() + if(!bcell) + return + + if(bcell.charge >= 10) + var/icon_needs_update = FALSE + if(brutecharge < tankmax && brutevol > 0 && (bcell.checked_use(smaniptier * 2))) + adjust_brutevol(smaniptier * 2) + icon_needs_update = TRUE + if(burncharge < tankmax && burnvol > 0 && (bcell.checked_use(smaniptier * 2))) + adjust_burnvol(smaniptier * 2) + icon_needs_update = TRUE + if(toxcharge < tankmax && toxvol > 0 && (bcell.checked_use(smaniptier * 2))) + adjust_toxvol(smaniptier * 2) + icon_needs_update = TRUE + //Alien tier + if(sbintier >= 5 && medigun.busy == MEDIGUN_IDLE && (bcell.charge >= 10)) + if(brutevol < chemcap && (bcell.checked_use(10))) + icon_needs_update = TRUE + brutevol ++ + if(burnvol < chemcap && (bcell.checked_use(10))) + icon_needs_update = TRUE + burnvol ++ + if(toxvol < chemcap && (bcell.checked_use(10))) + icon_needs_update = TRUE + toxvol ++ + + if(icon_needs_update) + update_icon() + else if(!charging && phoronvol > 0) + if(ismob(loc)) + to_chat(loc, span_warning("With a sudden whirr, the phoron generator spins up.")) + charging = TRUE + + if(scapacitor.get_rating() >= 5) + apc_charge() + + if(!charging) + return + + if((bcell.amount_missing() >= 50)) + if(phoronvol > 0) + phoronvol -- + bcell.give(50) + update_icon() + return + + if(ismob(loc)) + to_chat(loc, span_notice("The phoron generator sputters then stops.")) + charging = FALSE + +/obj/item/device/medigun_backpack/get_cell() + return bcell + +/obj/item/device/medigun_backpack/update_icon() + . = ..() + cut_overlays() + if((bcell.percent() <= 5 )) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "no_battery")) + else if((bcell.percent() <= 25 && bcell.percent() > 5)) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "low_battery")) + + if(brutevol <= 0 && brutecharge > 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "red")) + else if(brutecharge <= 0 && brutevol <= 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "redstrike-blink")) + + if(toxvol <= 0 && toxcharge > 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "green")) + else if(toxcharge <= 0 && toxvol <= 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "greenstrike-blink")) + + if(burnvol <= 0 && burncharge > 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "orange")) + else if(burncharge <= 0 && burnvol <= 0) + add_overlay(image('code/game/Rogue Star/icons/itemicons/borkmedigun.dmi', "orangestrike-blink")) + +/obj/item/device/medigun_backpack/proc/replace_icon(inhand) + var/special = null + if(kenzie) + special = "-kenzie" + if(inhand) + icon_state = "mg-backpack-deployed[special]" + item_state = "mg-backpack-deployed-onmob[special]" + if(is_twohanded()) + medigun.icon_state = "medblaster[special]" + medigun.base_icon_state = "medblaster[special]" + medigun.wielded_item_state = "medblaster[special]-wielded" + medigun.update_icon() + else + medigun.icon_state = "medblaster_cmo[special]" + medigun.base_icon_state = "medblaster_cmo[special]" + medigun.wielded_item_state = "" + medigun.update_icon() + else if(is_twohanded()) + icon_state = "mg-backpack[special]" + item_state = "mg-backpack-onmob[special]" + medigun.icon_state = "medblaster[special]" + medigun.base_icon_state = "medblaster[special]" + else + icon_state = "mg-backpack_cmo[special]" + item_state = "mg-backpack_cmo-onmob[special]" + medigun.icon_state = "medblaster_cmo[special]" + medigun.base_icon_state = "medblaster_cmo[special]" + + update_icon() + +/obj/item/device/medigun_backpack/Initialize(mapload) + . = ..() + if(ispath(medigun)) + medigun = new medigun(src, src) + else + medigun = new(src, src) + if(!is_twohanded()) + medigun.beam_range = 4 + if(ispath(bcell)) + bcell = new bcell(src) + if(ispath(sbin)) + sbin = new sbin(src) + if(ispath(smodule)) + smodule = new smodule(src) + START_PROCESSING(SSobj, src) + if(ispath(smanipulator)) + smanipulator = new smanipulator(src) + if(ispath(scapacitor)) + scapacitor = new scapacitor(src) + if(ispath(slaser)) + slaser = new slaser(src) + update_icon() + + +/obj/item/device/medigun_backpack/Destroy() + STOP_PROCESSING(SSobj, src) + QDEL_NULL(medigun) + QDEL_NULL(bcell) + QDEL_NULL(smodule) + QDEL_NULL(smanipulator) + QDEL_NULL(scapacitor) + QDEL_NULL(slaser) + . = ..() + +/obj/item/device/medigun_backpack/equipped(var/mob/user, var/slot) + + //to_chat(world, span_notice("bark [user.real_name] \ [slot] \ [user.ckey]")) + if(slot == slot_back || slot == slot_s_store) + if(user.real_name == "Kenzie Houser" && user.ckey == "memewuff") + kenzie = TRUE + to_chat(user, span_notice("Epic Lasagna Wolf Detected, Engaging BAD ASS MODE.")) + else + kenzie = FALSE + //to_chat(world, span_notice("Not Kenzie")) + replace_icon() + ..() + +/obj/item/device/medigun_backpack/ui_action_click() + if(charging) + to_chat(usr, span_notice("You disable the phoron generator.")) + charging = FALSE + return + + if(phoronvol > 0) + to_chat(usr, span_notice("You enable the phoron generator.")) + charging = TRUE + return + + to_chat(usr, span_warning("Not Enough Phoron stored.")) + +/obj/item/device/medigun_backpack/emp_act(severity) + . = ..() + if(bcell) + bcell.emp_act(severity) + +/obj/item/device/medigun_backpack/attack_hand(mob/user) + /*if(maintenance) + maintenance = FALSE + to_chat(user, span_notice("You close the maintenance hatch on \the [src].")) + return*/ + + if(loc == user) + toggle_medigun() + return + + ..() + +/obj/item/device/medigun_backpack/MouseDrop() + if(ismob(src.loc)) + if(!CanMouseDrop(src)) + return + var/mob/M = src.loc + if(!M.unEquip(src)) + return + src.add_fingerprint(usr) + M.put_in_any_hand_if_possible(src) + /*icon_state = "mg-backpack" + item_state = "mg-backpack-onmob" + update_icon() //success + usr.update_inv_back()*/ + + +/obj/item/device/medigun_backpack/attackby(obj/item/weapon/W, mob/user, params) + if(refill_reagent(W, user)) + return + if(W == medigun) + //to_chat(user, span_warning("backpack clicked with gun")) + reattach_medigun(user) + return + if(W.is_crowbar() && maintenance) + if(smodule ) + smodule.forceMove(get_turf(loc)) + smodule = null + + if(smanipulator) + STOP_PROCESSING(SSobj, src) + smanipulator.forceMove(get_turf(loc)) + smanipulator = null + smaniptier = 0 + + if(slaser) + slaser.forceMove(get_turf(loc)) + slaser = null + + if(scapacitor) + STOP_PROCESSING(SSobj, src) + scapacitor.forceMove(get_turf(loc)) + scapacitor = null + + if(sbin) + STOP_PROCESSING(SSobj, src) + sbin.forceMove(get_turf(loc)) + sbin = null + sbintier = 0 + + to_chat(user, span_notice("You remove the Components from \the [src].")) + update_icon() + return TRUE + + if(W.is_screwdriver()) + if(!maintenance) + maintenance = TRUE + to_chat(user, span_notice("You open the maintenance hatch on \the [src].")) + reattach_medigun(user) + return + + maintenance = FALSE + to_chat(user, span_notice("You close the maintenance hatch on \the [src].")) + return + + if(maintenance) + if(istype(W, /obj/item/weapon/stock_parts/scanning_module)) + if(smodule) + to_chat(user, span_notice("\The [src] already has a scanning module.")) + else + if(!user.unEquip(W)) + return + W.forceMove(src) + smodule = W + to_chat(user, span_notice("You install the [W] into \the [src].")) + medigun.beam_range = 3+smodule.get_rating() + update_icon() + return + + if(istype(W, /obj/item/weapon/stock_parts/manipulator)) + if(smanipulator) + to_chat(user, span_notice("\The [src] already has a manipulator.")) + return + if(!user.unEquip(W)) + return + W.forceMove(src) + smanipulator = W + smaniptier = smanipulator.get_rating() + if(sbin && scapacitor)START_PROCESSING(SSobj, src) + to_chat(user, span_notice("You install the [W] into \the [src].")) + update_icon() + return + + if(istype(W, /obj/item/weapon/stock_parts/micro_laser)) + if(slaser) + to_chat(user, span_notice("\The [src] already has a micro laser.")) + return + if(!user.unEquip(W)) + return + W.forceMove(src) + slaser = W + to_chat(user, span_notice("You install the [W] into \the [src].")) + update_icon() + return + + if(istype(W, /obj/item/weapon/stock_parts/capacitor)) + if(scapacitor) + to_chat(user, span_notice("\The [src] already has a capacitor.")) + return + if(!user.unEquip(W)) + return + W.forceMove(src) + scapacitor = W + var/scaptier = scapacitor.get_rating() + if(scaptier == 1) + chargecap = 1000 + bcell.maxcharge = 1000 + if(bcell.charge > chargecap) + bcell.charge = chargecap + else if(scaptier == 2) + chargecap = 5000 + bcell.maxcharge = 5000 + if(bcell.charge > chargecap) + bcell.charge = chargecap + else if(scaptier == 3) + chargecap = 10000 + bcell.maxcharge = 10000 + if(bcell.charge > chargecap) + bcell.charge = chargecap + else if(scaptier == 4) + chargecap = 20000 + bcell.maxcharge = 20000 + if(bcell.charge > chargecap) + bcell.charge = chargecap + else if(scaptier == 5) + chargecap = 30000 + bcell.maxcharge = 30000 + if(bcell.charge > chargecap) + bcell.charge = chargecap + + if(sbin && smanipulator)START_PROCESSING(SSobj, src) + to_chat(user, span_notice("You install the [W] into \the [src].")) + update_icon() + return + + if(istype(W, /obj/item/weapon/stock_parts/matter_bin)) + if(sbin) + to_chat(user, span_notice("\The [src] already has a matter bin.")) + return + if(!user.unEquip(W)) + return + W.forceMove(src) + sbin = W + sbintier = sbin.get_rating() + if(sbintier >= 5) + chemcap = 300 + tankmax = 150 + else + chemcap = 60*(sbintier) + tankmax = 30*sbintier + if(brutecharge > chemcap) + brutecharge = chemcap + if(burncharge > chemcap) + burncharge = chemcap + if(toxcharge > chemcap) + toxcharge = chemcap + if(brutecharge > tankmax) + brutecharge = tankmax + if(burncharge > tankmax) + burncharge = tankmax + if(toxcharge > tankmax) + toxcharge = tankmax + if(scapacitor && smanipulator)START_PROCESSING(SSobj, src) + to_chat(user, span_notice("You install the [W] into \the [src].")) + update_icon() + return + + return ..() + + +/obj/item/device/medigun_backpack/proc/refill_reagent(var/obj/item/weapon/container, mob/user) + if(!maintenance && (istype(container, /obj/item/weapon/reagent_containers/glass/beaker) || istype(container, /obj/item/weapon/reagent_containers/glass/bottle))) + + if(!(container.flags & OPENCONTAINER)) + to_chat(user, span_warning("You need to open the [container] first!")) + return + + var/reagentwhitelist = list("bicaridine", "anti_toxin", "kelotane", "dermaline", "phoron")//, "tricordrazine") + + for(var/G in container.reagents.reagent_list) + var/datum/reagent/R = G + var/modifier = 1 + var/totransfer = 0 + var/name = "" + + if(R.id in reagentwhitelist) + switch(R.id) + if("bicaridine") + name = "bruteheal" + modifier = 4 + totransfer = chemcap - brutevol + if("anti_toxin") + name = "toxheal" + modifier = 4 + totransfer = chemcap - toxvol + if("kelotane") + name = "burnheal" + modifier = 4 + totransfer = chemcap - burnvol + if("dermaline") + name = "burnheal" + modifier = 8 + totransfer = chemcap - burnvol + if("phoron") + name = "phoron" + modifier = 1 + totransfer = chemcap - phoronvol + /*if("tricordrazine") + name = "tricordrazine" + modifier = 1 + if((brutevol != chemcap) && (burnvol != chemcap) && (toxvol != chemcap)) + totransfer = 1 //tempcheck to get past the totransfer check + else + totransfer = 0*/ + if(totransfer <= 0) + to_chat(user, span_notice("The [src] cannot accept anymore [name]!")) + totransfer = min(totransfer, container.reagents.get_reagent_amount(R.id) * modifier) + + switch(R.id) + if("bicaridine") + brutevol += totransfer + if("anti_toxin") + toxvol += totransfer + if("kelotane") + burnvol += totransfer + if("dermaline") + burnvol += totransfer + if("phoron") + phoronvol += totransfer + /*if("tricordrazine") //Tricord too problematic + var/maxamount = container.reagents.get_reagent_amount(R.id) + var/amountused + var/oldbrute = brutevol + var/oldburn = burnvol + var/oldtox = toxvol + + while(maxamount > 0) + if(brutevol >= chemcap && burnvol >= chemcap && toxvol >= chemcap) + break + maxamount -- + amountused++ + totransfer ++ + if(brutevol < chemcap) + brutevol ++ + if(burnvol < chemcap) + burnvol ++ + if(toxvol < chemcap) + toxvol ++ + var/readout = "You add [amountused] units of [R.name] to the [src]. \n The [src] Stores " + var/readoutadditions = FALSE + if(oldbrute != brutevol) + readout += "[round(brutevol - oldbrute)] U of bruteheal vol" + readoutadditions = TRUE + if(oldburn != burnvol) + if(readoutadditions) + readout += ", " + readout += "[round(burnvol - oldburn)] U of burnheal vol" + readoutadditions = TRUE + if(oldtox != toxvol) + if(readoutadditions) + readout += ", " + readout += "[round(toxvol - oldtox)] U of toxheal vol" + if(oldbrute != brutevol || oldburn != burnvol || oldtox != toxvol)to_chat(user, span_notice("[readout]."))*/ + if(totransfer > 0) + if(R.id != "tricordrazine") + to_chat(user, span_notice("You add [totransfer / modifier] units of [R.name] to the [src]. \n The [src] stores [round(totransfer)] U of [name].")) + container.reagents.remove_reagent(R.id, totransfer / modifier) + playsound(src, 'sound/weapons/empty.ogg', 50, 1) + update_icon() + return TRUE + return FALSE + +//checks that the base unit is in the correct slot to be used +/obj/item/device/medigun_backpack/proc/slot_check() + var/mob/M = loc + if(!istype(M)) + return FALSE //not equipped + + if((slot_flags & SLOT_BACK) && M.get_equipped_item(slot_back) == src) + return TRUE + if((slot_flags & SLOT_BACK) && M.get_equipped_item(slot_s_store) == src) + return TRUE + return FALSE + +/obj/item/device/medigun_backpack/dropped(mob/user) + ..() + kenzie = FALSE + replace_icon() + reattach_medigun(user) //medigun attached to a base unit should never exist outside of their base unit or the mob equipping the base unit + +/obj/item/device/medigun_backpack/proc/reattach_medigun(mob/user) + if(containsgun) + return + + containsgun = TRUE + if(!medigun) + return + if(medigun.busy) + medigun.busy = MEDIGUN_IDLE + replace_icon() + user.update_inv_back() + if(ismob(medigun.loc)) + var/mob/M = medigun.loc + if(M.drop_from_inventory(medigun, src)) + to_chat(user, span_notice("\The [medigun] snaps back into the main unit.")) + return + + medigun.forceMove(src) + to_chat(user, span_notice("\The [medigun] snaps back into the main unit.")) + +/obj/item/device/medigun_backpack/proc/checked_use(var/charge_amt) + return (bcell && bcell.checked_use(charge_amt)) diff --git a/code/game/Rogue Star/weapons/Medigun/medigun_backpack_ui.dm b/code/game/Rogue Star/weapons/Medigun/medigun_backpack_ui.dm new file mode 100644 index 00000000000..746363c23db --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/medigun_backpack_ui.dm @@ -0,0 +1,151 @@ +/obj/item/device/medigun_backpack/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Medigun", name) + ui.open() + +/obj/item/device/medigun_backpack/tgui_data(mob/user) + var/mob/living/carbon/human/H = medigun.current_target + var/patientname + var/patienthealth = 0 + var/patientbruteloss = 0 + var/patientfireloss = 0 + var/patienttoxloss = 0 + var/patientoxyloss = 0 + var/patientstatus = 0 + var/list/bloodData = list() + var/inner_bleeding = FALSE + var/organ_damage = FALSE + + //var/minhealth = 0 + if(scapacitor?.get_rating() < 5) + gridstatus = 3 + if(H) + for(var/obj/item/organ/org in H.internal_organs) + if(org.robotic >= ORGAN_ROBOT) + continue + if(org.status & ORGAN_BLEEDING) + inner_bleeding = TRUE + if(org.damage >= 1 && !istype(org, /obj/item/organ/internal/brain)) + organ_damage = TRUE + patientname = H + patienthealth = max(0, (H.health+abs(config.health_threshold_dead))/(H.getMaxHealth()+abs(config.health_threshold_dead))) + patientbruteloss = H.getBruteLoss() + patientfireloss = H.getFireLoss() + patienttoxloss = H.getToxLoss() + patientoxyloss = H.getOxyLoss() + patientstatus = H.stat + if(H.vessel) + bloodData["volume"] = round(H.vessel.get_reagent_amount("blood")) + bloodData["max_volume"] = H.species.blood_volume + var/list/data = list( + "maintenance" = maintenance, + "generator" = charging, + "gridstatus" = gridstatus, + "tankmax" = tankmax, + "power_cell_status" = bcell ? bcell.percent() : null, + "phoron_status" = sbin ? phoronvol/chemcap : null, + "bruteheal_charge" = scapacitor ? brutecharge : null, + "burnheal_charge" = scapacitor ? burncharge : null, + "toxheal_charge" = scapacitor ? toxcharge : null, + "bruteheal_vol" = sbin ? brutevol : null, + "burnheal_vol" = sbin ? burnvol : null, + "toxheal_vol" = sbin ? toxvol : null, + "patient_name" = smodule ? patientname : null, + "patient_health" = smodule ? patienthealth : null, + "patient_brute" = smodule ? patientbruteloss : null, + "patient_burn" = smodule ? patientfireloss : null, + "patient_tox" = smodule ? patienttoxloss : null, + "patient_oxy" = smodule ? patientoxyloss : null, + "blood_status" = smodule ? bloodData : null, + "patient_status" = smodule ? patientstatus : null, + "organ_damage" = smodule ? organ_damage : null, + "inner_bleeding" = smodule ? inner_bleeding : null, + "examine_data" = get_examine_data() + ) + return data + +/obj/item/device/medigun_backpack/proc/get_examine_data() + return list( + "smodule" = smodule ? list("name" = smodule.name, "range" = medigun.beam_range, "rating" = smodule.get_rating()) : null, + "smanipulator" = smanipulator ? list("name" = smanipulator.name, "rating" = smaniptier) : null, + "slaser" = slaser ? list("name" = slaser.name, "rating" = slaser.get_rating()) : null, + "scapacitor" = scapacitor ? list("name" = scapacitor.name, "chargecap" = chargecap, "rating" = scapacitor.get_rating()) : null, + "sbin" = sbin ? list("name" = sbin.name, "chemcap" = chemcap, "tankmax" = tankmax, "rating" = sbin.get_rating()) : null + ) + +/obj/item/device/medigun_backpack/tgui_act(action, params, datum/tgui/ui) + if(..()) + return TRUE + + . = TRUE + switch(action) + if("gentoggle") + ui_action_click() + return TRUE + + if("cancel_healing") + if(medigun?.busy) + medigun.busy = MEDIGUN_CANCELLED + return TRUE + + if("toggle_maintenance") + maintenance = !maintenance + reattach_medigun(ui.user) + return TRUE + + if("rem_smodule") + if(!smodule || !maintenance) + return FALSE + smodule.forceMove(get_turf(loc)) + to_chat(ui.user, span_notice("You remove the [smodule] from \the [src].")) + smodule = null + update_icon() + return TRUE + + if("rem_mani") + if(!smanipulator || !maintenance) + return FALSE + STOP_PROCESSING(SSobj, src) + smanipulator.forceMove(get_turf(loc)) + to_chat(ui.user, span_notice("You remove the [smanipulator] from \the [src].")) + smanipulator = null + smaniptier = 0 + update_icon() + return TRUE + + if("rem_laser") + if(!slaser || !maintenance) + return FALSE + slaser.forceMove(get_turf(loc)) + to_chat(ui.user, span_notice("You remove the [slaser] from \the [src].")) + slaser = null + update_icon() + return TRUE + + if("rem_cap") + if(!scapacitor || !maintenance) + return FALSE + STOP_PROCESSING(SSobj, src) + scapacitor.forceMove(get_turf(loc)) + to_chat(ui.user, span_notice("You remove the [scapacitor] from \the [src].")) + scapacitor = null + update_icon() + return TRUE + + if("rem_bin") + if(!sbin || !maintenance) + return FALSE + STOP_PROCESSING(SSobj, src) + sbin.forceMove(get_turf(loc)) + to_chat(ui.user, span_notice("You remove the [sbin] from \the [src].")) + sbin = null + sbintier = 0 + update_icon() + return TRUE + +/obj/item/device/medigun_backpack/ShiftClick(mob/user) + . = ..() + if(!medigun) + return + tgui_interact(user) diff --git a/code/game/Rogue Star/weapons/Medigun/medigun_modifiers.dm b/code/game/Rogue Star/weapons/Medigun/medigun_modifiers.dm new file mode 100644 index 00000000000..2cea3e761bf --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/medigun_modifiers.dm @@ -0,0 +1,8 @@ +/datum/modifier/medbeameffect + name = "medgunffect" + desc = "You're being stabilized" + mob_overlay_state = "medigun_effect" + stacks = MODIFIER_STACK_EXTEND + //pain_immunity = TRUE + bleeding_rate_percent = 0.1 //only a little + incoming_oxy_damage_percent = 0 diff --git a/code/game/Rogue Star/weapons/Medigun/medigun_verbs.dm b/code/game/Rogue Star/weapons/Medigun/medigun_verbs.dm new file mode 100644 index 00000000000..6b3a8027e63 --- /dev/null +++ b/code/game/Rogue Star/weapons/Medigun/medigun_verbs.dm @@ -0,0 +1,28 @@ +/obj/item/device/medigun_backpack/verb/toggle_medigun() + set name = "Toggle medigun" + set category = "Object" + + var/mob/living/carbon/human/user = usr + if(maintenance) + to_chat(user, span_warning("Please close the maintenance hatch with a screwdriver first, or to remove components, use a crowbar.")) + return + + if(!medigun) + to_chat(user, span_warning("The medigun is missing!")) + return + + if(medigun.loc != src) + reattach_medigun(user) //Remove from their hands and back onto the medigun unit + return + + if(!slot_check()) + to_chat(user, span_warning("You need to equip [src] before taking out [medigun].")) + else + if(!user.put_in_hands(medigun)) //Detach the medigun into the user's hands + to_chat(user, span_warning("You need a free hand to hold the medigun!")) + else + containsgun = 0 + replace_icon(TRUE) + if(is_twohanded()) + medigun.update_twohanding() + user.update_inv_back() diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index db94f63adbe..2c59a435ac6 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -10,7 +10,7 @@ active_power_usage = 40000 //40 kW var/efficiency = 40000 //will provide the modified power rate when upgraded var/obj/item/charging = null - var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/modular_computer, /obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/cell, /obj/item/device/suit_cooling_unit/emergency, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric, /obj/item/ammo_magazine/smart, /obj/item/device/flash, /obj/item/device/defib_kit, /obj/item/ammo_casing/microbattery, /obj/item/device/paicard, /obj/item/device/personal_shield_generator) //VOREStation Add - NSFW Batteries + var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/modular_computer, /obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/cell, /obj/item/device/suit_cooling_unit/emergency, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric, /obj/item/ammo_magazine/smart, /obj/item/device/flash, /obj/item/device/defib_kit, /obj/item/ammo_casing/microbattery, /obj/item/device/paicard, /obj/item/device/personal_shield_generator, /obj/item/device/medigun_backpack) //VOREStation Add - NSFW Batteries // RS ADD Medigun backpack var/icon_state_charged = "recharger2" var/icon_state_charging = "recharger1" var/icon_state_idle = "recharger0" //also when unpowered diff --git a/code/modules/clothing/spacesuits/rig/suits/station_vr.dm b/code/modules/clothing/spacesuits/rig/suits/station_vr.dm index 16715d9c3ac..94664a3296e 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station_vr.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station_vr.dm @@ -17,49 +17,49 @@ //Area allowing backpacks to be placed on rigsuits. /obj/item/weapon/rig/vox - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/backpack, /obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/backpack, /obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/combat - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/ert allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/tool/crowbar, \ /obj/item/weapon/tool/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/tool/wirecutters, /obj/item/weapon/tool/wrench, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \ - /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/light/ninja - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/merc - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/ce - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/medical - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/hazmat - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/hazard - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/industrial - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd,/obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/military allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/handcuffs, \ /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/weldingtool, /obj/item/weapon/tool, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \ - /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/device/suit_cooling_unit, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/device/suit_cooling_unit, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/pmc allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/tool/crowbar, \ /obj/item/weapon/tool/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/tool/wirecutters, /obj/item/weapon/tool/wrench, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \ - /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack /obj/item/weapon/rig/robotics allowed = list(/obj/item/device/flashlight, /obj/item/weapon/storage/box, /obj/item/weapon/storage/belt, /obj/item/device/defib_kit/compact) @@ -68,7 +68,7 @@ /obj/item/weapon/rig/focalpoint name = "\improper F.P.E. hardsuit control module" desc = "A high-end hardsuit produced by Focal Point Energistics, focused around repair and construction." - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "techno_rig" @@ -85,7 +85,7 @@ max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE // so it's like a rig firesuit armor = list("melee" = 40, "bullet" = 10, "laser" = 30, "energy" = 55, "bomb" = 70, "bio" = 100, "rad" = 100) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/backpack) - + chest_type = /obj/item/clothing/suit/space/rig/focalpoint helm_type = /obj/item/clothing/head/helmet/space/rig/focalpoint boot_type = /obj/item/clothing/shoes/magboots/rig/ce/focalpoint @@ -136,7 +136,7 @@ /obj/item/weapon/rig/hephaestus name = "\improper Hephaestus hardsuit control module" desc = "A high-end hardsuit produced by Hephaestus Industries, focused on destroying the competition. Literally." - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "ihs_rig" @@ -145,10 +145,10 @@ allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/handcuffs, \ /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/weldingtool, /obj/item/weapon/tool, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \ - /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/device/suit_cooling_unit, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit) + /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller, /obj/item/device/suit_cooling_unit, /obj/item/weapon/storage/backpack,/obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack armor = list("melee" = 70, "bullet" = 70, "laser" = 70, "energy" = 50, "bomb" = 60, "bio" = 100, "rad" = 20) - + chest_type = /obj/item/clothing/suit/space/rig/hephaestus helm_type = /obj/item/clothing/head/helmet/space/rig/hephaestus boot_type = /obj/item/clothing/shoes/magboots/rig/hephaestus @@ -198,7 +198,7 @@ /obj/item/weapon/rig/zero name = "null hardsuit control module" desc = "A very lightweight suit designed to allow use inside mechs and starfighters. It feels like you're wearing nothing at all." - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "null_rig" @@ -210,8 +210,8 @@ boot_type = null glove_type = null - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/backpack, /obj/item/device/bluespaceradio, /obj/item/device/defib_kit) - + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/backpack, /obj/item/device/bluespaceradio, /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack + slowdown = 0 offline_slowdown = 1 offline_vision_restriction = 2 @@ -244,7 +244,7 @@ /obj/item/weapon/rig/baymed name = "\improper Commonwealth medical hardsuit control module" desc = "A lightweight first responder hardsuit from the Commonwealth. Not suitable for combat use, but advanced myomer fibers can push the user to incredible speeds." - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "medical_rig_bay" @@ -266,14 +266,14 @@ /obj/item/roller, /obj/item/weapon/storage/backpack, /obj/item/device/bluespaceradio, - /obj/item/device/defib_kit) + /obj/item/device/defib_kit, /obj/item/device/medigun_backpack) // RS ADD Medigun backpack // speedy paper slowdown = -0.5 armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 25, "bio" = 100, "rad" = 20) /obj/item/weapon/rig/baymed/equipped - + initial_modules = list( /obj/item/rig_module/maneuvering_jets, /obj/item/rig_module/sprinter, @@ -318,7 +318,7 @@ /obj/item/weapon/rig/bayeng name = "\improper Commonwealth engineering hardsuit control module" desc = "An advanced construction hardsuit from the Commonwealth. Built like a tank. Don't expect to be taking any tight corners while running." - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "engineering_rig_bay" @@ -394,7 +394,7 @@ /obj/item/weapon/rig/pathfinder name = "\improper Commonwealth pathfinder hardsuit control module" desc = "A Commonwealth pathfinder hardsuit is hard to come by... how'd this end up on the frontier?" - + icon = 'icons/obj/rig_modules_vr.dmi' // the item default_mob_icon = 'icons/mob/rig_back_vr.dmi' // the onmob icon_state = "pathfinder_rig_bay" diff --git a/icons/mob/items/lefthand_guns_rs.dmi b/icons/mob/items/lefthand_guns_rs.dmi new file mode 100644 index 00000000000..576fb670386 Binary files /dev/null and b/icons/mob/items/lefthand_guns_rs.dmi differ diff --git a/icons/mob/items/righthand_guns_rs.dmi b/icons/mob/items/righthand_guns_rs.dmi new file mode 100644 index 00000000000..973358b1e33 Binary files /dev/null and b/icons/mob/items/righthand_guns_rs.dmi differ diff --git a/icons/mob/modifier_effects.dmi b/icons/mob/modifier_effects.dmi index 99a4f6e4ed0..b814c176ba0 100644 Binary files a/icons/mob/modifier_effects.dmi and b/icons/mob/modifier_effects.dmi differ diff --git a/tgui/packages/tgui/interfaces/Medigun/MedigunHelpers/ChargeStatus.tsx b/tgui/packages/tgui/interfaces/Medigun/MedigunHelpers/ChargeStatus.tsx new file mode 100644 index 00000000000..542a0be4ea0 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/MedigunHelpers/ChargeStatus.tsx @@ -0,0 +1,42 @@ +import { Box, LabeledList, ProgressBar, Stack } from '../../../components'; + +export const ChargeStatus = ( + props: { + name: string; + color: string; + charge: number | null; + max: number | null; + volume: number | null; + }, + context +) => { + const { name, color, charge, max, volume } = props; + + return ( + + + + {charge !== null ? ( + + {charge.toFixed()} / {max} + + ) : ( + Missing Capacitor + )} + + + Reserve: + + + {volume !== null ? ( + + {volume.toFixed()} + + ) : ( + Missing Bin + )} + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunContent.tsx b/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunContent.tsx new file mode 100644 index 00000000000..62f7d412366 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunContent.tsx @@ -0,0 +1,251 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../../../backend'; +import { Box, Button, LabeledList, ProgressBar, Section, Stack } from '../../../components'; +import type { Data, SModule } from '../types'; +import { gridStatusToColor, gridStatusToText, powerToColor, powerToText, statToColor, statToString } from '../constants'; +import { ChargeStatus } from '../MedigunHelpers/ChargeStatus'; + +export const MedigunContent = (props: { smodule: SModule }, context) => { + const { act, data } = useBackend(context); + + const { + maintenance, + tankmax, + generator, + gridstatus, + power_cell_status, + phoron_status, + bruteheal_charge, + burnheal_charge, + toxheal_charge, + bruteheal_vol, + burnheal_vol, + toxheal_vol, + patient_name, + patient_health, + patient_brute, + patient_burn, + patient_tox, + patient_oxy, + blood_status, + patient_status, + organ_damage, + inner_bleeding, + } = data; + + const { smodule } = props; + + const moduleLevel = smodule?.rating || 0; + + return ( + + +
+ + + {maintenance ? ( + Maintenance Hatch Open + ) : power_cell_status !== null ? ( + + ) : ( + Missing Cell + )} + + {gridstatus !== 3 && ( + + {gridStatusToText[gridstatus] || 'Unavailable'} + + )} + act('gentoggle')} + /> + }> + [ {powerToText[generator] || 'Unavailable'} ] + + {phoron_status !== null ? ( + + + + ) : ( + Missing Bin + )} + +
+
+ +
+ + + + + +
+
+ +
+ + {patient_health !== null && + patient_brute !== null && + patient_burn !== null && + patient_tox !== null && + patient_oxy !== null ? ( + + + + + {patient_name ? ( + + {patient_name} + + + + + ) : ( + 'No Target' + )} + + {!!data.patient_name && ( + <> + + + + {moduleLevel >= 2 && ( + <> + + {!!organ_damage && ( + + Organ Damage! + + )} + {!!patient_status && ( + + + {statToString[patient_status]} + + + )} + + )} + + {`${(patient_health * 100).toFixed()}%`} + + + + + {moduleLevel >= 2 && ( + + {blood_status ? ( + + + + {!!inner_bleeding && ( + + Inner Bleeding! + + )} + + {`${( + (blood_status.volume / + blood_status.max_volume) * + 100 + ).toFixed()}%`} + + + + ) : ( + No Blood Detected + )} + + )} + + )} + + + + {!!data.patient_name && moduleLevel >= 2 && ( + + + + + {patient_brute} + + + {patient_burn} + + + + + + + {patient_tox} + + + {patient_oxy} + + + + + )} + + + ) : ( + Missing Scanning Module + )} + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunParts.tsx b/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunParts.tsx new file mode 100644 index 00000000000..2c2d082c8de --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/MedigunTabs/MedigunParts.tsx @@ -0,0 +1,148 @@ +import { BooleanLike } from '../../../../common/react'; +import { useBackend } from '../../../backend'; +import { Box, Button, LabeledList, Section, Stack } from '../../../components'; +import type { ExamineData } from '../types'; + +export const MedigunParts = ( + props: { examineData: ExamineData; maintenance: BooleanLike }, + context +) => { + const { act } = useBackend(context); + const { examineData, maintenance } = props; + const { smodule, smanipulator, slaser, scapacitor, sbin } = examineData; + + return ( +
act('toggle_maintenance')} + selected={maintenance} + tooltip="Toggle maintenance mode" + icon="wrench" + /> + }> + + + + + {smodule ? ( + maintenance ? ( + act('rem_smodule')}> + Remove Module + + ) : ( + + {'It has a ' + + smodule.name + + ' installed, device will function within ' + + smodule.range + + ' tiles'} + {smodule.rating >= 5 ? ' and' : undefined} + {smodule.rating >= 5 ? ' through walls' : undefined} + {'.'} + + ) + ) : ( + Missing + )} + + + {smanipulator ? ( + maintenance ? ( + act('rem_mani')}> + Remove Manipulator + + ) : ( + + {'It has a ' + + smanipulator.name + + ' installed, chem digitizing is '} + {smanipulator.rating >= 5 + ? '125% Efficient' + : (smanipulator.rating / 4) * 100 + '% Efficient'} + {'.'} + + ) + ) : ( + Missing + )} + + + {slaser ? ( + maintenance ? ( + act('rem_laser')}> + Remove Laser + + ) : ( + + {'It has a ' + + slaser.name + + ' installed, and can heal ' + + slaser.rating + + ' damage per cycle'} + {slaser.rating >= 5 ? ' and will' : undefined} + {slaser.rating >= 5 ? ' regenerate blood' : undefined} + {slaser.rating >= 5 ? ' while beam is focused' : ''} + {'.'} + + ) + ) : ( + Missing + )} + + + {scapacitor ? ( + maintenance ? ( + act('rem_cap')}> + Remove Capacitor + + ) : ( + + {'It has a ' + + scapacitor.name + + ' installed, battery Capacity is ' + + scapacitor.chargecap + + ' Units'} + {scapacitor.rating >= 5 + ? ' the cell will recharge from the local power grid' + : ''} + {''} + {'.'} + + ) + ) : ( + Missing + )} + + + {sbin ? ( + maintenance ? ( + act('rem_bin')}> + Remove Bin + + ) : ( + + {'It has a ' + + sbin.name + + ' installed, can hold ' + + sbin.tankmax + + ' charge and ' + + sbin.chemcap + + ' reserve chems'} + {sbin.rating >= 5 + ? 'and will slowly generate chems in exchange for power.' + : '.'} + + ) + ) : ( + Missing + )} + + + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/Medigun/constants.ts b/tgui/packages/tgui/interfaces/Medigun/constants.ts new file mode 100644 index 00000000000..b0a7b9feb13 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/constants.ts @@ -0,0 +1,11 @@ +export const powerToColor = ['bad', 'good']; + +export const powerToText = ['Generator Offline', 'Generator Running']; + +export const gridStatusToColor = ['bad', 'average', 'good']; + +export const gridStatusToText = ['Off Grid', 'Grid Available', 'Using Grid']; + +export const statToString = ['Alive', 'Unconscious', 'Dead']; + +export const statToColor = ['orange', 'red']; diff --git a/tgui/packages/tgui/interfaces/Medigun/index.tsx b/tgui/packages/tgui/interfaces/Medigun/index.tsx new file mode 100644 index 00000000000..3a15636201c --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/index.tsx @@ -0,0 +1,42 @@ +import { useBackend, useLocalState } from '../../backend'; +import { MedigunParts } from './MedigunTabs/MedigunParts'; +import { Stack, Tabs } from '../../components'; +import { Window } from '../../layouts'; +import type { Data } from './types'; +import { MedigunContent } from './MedigunTabs/MedigunContent'; + +export const Medigun = (props, context) => { + const { data } = useBackend(context); + const { maintenance, examine_data } = data; + const [selectedTab, setSelectedTab] = useLocalState(context, 'mediGunTab', 0); + + const tab: InfernoElement[] = []; + tab[0] = ; + tab[1] = ( + + ); + + return ( + + + + + + setSelectedTab(0)}> + Medigun Content + + setSelectedTab(1)}> + Medigun Parts + + + + {tab[selectedTab]} + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/Medigun/types.ts b/tgui/packages/tgui/interfaces/Medigun/types.ts new file mode 100644 index 00000000000..a998617b0e2 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Medigun/types.ts @@ -0,0 +1,46 @@ +import type { BooleanLike } from '../../../common/react'; + +export type Data = { + maintenance: BooleanLike; + tankmax: number; + generator: number; + gridstatus: number; + power_cell_status: number | null; + phoron_status: number | null; + bruteheal_charge: number | null; + burnheal_charge: number | null; + toxheal_charge: number | null; + bruteheal_vol: number | null; + burnheal_vol: number | null; + toxheal_vol: number | null; + patient_name: string | null; + patient_health: number | null; + patient_brute: number | null; + patient_burn: number | null; + patient_tox: number | null; + patient_oxy: number | null; + blood_status: { volume: number; max_volume: number } | null; + patient_status: number | null; + organ_damage: BooleanLike; + inner_bleeding: BooleanLike; + examine_data: ExamineData; +}; + +export type SModule = { name: string; range: number; rating: number } | null; + +export type ExamineData = { + smodule: SModule; + smanipulator: { name: string; rating: number } | null; + slaser: { name: string; rating: number } | null; + scapacitor: { + name: string; + chargecap: number; + rating: number; + } | null; + sbin: { + name: string; + chemcap: number; + tankmax: number; + rating: number; + } | null; +}; diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index a23fb81b65f..8dad4bc1b23 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -1 +1 @@ -!function(){var e={21926:function(e,t,n){"use strict";t.__esModule=!0,t.createPopper=void 0,t.popperGenerator=f;var o=m(n(48764)),r=m(n(68349)),a=m(n(3671)),i=m(n(55490)),c=(m(n(40755)),m(n(69282))),l=m(n(27672)),d=(m(n(30752)),m(n(12459)),m(n(27629)),m(n(54220))),s=m(n(75949));t.detectOverflow=s["default"];var u=n(79388);n(15954);function m(e){return e&&e.__esModule?e:{"default":e}}var p={placement:"bottom",modifiers:[],strategy:"absolute"};function h(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(a=(0,r.round)(n.width)/l||1),c>0&&(i=(0,r.round)(n.height)/c||1)}return{width:n.width/a,height:n.height/i,top:n.top/i,right:n.right/a,bottom:n.bottom/i,left:n.left/a,x:n.left/a,y:n.top/i}};var o=n(79388),r=n(36291)},65647:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t,n){var o="clippingParents"===t?function(e){var t=(0,i["default"])((0,m["default"])(e)),n=["absolute","fixed"].indexOf((0,d["default"])(e).position)>=0&&(0,s.isHTMLElement)(e)?(0,c["default"])(e):e;if(!(0,s.isElement)(n))return[];return t.filter((function(e){return(0,s.isElement)(e)&&(0,p["default"])(e,n)&&"body"!==(0,h["default"])(e)}))}(e):[].concat(t),r=[].concat(o,[n]),a=r[0],l=r.reduce((function(t,n){var o=N(e,n);return t.top=(0,C.max)(o.top,t.top),t.right=(0,C.min)(o.right,t.right),t.bottom=(0,C.min)(o.bottom,t.bottom),t.left=(0,C.max)(o.left,t.left),t}),N(e,a));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l};var o=n(15954),r=b(n(8204)),a=b(n(40015)),i=b(n(3671)),c=b(n(55490)),l=b(n(25890)),d=b(n(40755)),s=n(79388),u=b(n(11100)),m=b(n(95136)),p=b(n(62215)),h=b(n(38569)),f=b(n(73060)),C=n(36291);function b(e){return e&&e.__esModule?e:{"default":e}}function N(e,t){return t===o.viewport?(0,f["default"])((0,r["default"])(e)):(0,s.isElement)(t)?function(e){var t=(0,u["default"])(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):(0,f["default"])((0,a["default"])((0,l["default"])(e)))}},48764:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t,n){void 0===n&&(n=!1);var u=(0,i.isHTMLElement)(t),m=(0,i.isHTMLElement)(t)&&function(e){var t=e.getBoundingClientRect(),n=(0,s.round)(t.width)/e.offsetWidth||1,o=(0,s.round)(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),p=(0,l["default"])(t),h=(0,o["default"])(e,m),f={scrollLeft:0,scrollTop:0},C={x:0,y:0};(u||!u&&!n)&&(("body"!==(0,a["default"])(t)||(0,d["default"])(p))&&(f=(0,r["default"])(t)),(0,i.isHTMLElement)(t)?((C=(0,o["default"])(t,!0)).x+=t.clientLeft,C.y+=t.clientTop):p&&(C.x=(0,c["default"])(p)));return{x:h.left+f.scrollLeft-C.x,y:h.top+f.scrollTop-C.y,width:h.width,height:h.height}};var o=u(n(11100)),r=u(n(3514)),a=u(n(38569)),i=n(79388),c=u(n(36056)),l=u(n(25890)),d=u(n(57360)),s=n(36291);function u(e){return e&&e.__esModule?e:{"default":e}}},40755:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(0,r["default"])(e).getComputedStyle(e)};var o,r=(o=n(96904))&&o.__esModule?o:{"default":o}},25890:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(((0,o.isElement)(e)?e.ownerDocument:e.document)||window.document).documentElement};var o=n(79388)},40015:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t,n=(0,o["default"])(e),l=(0,i["default"])(e),d=null==(t=e.ownerDocument)?void 0:t.body,s=(0,c.max)(n.scrollWidth,n.clientWidth,d?d.scrollWidth:0,d?d.clientWidth:0),u=(0,c.max)(n.scrollHeight,n.clientHeight,d?d.scrollHeight:0,d?d.clientHeight:0),m=-l.scrollLeft+(0,a["default"])(e),p=-l.scrollTop;"rtl"===(0,r["default"])(d||n).direction&&(m+=(0,c.max)(n.clientWidth,d?d.clientWidth:0)-s);return{width:s,height:u,x:m,y:p}};var o=l(n(25890)),r=l(n(40755)),a=l(n(36056)),i=l(n(69211)),c=n(36291);function l(e){return e&&e.__esModule?e:{"default":e}}},41829:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},68349:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,r["default"])(e),n=e.offsetWidth,o=e.offsetHeight;Math.abs(t.width-n)<=1&&(n=t.width);Math.abs(t.height-o)<=1&&(o=t.height);return{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}};var o,r=(o=n(11100))&&o.__esModule?o:{"default":o}},38569:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e?(e.nodeName||"").toLowerCase():null}},3514:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return e!==(0,r["default"])(e)&&(0,a.isHTMLElement)(e)?(0,i["default"])(e):(0,o["default"])(e)};var o=c(n(69211)),r=c(n(96904)),a=n(79388),i=c(n(41829));function c(e){return e&&e.__esModule?e:{"default":e}}},55490:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,o["default"])(e),n=s(e);for(;n&&(0,c["default"])(n)&&"static"===(0,a["default"])(n).position;)n=s(n);if(n&&("html"===(0,r["default"])(n)||"body"===(0,r["default"])(n)&&"static"===(0,a["default"])(n).position))return t;return n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,i.isHTMLElement)(e)){if("fixed"===(0,a["default"])(e).position)return null}var n=(0,l["default"])(e);(0,i.isShadowRoot)(n)&&(n=n.host);for(;(0,i.isHTMLElement)(n)&&["html","body"].indexOf((0,r["default"])(n))<0;){var o=(0,a["default"])(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t};var o=d(n(96904)),r=d(n(38569)),a=d(n(40755)),i=n(79388),c=d(n(94437)),l=d(n(95136));function d(e){return e&&e.__esModule?e:{"default":e}}function s(e){return(0,i.isHTMLElement)(e)&&"fixed"!==(0,a["default"])(e).position?e.offsetParent:null}},95136:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){if("html"===(0,o["default"])(e))return e;return e.assignedSlot||e.parentNode||((0,a.isShadowRoot)(e)?e.host:null)||(0,r["default"])(e)};var o=i(n(38569)),r=i(n(25890)),a=n(79388);function i(e){return e&&e.__esModule?e:{"default":e}}},43367:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function l(e){if(["html","body","#document"].indexOf((0,a["default"])(e))>=0)return e.ownerDocument.body;if((0,i.isHTMLElement)(e)&&(0,r["default"])(e))return e;return l((0,o["default"])(e))};var o=c(n(95136)),r=c(n(57360)),a=c(n(38569)),i=n(79388);function c(e){return e&&e.__esModule?e:{"default":e}}},8204:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,o["default"])(e),n=(0,r["default"])(e),i=t.visualViewport,c=n.clientWidth,l=n.clientHeight,d=0,s=0;i&&(c=i.width,l=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(d=i.offsetLeft,s=i.offsetTop));return{width:c,height:l,x:d+(0,a["default"])(e),y:s}};var o=i(n(96904)),r=i(n(25890)),a=i(n(36056));function i(e){return e&&e.__esModule?e:{"default":e}}},96904:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}},69211:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,r["default"])(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}};var o,r=(o=n(96904))&&o.__esModule?o:{"default":o}},36056:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return(0,o["default"])((0,r["default"])(e)).left+(0,a["default"])(e).scrollLeft};var o=i(n(11100)),r=i(n(25890)),a=i(n(69211));function i(e){return e&&e.__esModule?e:{"default":e}}},79388:function(e,t,n){"use strict";t.__esModule=!0,t.isElement=function(e){var t=(0,r["default"])(e).Element;return e instanceof t||e instanceof Element},t.isHTMLElement=function(e){var t=(0,r["default"])(e).HTMLElement;return e instanceof t||e instanceof HTMLElement},t.isShadowRoot=function(e){if("undefined"==typeof ShadowRoot)return!1;var t=(0,r["default"])(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot};var o,r=(o=n(96904))&&o.__esModule?o:{"default":o}},57360:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=(0,r["default"])(e),n=t.overflow,o=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+o)};var o,r=(o=n(40755))&&o.__esModule?o:{"default":o}},94437:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return["table","td","th"].indexOf((0,r["default"])(e))>=0};var o,r=(o=n(38569))&&o.__esModule?o:{"default":o}},3671:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function l(e,t){var n;void 0===t&&(t=[]);var c=(0,o["default"])(e),d=c===(null==(n=e.ownerDocument)?void 0:n.body),s=(0,a["default"])(c),u=d?[s].concat(s.visualViewport||[],(0,i["default"])(c)?c:[]):c,m=t.concat(u);return d?m:m.concat(l((0,r["default"])(u)))};var o=c(n(43367)),r=c(n(95136)),a=c(n(96904)),i=c(n(57360));function c(e){return e&&e.__esModule?e:{"default":e}}},15954:function(e,t){"use strict";t.__esModule=!0,t.write=t.viewport=t.variationPlacements=t.top=t.start=t.right=t.reference=t.read=t.popper=t.placements=t.modifierPhases=t.main=t.left=t.end=t.clippingParents=t.bottom=t.beforeWrite=t.beforeRead=t.beforeMain=t.basePlacements=t.auto=t.afterWrite=t.afterRead=t.afterMain=void 0;t.top="top";var n="bottom";t.bottom=n;var o="right";t.right=o;var r="left";t.left=r;var a="auto";t.auto=a;var i=["top",n,o,r];t.basePlacements=i;var c="start";t.start=c;var l="end";t.end=l;t.clippingParents="clippingParents";t.viewport="viewport";t.popper="popper";t.reference="reference";var d=i.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+l])}),[]);t.variationPlacements=d;var s=[].concat(i,[a]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+l])}),[]);t.placements=s;var u="beforeRead";t.beforeRead=u;var m="read";t.read=m;var p="afterRead";t.afterRead=p;var h="beforeMain";t.beforeMain=h;var f="main";t.main=f;var C="afterMain";t.afterMain=C;var b="beforeWrite";t.beforeWrite=b;var N="write";t.write=N;var g="afterWrite";t.afterWrite=g;var V=[u,m,p,h,f,C,b,N,g];t.modifierPhases=V},37809:function(e,t,n){"use strict";t.__esModule=!0;var o={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};t.popperGenerator=t.detectOverflow=t.createPopperLite=t.createPopperBase=t.createPopper=void 0;var r=n(15954);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===r[e]||(t[e]=r[e]))}));var a=n(4207);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var i=n(21926);t.popperGenerator=i.popperGenerator,t.detectOverflow=i.detectOverflow,t.createPopperBase=i.createPopper;var c=n(17827);t.createPopper=c.createPopper;var l=n(47952);t.createPopperLite=l.createPopper},89290:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o,r=(o=n(38569))&&o.__esModule?o:{"default":o},a=n(79388);var i={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];(0,a.isHTMLElement)(i)&&(0,r["default"])(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},c=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});(0,a.isHTMLElement)(o)&&(0,r["default"])(o)&&(Object.assign(o.style,c),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};t["default"]=i},71313:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o=m(n(27629)),r=m(n(68349)),a=m(n(62215)),i=m(n(55490)),c=m(n(78772)),l=n(54444),d=m(n(11277)),s=m(n(45674)),u=n(15954);n(79388);function m(e){return e&&e.__esModule?e:{"default":e}}var p=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,d["default"])("number"!=typeof e?e:(0,s["default"])(e,u.basePlacements))};var h={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,d=e.options,s=n.elements.arrow,m=n.modifiersData.popperOffsets,h=(0,o["default"])(n.placement),f=(0,c["default"])(h),C=[u.left,u.right].indexOf(h)>=0?"height":"width";if(s&&m){var b=p(d.padding,n),N=(0,r["default"])(s),g="y"===f?u.top:u.left,V="y"===f?u.bottom:u.right,v=n.rects.reference[C]+n.rects.reference[f]-m[f]-n.rects.popper[C],_=m[f]-n.rects.reference[f],y=(0,i["default"])(s),k=y?"y"===f?y.clientHeight||0:y.clientWidth||0:0,x=v/2-_/2,w=b[g],B=k-N[C]-b[V],L=k/2-N[C]/2+x,S=(0,l.within)(w,L,B),I=f;n.modifiersData[a]=((t={})[I]=S,t.centerOffset=S-L,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&(0,a["default"])(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};t["default"]=h},54680:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,t.mapToStyles=p;var o=n(15954),r=u(n(55490)),a=u(n(96904)),i=u(n(25890)),c=u(n(40755)),l=u(n(27629)),d=u(n(31686)),s=n(36291);function u(e){return e&&e.__esModule?e:{"default":e}}var m={top:"auto",right:"auto",bottom:"auto",left:"auto"};function p(e){var t,n=e.popper,l=e.popperRect,d=e.placement,u=e.variation,p=e.offsets,h=e.position,f=e.gpuAcceleration,C=e.adaptive,b=e.roundOffsets,N=e.isFixed,g=p.x,V=void 0===g?0:g,v=p.y,_=void 0===v?0:v,y="function"==typeof b?b({x:V,y:_}):{x:V,y:_};V=y.x,_=y.y;var k=p.hasOwnProperty("x"),x=p.hasOwnProperty("y"),w=o.left,B=o.top,L=window;if(C){var S=(0,r["default"])(n),I="clientHeight",T="clientWidth";if(S===(0,a["default"])(n)&&(S=(0,i["default"])(n),"static"!==(0,c["default"])(S).position&&"absolute"===h&&(I="scrollHeight",T="scrollWidth")),d===o.top||(d===o.left||d===o.right)&&u===o.end)B=o.bottom,_-=(N&&S===L&&L.visualViewport?L.visualViewport.height:S[I])-l.height,_*=f?1:-1;if(d===o.left||(d===o.top||d===o.bottom)&&u===o.end)w=o.right,V-=(N&&S===L&&L.visualViewport?L.visualViewport.width:S[T])-l.width,V*=f?1:-1}var M,A=Object.assign({position:h},C&&m),E=!0===b?function(e){var t=e.x,n=e.y,o=window.devicePixelRatio||1;return{x:(0,s.round)(t*o)/o||0,y:(0,s.round)(n*o)/o||0}}({x:V,y:_}):{x:V,y:_};return V=E.x,_=E.y,f?Object.assign({},A,((M={})[B]=x?"0":"",M[w]=k?"0":"",M.transform=(L.devicePixelRatio||1)<=1?"translate("+V+"px, "+_+"px)":"translate3d("+V+"px, "+_+"px, 0)",M)):Object.assign({},A,((t={})[B]=x?_+"px":"",t[w]=k?V+"px":"",t.transform="",t))}var h={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,a=n.adaptive,i=void 0===a||a,c=n.roundOffsets,s=void 0===c||c,u={placement:(0,l["default"])(t.placement),variation:(0,d["default"])(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,p(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,p(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};t["default"]=h},53887:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o,r=(o=n(96904))&&o.__esModule?o:{"default":o};var a={passive:!0};var i={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,c=void 0===i||i,l=o.resize,d=void 0===l||l,s=(0,r["default"])(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return c&&u.forEach((function(e){e.addEventListener("scroll",n.update,a)})),d&&s.addEventListener("resize",n.update,a),function(){c&&u.forEach((function(e){e.removeEventListener("scroll",n.update,a)})),d&&s.removeEventListener("resize",n.update,a)}},data:{}};t["default"]=i},82566:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o=s(n(31477)),r=s(n(27629)),a=s(n(44214)),i=s(n(75949)),c=s(n(2894)),l=n(15954),d=s(n(31686));function s(e){return e&&e.__esModule?e:{"default":e}}var u={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var u=n.mainAxis,m=void 0===u||u,p=n.altAxis,h=void 0===p||p,f=n.fallbackPlacements,C=n.padding,b=n.boundary,N=n.rootBoundary,g=n.altBoundary,V=n.flipVariations,v=void 0===V||V,_=n.allowedAutoPlacements,y=t.options.placement,k=(0,r["default"])(y),x=f||(k===y||!v?[(0,o["default"])(y)]:function(e){if((0,r["default"])(e)===l.auto)return[];var t=(0,o["default"])(e);return[(0,a["default"])(e),t,(0,a["default"])(t)]}(y)),w=[y].concat(x).reduce((function(e,n){return e.concat((0,r["default"])(n)===l.auto?(0,c["default"])(t,{placement:n,boundary:b,rootBoundary:N,padding:C,flipVariations:v,allowedAutoPlacements:_}):n)}),[]),B=t.rects.reference,L=t.rects.popper,S=new Map,I=!0,T=w[0],M=0;M=0,F=O?"width":"height",D=(0,i["default"])(t,{placement:A,boundary:b,rootBoundary:N,altBoundary:g,padding:C}),R=O?P?l.right:l.left:P?l.bottom:l.top;B[F]>L[F]&&(R=(0,o["default"])(R));var j=(0,o["default"])(R),W=[];if(m&&W.push(D[E]<=0),h&&W.push(D[R]<=0,D[j]<=0),W.every((function(e){return e}))){T=A,I=!1;break}S.set(A,W)}if(I)for(var z=function(e){var t=w.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},U=v?3:1;U>0;U--){if("break"===z(U))break}t.placement!==T&&(t.modifiersData[s]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};t["default"]=u},27353:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o,r=n(15954),a=(o=n(75949))&&o.__esModule?o:{"default":o};function i(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function c(e){return[r.top,r.right,r.bottom,r.left].some((function(t){return e[t]>=0}))}var l={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,l=t.modifiersData.preventOverflow,d=(0,a["default"])(t,{elementContext:"reference"}),s=(0,a["default"])(t,{altBoundary:!0}),u=i(d,o),m=i(s,r,l),p=c(u),h=c(m);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:m,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}};t["default"]=l},4207:function(e,t,n){"use strict";t.__esModule=!0,t.preventOverflow=t.popperOffsets=t.offset=t.hide=t.flip=t.eventListeners=t.computeStyles=t.arrow=t.applyStyles=void 0;var o=m(n(89290));t.applyStyles=o["default"];var r=m(n(71313));t.arrow=r["default"];var a=m(n(54680));t.computeStyles=a["default"];var i=m(n(53887));t.eventListeners=i["default"];var c=m(n(82566));t.flip=c["default"];var l=m(n(27353));t.hide=l["default"];var d=m(n(99873));t.offset=d["default"];var s=m(n(83662));t.popperOffsets=s["default"];var u=m(n(21031));function m(e){return e&&e.__esModule?e:{"default":e}}t.preventOverflow=u["default"]},99873:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,t.distanceAndSkiddingToXY=i;var o,r=(o=n(27629))&&o.__esModule?o:{"default":o},a=n(15954);function i(e,t,n){var o=(0,r["default"])(e),i=[a.left,a.top].indexOf(o)>=0?-1:1,c="function"==typeof n?n(Object.assign({},t,{placement:e})):n,l=c[0],d=c[1];return l=l||0,d=(d||0)*i,[a.left,a.right].indexOf(o)>=0?{x:d,y:l}:{x:l,y:d}}var c={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,c=void 0===r?[0,0]:r,l=a.placements.reduce((function(e,n){return e[n]=i(n,t.rects,c),e}),{}),d=l[t.placement],s=d.x,u=d.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=l}};t["default"]=c},83662:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o,r=(o=n(2002))&&o.__esModule?o:{"default":o};var a={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=(0,r["default"])({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};t["default"]=a},21031:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var o=n(15954),r=h(n(27629)),a=h(n(78772)),i=h(n(16696)),c=n(54444),l=h(n(68349)),d=h(n(55490)),s=h(n(75949)),u=h(n(31686)),m=h(n(22710)),p=n(36291);function h(e){return e&&e.__esModule?e:{"default":e}}var f={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,h=e.name,f=n.mainAxis,C=void 0===f||f,b=n.altAxis,N=void 0!==b&&b,g=n.boundary,V=n.rootBoundary,v=n.altBoundary,_=n.padding,y=n.tether,k=void 0===y||y,x=n.tetherOffset,w=void 0===x?0:x,B=(0,s["default"])(t,{boundary:g,rootBoundary:V,padding:_,altBoundary:v}),L=(0,r["default"])(t.placement),S=(0,u["default"])(t.placement),I=!S,T=(0,a["default"])(L),M=(0,i["default"])(T),A=t.modifiersData.popperOffsets,E=t.rects.reference,P=t.rects.popper,O="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,F="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(A){if(C){var j,W="y"===T?o.top:o.left,z="y"===T?o.bottom:o.right,U="y"===T?"height":"width",H=A[T],G=H+B[W],q=H-B[z],K=k?-P[U]/2:0,Y=S===o.start?E[U]:P[U],$=S===o.start?-P[U]:-E[U],X=t.elements.arrow,Q=k&&X?(0,l["default"])(X):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,m["default"])(),Z=J[W],ee=J[z],te=(0,c.within)(0,E[U],Q[U]),ne=I?E[U]/2-K-te-Z-F.mainAxis:Y-te-Z-F.mainAxis,oe=I?-E[U]/2+K+te+ee+F.mainAxis:$+te+ee+F.mainAxis,re=t.elements.arrow&&(0,d["default"])(t.elements.arrow),ae=re?"y"===T?re.clientTop||0:re.clientLeft||0:0,ie=null!=(j=null==D?void 0:D[T])?j:0,ce=H+ne-ie-ae,le=H+oe-ie,de=(0,c.within)(k?(0,p.min)(G,ce):G,H,k?(0,p.max)(q,le):q);A[T]=de,R[T]=de-H}if(N){var se,ue="x"===T?o.top:o.left,me="x"===T?o.bottom:o.right,pe=A[M],he="y"===M?"height":"width",fe=pe+B[ue],Ce=pe-B[me],be=-1!==[o.top,o.left].indexOf(L),Ne=null!=(se=null==D?void 0:D[M])?se:0,ge=be?fe:pe-E[he]-P[he]-Ne+F.altAxis,Ve=be?pe+E[he]+P[he]-Ne-F.altAxis:Ce,ve=k&&be?(0,c.withinMaxClamp)(ge,pe,Ve):(0,c.within)(k?ge:fe,pe,k?Ve:Ce);A[M]=ve,R[M]=ve-pe}t.modifiersData[h]=R}},requiresIfExists:["offset"]};t["default"]=f},47952:function(e,t,n){"use strict";t.__esModule=!0,t.defaultModifiers=t.createPopper=void 0;var o=n(21926);t.popperGenerator=o.popperGenerator,t.detectOverflow=o.detectOverflow;var r=l(n(53887)),a=l(n(83662)),i=l(n(54680)),c=l(n(89290));function l(e){return e&&e.__esModule?e:{"default":e}}var d=[r["default"],a["default"],i["default"],c["default"]];t.defaultModifiers=d;var s=(0,o.popperGenerator)({defaultModifiers:d});t.createPopper=s},17827:function(e,t,n){"use strict";t.__esModule=!0;var o={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};t.defaultModifiers=t.createPopperLite=t.createPopper=void 0;var r=n(21926);t.popperGenerator=r.popperGenerator,t.detectOverflow=r.detectOverflow;var a=C(n(53887)),i=C(n(83662)),c=C(n(54680)),l=C(n(89290)),d=C(n(99873)),s=C(n(82566)),u=C(n(21031)),m=C(n(71313)),p=C(n(27353)),h=n(47952);t.createPopperLite=h.createPopper;var f=n(4207);function C(e){return e&&e.__esModule?e:{"default":e}}Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===f[e]||(t[e]=f[e]))}));var b=[a["default"],i["default"],c["default"],l["default"],d["default"],s["default"],u["default"],m["default"],p["default"]];t.defaultModifiers=b;var N=(0,r.popperGenerator)({defaultModifiers:b});t.createPopperLite=t.createPopper=N},2894:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t){void 0===t&&(t={});var n=t,c=n.placement,l=n.boundary,d=n.rootBoundary,s=n.padding,u=n.flipVariations,m=n.allowedAutoPlacements,p=void 0===m?r.placements:m,h=(0,o["default"])(c),f=h?u?r.variationPlacements:r.variationPlacements.filter((function(e){return(0,o["default"])(e)===h})):r.basePlacements,C=f.filter((function(e){return p.indexOf(e)>=0}));0===C.length&&(C=f);var b=C.reduce((function(t,n){return t[n]=(0,a["default"])(e,{placement:n,boundary:l,rootBoundary:d,padding:s})[(0,i["default"])(n)],t}),{});return Object.keys(b).sort((function(e,t){return b[e]-b[t]}))};var o=c(n(31686)),r=n(15954),a=c(n(75949)),i=c(n(27629));function c(e){return e&&e.__esModule?e:{"default":e}}},2002:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t,n=e.reference,c=e.element,l=e.placement,d=l?(0,o["default"])(l):null,s=l?(0,r["default"])(l):null,u=n.x+n.width/2-c.width/2,m=n.y+n.height/2-c.height/2;switch(d){case i.top:t={x:u,y:n.y-c.height};break;case i.bottom:t={x:u,y:n.y+n.height};break;case i.right:t={x:n.x+n.width,y:m};break;case i.left:t={x:n.x-c.width,y:m};break;default:t={x:n.x,y:n.y}}var p=d?(0,a["default"])(d):null;if(null!=p){var h="y"===p?"height":"width";switch(s){case i.start:t[p]=t[p]-(n[h]/2-c[h]/2);break;case i.end:t[p]=t[p]+(n[h]/2-c[h]/2)}}return t};var o=c(n(27629)),r=c(n(31686)),a=c(n(78772)),i=n(15954);function c(e){return e&&e.__esModule?e:{"default":e}}},27672:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=undefined,n(e())}))}))),t}}},75949:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e,t){void 0===t&&(t={});var n=t,m=n.placement,p=void 0===m?e.placement:m,h=n.boundary,f=void 0===h?l.clippingParents:h,C=n.rootBoundary,b=void 0===C?l.viewport:C,N=n.elementContext,g=void 0===N?l.popper:N,V=n.altBoundary,v=void 0!==V&&V,_=n.padding,y=void 0===_?0:_,k=(0,s["default"])("number"!=typeof y?y:(0,u["default"])(y,l.basePlacements)),x=g===l.popper?l.reference:l.popper,w=e.rects.popper,B=e.elements[v?x:g],L=(0,o["default"])((0,d.isElement)(B)?B:B.contextElement||(0,r["default"])(e.elements.popper),f,b),S=(0,a["default"])(e.elements.reference),I=(0,i["default"])({reference:S,element:w,strategy:"absolute",placement:p}),T=(0,c["default"])(Object.assign({},w,I)),M=g===l.popper?T:S,A={top:L.top-M.top+k.top,bottom:M.bottom-L.bottom+k.bottom,left:L.left-M.left+k.left,right:M.right-L.right+k.right},E=e.modifiersData.offset;if(g===l.popper&&E){var P=E[p];Object.keys(A).forEach((function(e){var t=[l.right,l.bottom].indexOf(e)>=0?1:-1,n=[l.top,l.bottom].indexOf(e)>=0?"y":"x";A[e]+=P[n]*t}))}return A};var o=m(n(65647)),r=m(n(25890)),a=m(n(11100)),i=m(n(2002)),c=m(n(73060)),l=n(15954),d=n(79388),s=m(n(11277)),u=m(n(45674));function m(e){return e&&e.__esModule?e:{"default":e}}},45674:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}},80885:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=0?"x":"y"}},31477:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.replace(/left|right|bottom|top/g,(function(e){return n[e]}))};var n={left:"right",right:"left",bottom:"top",top:"bottom"}},44214:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.replace(/start|end/g,(function(e){return n[e]}))};var n={start:"end",end:"start"}},31686:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return e.split("-")[1]}},36291:function(e,t){"use strict";t.__esModule=!0,t.round=t.min=t.max=void 0;var n=Math.max;t.max=n;var o=Math.min;t.min=o;var r=Math.round;t.round=r},54220:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}},11277:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){return Object.assign({},(0,r["default"])(),e)};var o,r=(o=n(22710))&&o.__esModule?o:{"default":o}},69282:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=function(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}(e);return o.modifierPhases.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])};var o=n(15954)},73060:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},12459:function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){var n=new Set;return e.filter((function(e){var o=t(e);if(!n.has(o))return n.add(o),!0}))}},30752:function(e,t,n){"use strict";t.__esModule=!0,t["default"]=function(e){e.forEach((function(t){[].concat(Object.keys(t),a).filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(n){switch(n){case"name":t.name;break;case"enabled":t.enabled;break;case"phase":r.modifierPhases.indexOf(t.phase);break;case"fn":t.fn;break;case"effect":null!=t.effect&&t.effect;break;case"requires":null!=t.requires&&Array.isArray(t.requires);break;case"requiresIfExists":Array.isArray(t.requiresIfExists)}t.requires&&t.requires.forEach((function(t){e.find((function(e){return e.name===t}))}))}))}))};(o=n(80885))&&o.__esModule;var o,r=n(15954);var a=["name","enabled","phase","fn","effect","requires","options"]},54444:function(e,t,n){"use strict";t.__esModule=!0,t.within=r,t.withinMaxClamp=function(e,t,n){var o=r(e,t,n);return o>n?n:o};var o=n(36291);function r(e,t,n){return(0,o.max)(e,(0,o.min)(t,n))}},7696:function(e,t,n){"use strict";var o=n(45744),r=n(56279),a=TypeError;e.exports=function(e){if(o(e))return e;throw a(r(e)+" is not a function")}},99079:function(e,t,n){"use strict";var o=n(49332),r=n(56279),a=TypeError;e.exports=function(e){if(o(e))return e;throw a(r(e)+" is not a constructor")}},3760:function(e,t,n){"use strict";var o=n(45744),r=String,a=TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw a("Can't set "+r(e)+" as a prototype")}},48144:function(e,t,n){"use strict";var o=n(43741),r=n(48525),a=n(92723).f,i=o("unscopables"),c=Array.prototype;c[i]==undefined&&a(c,i,{configurable:!0,value:r(null)}),e.exports=function(e){c[i][e]=!0}},21679:function(e,t,n){"use strict";var o=n(59529).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},41706:function(e,t,n){"use strict";var o=n(76469),r=TypeError;e.exports=function(e,t){if(o(t,e))return e;throw r("Incorrect invocation")}},65522:function(e,t,n){"use strict";var o=n(5484),r=String,a=TypeError;e.exports=function(e){if(o(e))return e;throw a(r(e)+" is not an object")}},65167:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},26974:function(e,t,n){"use strict";var o=n(39125);e.exports=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},92574:function(e,t,n){"use strict";var o,r,a,i=n(65167),c=n(77849),l=n(61770),d=n(45744),s=n(5484),u=n(77807),m=n(10374),p=n(56279),h=n(87229),f=n(73e3),C=n(92723).f,b=n(76469),N=n(56997),g=n(44958),V=n(43741),v=n(8220),_=n(48797),y=_.enforce,k=_.get,x=l.Int8Array,w=x&&x.prototype,B=l.Uint8ClampedArray,L=B&&B.prototype,S=x&&N(x),I=w&&N(w),T=Object.prototype,M=l.TypeError,A=V("toStringTag"),E=v("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",O=i&&!!g&&"Opera"!==m(l.opera),F=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R={BigInt64Array:8,BigUint64Array:8},j=function(e){if(!s(e))return!1;var t=m(e);return"DataView"===t||u(D,t)||u(R,t)},W=function(e){if(!s(e))return!1;var t=m(e);return u(D,t)||u(R,t)};for(o in D)(a=(r=l[o])&&r.prototype)?y(a).TypedArrayConstructor=r:O=!1;for(o in R)(a=(r=l[o])&&r.prototype)&&(y(a).TypedArrayConstructor=r);if((!O||!d(S)||S===Function.prototype)&&(S=function(){throw M("Incorrect invocation")},O))for(o in D)l[o]&&g(l[o],S);if((!O||!I||I===T)&&(I=S.prototype,O))for(o in D)l[o]&&g(l[o].prototype,I);if(O&&N(L)!==I&&g(L,I),c&&!u(I,A))for(o in F=!0,C(I,A,{get:function(){return s(this)?this[E]:undefined}}),D)l[o]&&h(l[o],E,o);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_TAG:F&&E,aTypedArray:function(e){if(W(e))return e;throw M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(d(e)&&(!g||b(S,e)))return e;throw M(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,o){if(c){if(n)for(var r in D){var a=l[r];if(a&&u(a.prototype,e))try{delete a.prototype[e]}catch(i){try{a.prototype[e]=t}catch(d){}}}I[e]&&!n||f(I,e,n?t:O&&w[e]||t,o)}},exportTypedArrayStaticMethod:function(e,t,n){var o,r;if(c){if(g){if(n)for(o in D)if((r=l[o])&&u(r,e))try{delete r[e]}catch(a){}if(S[e]&&!n)return;try{return f(S,e,n?t:O&&S[e]||t)}catch(a){}}for(o in D)!(r=l[o])||r[e]&&!n||f(r,e,t)}},getTypedArrayConstructor:function z(e){var t=N(e);if(s(t)){var n=k(t);return n&&u(n,P)?n.TypedArrayConstructor:z(t)}},isView:j,isTypedArray:W,TypedArray:S,TypedArrayPrototype:I}},10377:function(e,t,n){"use strict";var o=n(61770),r=n(90655),a=n(77849),i=n(65167),c=n(82429),l=n(87229),d=n(60495),s=n(39125),u=n(41706),m=n(94868),p=n(87543),h=n(76124),f=n(29209),C=n(56997),b=n(44958),N=n(94600).f,g=n(92723).f,V=n(8093),v=n(74337),_=n(93182),y=n(48797),k=c.PROPER,x=c.CONFIGURABLE,w=y.get,B=y.set,L="ArrayBuffer",S="DataView",I="Wrong index",T=o.ArrayBuffer,M=T,A=M&&M.prototype,E=o.DataView,P=E&&E.prototype,O=Object.prototype,F=o.Array,D=o.RangeError,R=r(V),j=r([].reverse),W=f.pack,z=f.unpack,U=function(e){return[255&e]},H=function(e){return[255&e,e>>8&255]},G=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},K=function(e){return W(e,23,4)},Y=function(e){return W(e,52,8)},$=function(e,t){g(e.prototype,t,{get:function(){return w(this)[t]}})},X=function(e,t,n,o){var r=h(n),a=w(e);if(r+t>a.byteLength)throw D(I);var i=w(a.buffer).bytes,c=r+a.byteOffset,l=v(i,c,c+t);return o?l:j(l)},Q=function(e,t,n,o,r,a){var i=h(n),c=w(e);if(i+t>c.byteLength)throw D(I);for(var l=w(c.buffer).bytes,d=i+c.byteOffset,s=o(+r),u=0;ute;)(Z=ee[te++])in M||l(M,Z,T[Z]);A.constructor=M}b&&C(P)!==O&&b(P,O);var ne=new E(new M(2)),oe=r(P.setInt8);ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||d(P,{setInt8:function(e,t){oe(this,e,t<<24>>24)},setUint8:function(e,t){oe(this,e,t<<24>>24)}},{unsafe:!0})}else A=(M=function(e){u(this,A);var t=h(e);B(this,{bytes:R(F(t),0),byteLength:t}),a||(this.byteLength=t)}).prototype,P=(E=function(e,t,n){u(this,P),u(e,A);var o=w(e).byteLength,r=m(t);if(r<0||r>o)throw D("Wrong offset");if(r+(n=n===undefined?o-r:p(n))>o)throw D("Wrong length");B(this,{buffer:e,byteLength:n,byteOffset:r}),a||(this.buffer=e,this.byteLength=n,this.byteOffset=r)}).prototype,a&&($(M,"byteLength"),$(E,"buffer"),$(E,"byteLength"),$(E,"byteOffset")),d(P,{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return q(X(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return q(X(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return z(X(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return z(X(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){Q(this,1,e,U,t)},setUint8:function(e,t){Q(this,1,e,U,t)},setInt16:function(e,t){Q(this,2,e,H,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){Q(this,2,e,H,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){Q(this,4,e,G,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){Q(this,4,e,G,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){Q(this,4,e,K,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){Q(this,8,e,Y,t,arguments.length>2?arguments[2]:undefined)}});_(M,L),_(E,S),e.exports={ArrayBuffer:M,DataView:E}},21497:function(e,t,n){"use strict";var o=n(73502),r=n(312),a=n(10950),i=n(33099),c=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),l=a(n),d=r(e,l),s=r(t,l),u=arguments.length>2?arguments[2]:undefined,m=c((u===undefined?l:r(u,l))-s,l-d),p=1;for(s0;)s in n?n[d]=n[s]:i(n,d),d+=p,s+=p;return n}},8093:function(e,t,n){"use strict";var o=n(73502),r=n(312),a=n(10950);e.exports=function(e){for(var t=o(this),n=a(t),i=arguments.length,c=r(i>1?arguments[1]:undefined,n),l=i>2?arguments[2]:undefined,d=l===undefined?n:r(l,n);d>c;)t[c++]=e;return t}},29074:function(e,t,n){"use strict";var o=n(36249).forEach,r=n(74640)("forEach");e.exports=r?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},15993:function(e,t,n){"use strict";var o=n(10950);e.exports=function(e,t){for(var n=0,r=o(t),a=new e(r);r>n;)a[n]=t[n++];return a}},49981:function(e,t,n){"use strict";var o=n(9341),r=n(76348),a=n(73502),i=n(63635),c=n(94535),l=n(49332),d=n(10950),s=n(61154),u=n(93247),m=n(52522),p=Array;e.exports=function(e){var t=a(e),n=l(this),h=arguments.length,f=h>1?arguments[1]:undefined,C=f!==undefined;C&&(f=o(f,h>2?arguments[2]:undefined));var b,N,g,V,v,_,y=m(t),k=0;if(!y||this===p&&c(y))for(b=d(t),N=n?new this(b):p(b);b>k;k++)_=C?f(t[k],k):t[k],s(N,k,_);else for(v=(V=u(t,y)).next,N=n?new this:[];!(g=r(v,V)).done;k++)_=C?i(V,f,[g.value,k],!0):g.value,s(N,k,_);return N.length=k,N}},89344:function(e,t,n){"use strict";var o=n(4254),r=n(312),a=n(10950),i=function(e){return function(t,n,i){var c,l=o(t),d=a(l),s=r(i,d);if(e&&n!=n){for(;d>s;)if((c=l[s++])!=c)return!0}else for(;d>s;s++)if((e||s in l)&&l[s]===n)return e||s||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},36249:function(e,t,n){"use strict";var o=n(9341),r=n(90655),a=n(83609),i=n(73502),c=n(10950),l=n(64711),d=r([].push),s=function(e){var t=1==e,n=2==e,r=3==e,s=4==e,u=6==e,m=7==e,p=5==e||u;return function(h,f,C,b){for(var N,g,V=i(h),v=a(V),_=o(f,C),y=c(v),k=0,x=b||l,w=t?x(h,y):n||m?x(h,0):undefined;y>k;k++)if((p||k in v)&&(g=_(N=v[k],k,V),e))if(t)w[k]=g;else if(g)switch(e){case 3:return!0;case 5:return N;case 6:return k;case 2:d(w,N)}else switch(e){case 4:return!1;case 7:d(w,N)}return u?-1:r||s?s:w}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}},93881:function(e,t,n){"use strict";var o=n(10261),r=n(4254),a=n(94868),i=n(10950),c=n(74640),l=Math.min,d=[].lastIndexOf,s=!!d&&1/[1].lastIndexOf(1,-0)<0,u=c("lastIndexOf"),m=s||!u;e.exports=m?function(e){if(s)return o(d,this,arguments)||0;var t=r(this),n=i(t),c=n-1;for(arguments.length>1&&(c=l(c,a(arguments[1]))),c<0&&(c=n+c);c>=0;c--)if(c in t&&t[c]===e)return c||0;return-1}:d},10112:function(e,t,n){"use strict";var o=n(39125),r=n(43741),a=n(64279),i=r("species");e.exports=function(e){return a>=51||!o((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},74640:function(e,t,n){"use strict";var o=n(39125);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},21038:function(e,t,n){"use strict";var o=n(7696),r=n(73502),a=n(83609),i=n(10950),c=TypeError,l=function(e){return function(t,n,l,d){o(n);var s=r(t),u=a(s),m=i(s),p=e?m-1:0,h=e?-1:1;if(l<2)for(;;){if(p in u){d=u[p],p+=h;break}if(p+=h,e?p<0:m<=p)throw c("Reduce of empty array with no initial value")}for(;e?p>=0:m>p;p+=h)p in u&&(d=n(d,u[p],p,s));return d}};e.exports={left:l(!1),right:l(!0)}},74337:function(e,t,n){"use strict";var o=n(312),r=n(10950),a=n(61154),i=Array,c=Math.max;e.exports=function(e,t,n){for(var l=r(e),d=o(t,l),s=o(n===undefined?l:n,l),u=i(c(s-d,0)),m=0;d0;)e[o]=e[--o];o!==a++&&(e[o]=n)}return e},i=function(e,t,n,o){for(var r=t.length,a=n.length,i=0,c=0;i1?arguments[1]:undefined);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!N(this,e)}}),a(p,n?{get:function(e){var t=N(this,e);return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),u&&o(p,"size",{get:function(){return C(this).size}}),s},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),a=f(o);d(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),s(t)}}},81995:function(e,t,n){"use strict";var o=n(90655),r=n(60495),a=n(49632).getWeakData,i=n(65522),c=n(5484),l=n(41706),d=n(47916),s=n(36249),u=n(77807),m=n(48797),p=m.set,h=m.getterFor,f=s.find,C=s.findIndex,b=o([].splice),N=0,g=function(e){return e.frozen||(e.frozen=new V)},V=function(){this.entries=[]},v=function(e,t){return f(e.entries,(function(e){return e[0]===t}))};V.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=C(this.entries,(function(t){return t[0]===e}));return~t&&b(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var s=e((function(e,r){l(e,m),p(e,{type:t,id:N++,frozen:undefined}),r!=undefined&&d(r,e[o],{that:e,AS_ENTRIES:n})})),m=s.prototype,f=h(t),C=function(e,t,n){var o=f(e),r=a(i(t),!0);return!0===r?g(o).set(t,n):r[o.id]=n,e};return r(m,{"delete":function(e){var t=f(this);if(!c(e))return!1;var n=a(e);return!0===n?g(t)["delete"](e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=f(this);if(!c(e))return!1;var n=a(e);return!0===n?g(t).has(e):n&&u(n,t.id)}}),r(m,n?{get:function(e){var t=f(this);if(c(e)){var n=a(e);return!0===n?g(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return C(this,e,t)}}:{add:function(e){return C(this,e,!0)}}),s}}},18291:function(e,t,n){"use strict";var o=n(59450),r=n(61770),a=n(90655),i=n(16851),c=n(73e3),l=n(49632),d=n(47916),s=n(41706),u=n(45744),m=n(5484),p=n(39125),h=n(98994),f=n(93182),C=n(75121);e.exports=function(e,t,n){var b=-1!==e.indexOf("Map"),N=-1!==e.indexOf("Weak"),g=b?"set":"add",V=r[e],v=V&&V.prototype,_=V,y={},k=function(e){var t=a(v[e]);c(v,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(N&&!m(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return N&&!m(e)?undefined:t(this,0===e?0:e)}:"has"==e?function(e){return!(N&&!m(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(i(e,!u(V)||!(N||v.forEach&&!p((function(){(new V).entries().next()})))))_=n.getConstructor(t,e,b,g),l.enable();else if(i(e,!0)){var x=new _,w=x[g](N?{}:-0,1)!=x,B=p((function(){x.has(1)})),L=h((function(e){new V(e)})),S=!N&&p((function(){for(var e=new V,t=5;t--;)e[g](t,t);return!e.has(-0)}));L||((_=t((function(e,t){s(e,v);var n=C(new V,e,_);return t!=undefined&&d(t,n[g],{that:n,AS_ENTRIES:b}),n}))).prototype=v,v.constructor=_),(B||S)&&(k("delete"),k("has"),b&&k("get")),(S||w)&&k(g),N&&v.clear&&delete v.clear}return y[e]=_,o({global:!0,constructor:!0,forced:_!=V},y),f(_,e),N||n.setStrong(_,e,b),_}},35155:function(e,t,n){"use strict";var o=n(77807),r=n(75379),a=n(12488),i=n(92723);e.exports=function(e,t,n){for(var c=r(t),l=i.f,d=a.f,s=0;s"+l+""}},92413:function(e,t,n){"use strict";var o=n(80936).IteratorPrototype,r=n(48525),a=n(20471),i=n(93182),c=n(53481),l=function(){return this};e.exports=function(e,t,n,d){var s=t+" Iterator";return e.prototype=r(o,{next:a(+!d,n)}),i(e,s,!1,!0),c[s]=l,e}},87229:function(e,t,n){"use strict";var o=n(77849),r=n(92723),a=n(20471);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},20471:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},61154:function(e,t,n){"use strict";var o=n(23986),r=n(92723),a=n(20471);e.exports=function(e,t,n){var i=o(t);i in e?r.f(e,i,a(0,n)):e[i]=n}},36849:function(e,t,n){"use strict";var o=n(90655),r=n(39125),a=n(79408).start,i=RangeError,c=Math.abs,l=Date.prototype,d=l.toISOString,s=o(l.getTime),u=o(l.getUTCDate),m=o(l.getUTCFullYear),p=o(l.getUTCHours),h=o(l.getUTCMilliseconds),f=o(l.getUTCMinutes),C=o(l.getUTCMonth),b=o(l.getUTCSeconds);e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=d.call(new Date(-50000000000001))}))||!r((function(){d.call(new Date(NaN))}))?function(){if(!isFinite(s(this)))throw i("Invalid time value");var e=this,t=m(e),n=h(e),o=t<0?"-":t>9999?"+":"";return o+a(c(t),o?6:4,0)+"-"+a(C(e)+1,2,0)+"-"+a(u(e),2,0)+"T"+a(p(e),2,0)+":"+a(f(e),2,0)+":"+a(b(e),2,0)+"."+a(n,3,0)+"Z"}:d},81990:function(e,t,n){"use strict";var o=n(65522),r=n(2118),a=TypeError;e.exports=function(e){if(o(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw a("Incorrect hint");return r(this,e)}},66384:function(e,t,n){"use strict";var o=n(28859),r=n(92723);e.exports=function(e,t,n){return n.get&&o(n.get,t,{getter:!0}),n.set&&o(n.set,t,{setter:!0}),r.f(e,t,n)}},73e3:function(e,t,n){"use strict";var o=n(45744),r=n(92723),a=n(28859),i=n(58962);e.exports=function(e,t,n,c){c||(c={});var l=c.enumerable,d=c.name!==undefined?c.name:t;return o(n)&&a(n,d,c),c.global?l?e[t]=n:i(t,n):(c.unsafe?e[t]&&(l=!0):delete e[t],l?e[t]=n:r.f(e,t,{value:n,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})),e}},60495:function(e,t,n){"use strict";var o=n(73e3);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},58962:function(e,t,n){"use strict";var o=n(61770),r=Object.defineProperty;e.exports=function(e,t){try{r(o,e,{value:t,configurable:!0,writable:!0})}catch(n){o[e]=t}return t}},11335:function(e,t,n){"use strict";var o=n(59450),r=n(76348),a=n(37249),i=n(82429),c=n(45744),l=n(92413),d=n(56997),s=n(44958),u=n(93182),m=n(87229),p=n(73e3),h=n(43741),f=n(53481),C=n(80936),b=i.PROPER,N=i.CONFIGURABLE,g=C.IteratorPrototype,V=C.BUGGY_SAFARI_ITERATORS,v=h("iterator"),_="keys",y="values",k="entries",x=function(){return this};e.exports=function(e,t,n,i,h,C,w){l(n,t,i);var B,L,S,I=function(e){if(e===h&&P)return P;if(!V&&e in A)return A[e];switch(e){case _:case y:case k:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",M=!1,A=e.prototype,E=A[v]||A["@@iterator"]||h&&A[h],P=!V&&E||I(h),O="Array"==t&&A.entries||E;if(O&&(B=d(O.call(new e)))!==Object.prototype&&B.next&&(a||d(B)===g||(s?s(B,g):c(B[v])||p(B,v,x)),u(B,T,!0,!0),a&&(f[T]=x)),b&&h==y&&E&&E.name!==y&&(!a&&N?m(A,"name",y):(M=!0,P=function(){return r(E,this)})),h)if(L={values:I(y),keys:C?P:I(_),entries:I(k)},w)for(S in L)(V||M||!(S in A))&&p(A,S,L[S]);else o({target:t,proto:!0,forced:V||M},L);return a&&!w||A[v]===P||p(A,v,P,{name:h}),f[t]=P,L}},89604:function(e,t,n){"use strict";var o=n(62660),r=n(77807),a=n(68438),i=n(92723).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||i(t,e,{value:a.f(e)})}},33099:function(e,t,n){"use strict";var o=n(56279),r=TypeError;e.exports=function(e,t){if(!delete e[t])throw r("Cannot delete property "+o(t)+" of "+o(e))}},77849:function(e,t,n){"use strict";var o=n(39125);e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},50842:function(e,t,n){"use strict";var o=n(61770),r=n(5484),a=o.document,i=r(a)&&r(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},97989:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},13811:function(e,t,n){"use strict";var o=n(42630).match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},15904:function(e){"use strict";e.exports="object"==typeof window&&"object"!=typeof Deno},86936:function(e,t,n){"use strict";var o=n(42630);e.exports=/MSIE|Trident/.test(o)},48715:function(e,t,n){"use strict";var o=n(42630),r=n(61770);e.exports=/ipad|iphone|ipod/i.test(o)&&r.Pebble!==undefined},25515:function(e,t,n){"use strict";var o=n(42630);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},67745:function(e,t,n){"use strict";var o=n(61496),r=n(61770);e.exports="process"==o(r.process)},35016:function(e,t,n){"use strict";var o=n(42630);e.exports=/web0s(?!.*chrome)/i.test(o)},42630:function(e,t,n){"use strict";var o=n(54965);e.exports=o("navigator","userAgent")||""},64279:function(e,t,n){"use strict";var o,r,a=n(61770),i=n(42630),c=a.process,l=a.Deno,d=c&&c.versions||l&&l.version,s=d&&d.v8;s&&(r=(o=s.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!r&&i&&(!(o=i.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=i.match(/Chrome\/(\d+)/))&&(r=+o[1]),e.exports=r},86778:function(e,t,n){"use strict";var o=n(42630).match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},59096:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},59450:function(e,t,n){"use strict";var o=n(61770),r=n(12488).f,a=n(87229),i=n(73e3),c=n(58962),l=n(35155),d=n(16851);e.exports=function(e,t){var n,s,u,m,p,h=e.target,f=e.global,C=e.stat;if(n=f?o:C?o[h]||c(h,{}):(o[h]||{}).prototype)for(s in t){if(m=t[s],u=e.dontCallGetSet?(p=r(n,s))&&p.value:n[s],!d(f?s:h+(C?".":"#")+s,e.forced)&&u!==undefined){if(typeof m==typeof u)continue;l(m,u)}(e.sham||u&&u.sham)&&a(m,"sham",!0),i(n,s,m,e)}}},39125:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},6531:function(e,t,n){"use strict";n(50044);var o=n(90655),r=n(73e3),a=n(50174),i=n(39125),c=n(43741),l=n(87229),d=c("species"),s=RegExp.prototype;e.exports=function(e,t,n,u){var m=c(e),p=!i((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),h=p&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[d]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!p||!h||n){var f=o(/./[m]),C=t(m,""[e],(function(e,t,n,r,i){var c=o(e),l=t.exec;return l===a||l===s.exec?p&&!i?{done:!0,value:f(t,n,r)}:{done:!0,value:c(n,t,r)}:{done:!1}}));r(String.prototype,e,C[0]),r(s,m,C[1])}u&&l(s[m],"sham",!0)}},23507:function(e,t,n){"use strict";var o=n(98037),r=n(10950),a=n(97989),i=n(9341);e.exports=function c(e,t,n,l,d,s,u,m){for(var p,h=d,f=0,C=!!u&&i(u,m);f0&&o(p)?h=c(e,t,p,r(p),h,s-1)-1:(a(h+1),e[h]=p),h++),f++;return h}},57724:function(e,t,n){"use strict";var o=n(39125);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},10261:function(e,t,n){"use strict";var o=n(14687),r=Function.prototype,a=r.apply,i=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(a):function(){return i.apply(a,arguments)})},9341:function(e,t,n){"use strict";var o=n(90655),r=n(7696),a=n(14687),i=o(o.bind);e.exports=function(e,t){return r(e),t===undefined?e:a?i(e,t):function(){return e.apply(t,arguments)}}},14687:function(e,t,n){"use strict";var o=n(39125);e.exports=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},38349:function(e,t,n){"use strict";var o=n(90655),r=n(7696),a=n(5484),i=n(77807),c=n(53898),l=n(14687),d=Function,s=o([].concat),u=o([].join),m={},p=function(e,t,n){if(!i(m,t)){for(var o=[],r=0;r]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,o,u,m){var p=n+e.length,h=o.length,f=s;return u!==undefined&&(u=r(u),f=d),c(m,f,(function(r,c){var d;switch(i(c,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":d=u[l(c,1,-1)];break;default:var s=+c;if(0===s)return r;if(s>h){var m=a(s/10);return 0===m?r:m<=h?o[m-1]===undefined?i(c,1):o[m-1]+i(c,1):r}d=o[s-1]}return d===undefined?"":d}))}},61770:function(e,t,n){"use strict";var o=function(e){return e&&e.Math==Math&&e};e.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},77807:function(e,t,n){"use strict";var o=n(90655),r=n(73502),a=o({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(r(e),t)}},31645:function(e){"use strict";e.exports={}},66791:function(e,t,n){"use strict";var o=n(61770);e.exports=function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},29093:function(e,t,n){"use strict";var o=n(54965);e.exports=o("document","documentElement")},17041:function(e,t,n){"use strict";var o=n(77849),r=n(39125),a=n(50842);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},29209:function(e){"use strict";var t=Array,n=Math.abs,o=Math.pow,r=Math.floor,a=Math.log,i=Math.LN2;e.exports={pack:function(e,c,l){var d,s,u,m=t(l),p=8*l-c-1,h=(1<>1,C=23===c?o(2,-24)-o(2,-77):0,b=e<0||0===e&&1/e<0?1:0,N=0;for((e=n(e))!=e||e===Infinity?(s=e!=e?1:0,d=h):(d=r(a(e)/i),e*(u=o(2,-d))<1&&(d--,u*=2),(e+=d+f>=1?C/u:C*o(2,1-f))*u>=2&&(d++,u/=2),d+f>=h?(s=0,d=h):d+f>=1?(s=(e*u-1)*o(2,c),d+=f):(s=e*o(2,f-1)*o(2,c),d=0));c>=8;)m[N++]=255&s,s/=256,c-=8;for(d=d<0;)m[N++]=255&d,d/=256,p-=8;return m[--N]|=128*b,m},unpack:function(e,t){var n,r=e.length,a=8*r-t-1,i=(1<>1,l=a-7,d=r-1,s=e[d--],u=127&s;for(s>>=7;l>0;)u=256*u+e[d--],l-=8;for(n=u&(1<<-l)-1,u>>=-l,l+=t;l>0;)n=256*n+e[d--],l-=8;if(0===u)u=1-c;else{if(u===i)return n?NaN:s?-Infinity:Infinity;n+=o(2,t),u-=c}return(s?-1:1)*n*o(2,u-t)}}},83609:function(e,t,n){"use strict";var o=n(90655),r=n(39125),a=n(61496),i=Object,c=o("".split);e.exports=r((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):i(e)}:i},75121:function(e,t,n){"use strict";var o=n(45744),r=n(5484),a=n(44958);e.exports=function(e,t,n){var i,c;return a&&o(i=t.constructor)&&i!==n&&r(c=i.prototype)&&c!==n.prototype&&a(e,c),e}},44790:function(e,t,n){"use strict";var o=n(90655),r=n(45744),a=n(42878),i=o(Function.toString);r(a.inspectSource)||(a.inspectSource=function(e){return i(e)}),e.exports=a.inspectSource},49632:function(e,t,n){"use strict";var o=n(59450),r=n(90655),a=n(31645),i=n(5484),c=n(77807),l=n(92723).f,d=n(94600),s=n(25586),u=n(65067),m=n(8220),p=n(57724),h=!1,f=m("meta"),C=0,b=function(e){l(e,f,{value:{objectID:"O"+C++,weakData:{}}})},N=e.exports={enable:function(){N.enable=function(){},h=!0;var e=d.f,t=r([].splice),n={};n[f]=1,e(n).length&&(d.f=function(n){for(var o=e(n),r=0,a=o.length;rN;N++)if((V=S(e[N]))&&d(f,V))return V;return new h(!1)}C=s(e,b)}for(v=C.next;!(_=r(v,C)).done;){try{V=S(_.value)}catch(I){m(C,"throw",I)}if("object"==typeof V&&V&&d(f,V))return V}return new h(!1)}},80261:function(e,t,n){"use strict";var o=n(76348),r=n(65522),a=n(36750);e.exports=function(e,t,n){var i,c;r(e);try{if(!(i=a(e,"return"))){if("throw"===t)throw n;return n}i=o(i,e)}catch(l){c=!0,i=l}if("throw"===t)throw n;if(c)throw i;return r(i),n}},80936:function(e,t,n){"use strict";var o,r,a,i=n(39125),c=n(45744),l=n(48525),d=n(56997),s=n(73e3),u=n(43741),m=n(37249),p=u("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(r=d(d(a)))!==Object.prototype&&(o=r):h=!0),o==undefined||i((function(){var e={};return o[p].call(e)!==e}))?o={}:m&&(o=l(o)),c(o[p])||s(o,p,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:h}},53481:function(e){"use strict";e.exports={}},10950:function(e,t,n){"use strict";var o=n(87543);e.exports=function(e){return o(e.length)}},28859:function(e,t,n){"use strict";var o=n(39125),r=n(45744),a=n(77807),i=n(77849),c=n(82429).CONFIGURABLE,l=n(44790),d=n(48797),s=d.enforce,u=d.get,m=Object.defineProperty,p=i&&!o((function(){return 8!==m((function(){}),"length",{value:8}).length})),h=String(String).split("String"),f=e.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&m(e,"name",{value:t,configurable:!0}),p&&n&&a(n,"arity")&&e.length!==n.arity&&m(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?i&&m(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(r){}var o=s(e);return a(o,"source")||(o.source=h.join("string"==typeof t?t:"")),e};Function.prototype.toString=f((function(){return r(this)&&u(this).source||l(this)}),"toString")},73346:function(e){"use strict";var t=Math.expm1,n=Math.exp;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||-2e-17!=t(-2e-17)?function(e){var t=+e;return 0==t?t:t>-1e-6&&t<1e-6?t+t*t/2:n(t)-1}:t},92647:function(e,t,n){"use strict";var o=n(61303),r=Math.abs,a=Math.pow,i=a(2,-52),c=a(2,-23),l=a(2,127)*(2-c),d=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=+e,s=r(a),u=o(a);return sl||n!=n?u*Infinity:u*n}},12153:function(e){"use strict";var t=Math.log,n=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*n}},28010:function(e){"use strict";var t=Math.log;e.exports=Math.log1p||function(e){var n=+e;return n>-1e-8&&n<1e-8?n-n*n/2:t(1+n)}},61303:function(e){"use strict";e.exports=Math.sign||function(e){var t=+e;return 0==t||t!=t?t:t<0?-1:1}},9275:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var o=+e;return(o>0?n:t)(o)}},34063:function(e,t,n){"use strict";var o,r,a,i,c,l,d,s,u=n(61770),m=n(9341),p=n(12488).f,h=n(61777).set,f=n(25515),C=n(48715),b=n(35016),N=n(67745),g=u.MutationObserver||u.WebKitMutationObserver,V=u.document,v=u.process,_=u.Promise,y=p(u,"queueMicrotask"),k=y&&y.value;k||(o=function(){var e,t;for(N&&(e=v.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?i():a=undefined,n}}a=undefined,e&&e.enter()},f||N||b||!g||!V?!C&&_&&_.resolve?((d=_.resolve(undefined)).constructor=_,s=m(d.then,d),i=function(){s(o)}):N?i=function(){v.nextTick(o)}:(h=m(h,u),i=function(){h(o)}):(c=!0,l=V.createTextNode(""),new g(o).observe(l,{characterData:!0}),i=function(){l.data=c=!c})),e.exports=k||function(e){var t={fn:e,next:undefined};a&&(a.next=t),r||(r=t,i()),a=t}},58822:function(e,t,n){"use strict";var o=n(67581);e.exports=o&&!!Symbol["for"]&&!!Symbol.keyFor},67581:function(e,t,n){"use strict";var o=n(64279),r=n(39125);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},37494:function(e,t,n){"use strict";var o=n(61770),r=n(45744),a=n(44790),i=o.WeakMap;e.exports=r(i)&&/native code/.test(a(i))},16002:function(e,t,n){"use strict";var o=n(7696),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},96794:function(e,t,n){"use strict";var o=n(71857),r=TypeError;e.exports=function(e){if(o(e))throw r("The method doesn't accept regular expressions");return e}},46329:function(e,t,n){"use strict";var o=n(61770).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},90119:function(e,t,n){"use strict";var o=n(61770),r=n(39125),a=n(90655),i=n(95372),c=n(56404).trim,l=n(93966),d=a("".charAt),s=o.parseFloat,u=o.Symbol,m=u&&u.iterator,p=1/s(l+"-0")!=-Infinity||m&&!r((function(){s(Object(m))}));e.exports=p?function(e){var t=c(i(e)),n=s(t);return 0===n&&"-"==d(t,0)?-0:n}:s},80280:function(e,t,n){"use strict";var o=n(61770),r=n(39125),a=n(90655),i=n(95372),c=n(56404).trim,l=n(93966),d=o.parseInt,s=o.Symbol,u=s&&s.iterator,m=/^[+-]?0x/i,p=a(m.exec),h=8!==d(l+"08")||22!==d(l+"0x16")||u&&!r((function(){d(Object(u))}));e.exports=h?function(e,t){var n=c(i(e));return d(n,t>>>0||(p(m,n)?16:10))}:d},35350:function(e,t,n){"use strict";var o=n(77849),r=n(90655),a=n(76348),i=n(39125),c=n(21417),l=n(41543),d=n(89328),s=n(73502),u=n(83609),m=Object.assign,p=Object.defineProperty,h=r([].concat);e.exports=!m||i((function(){if(o&&1!==m({b:1},m(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=m({},e)[n]||c(m({},t)).join("")!=r}))?function(e,t){for(var n=s(e),r=arguments.length,i=1,m=l.f,p=d.f;r>i;)for(var f,C=u(arguments[i++]),b=m?h(c(C),m(C)):c(C),N=b.length,g=0;N>g;)f=b[g++],o&&!a(p,C,f)||(n[f]=C[f]);return n}:m},48525:function(e,t,n){"use strict";var o,r=n(65522),a=n(86328),i=n(59096),c=n(31645),l=n(29093),d=n(50842),s=n(95541),u=s("IE_PROTO"),m=function(){},p=function(e){return"