diff --git a/code/ATMOSPHERICS/components/unary_devices/cryo.dm b/code/ATMOSPHERICS/components/unary_devices/cryo.dm index 57785704c36..9674aa921e1 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cryo.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cryo.dm @@ -1,312 +1,312 @@ -/obj/machinery/atmospherics/components/unary/cryo_cell - name = "cryo cell" - icon = 'icons/obj/cryogenics.dmi' - icon_state = "cell-off" - density = 1 - anchored = 1 - layer = 4 - - var/on = 0 - var/temperature_archived - var/obj/item/weapon/reagent_containers/glass/beaker = null - var/next_trans = 0 - var/current_heat_capacity = 50 - state_open = 0 - var/efficiency = 1 - var/autoEject = 0 - -/obj/machinery/atmospherics/components/unary/cryo_cell/New() - ..() - initialize_directions = dir - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/cryo_tube(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/stack/cable_coil(null, 1) - - -/obj/machinery/atmospherics/components/unary/cryo_cell/construction() - ..(dir,dir) - -/obj/machinery/atmospherics/components/unary/cryo_cell/RefreshParts() - var/C - for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - C += M.rating - current_heat_capacity = 50 * C - efficiency = C - -/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy() - var/turf/T = loc - T.contents += contents - - if(beaker) - beaker.loc = get_step(loc, SOUTH) // Beaker is carefully ejected from the wreckage of the cryotube. - beaker = null - return ..() - -/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos() - ..() - var/datum/gas_mixture/air_contents = AIR1 - - if(air_contents) - temperature_archived = air_contents.temperature - heat_gas_contents() - if(abs(temperature_archived-air_contents.temperature) > 1) - update_parents() - -/obj/machinery/atmospherics/components/unary/cryo_cell/process() - ..() - if(occupant && occupant.health >= 100) - on = 0 - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - if(autoEject) - open_machine() - - if(!NODE1 || !is_operational()) - return - if(AIR1) - if(on && occupant) - process_occupant() - expel_gas() - - return 1 - -/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user) - if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !iscarbon(target)) - return - close_machine(target) - -/obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user) - return - -/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist() - usr << "You struggle inside the cryotube, kicking the release with your foot." - sleep(150) - if(!src || !usr || (!occupant && !contents.Find(usr))) // Make sure they didn't disappear. - return - open_machine() - -/obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) - ..() - - var/list/otherstuff = contents - beaker - if(otherstuff.len > 0) - user << "You can just about make out some loose objects floating in the murk:" - for(var/atom/movable/floater in otherstuff) - user << "\icon[floater] [floater.name]" - else - user << "Seems empty." - -/obj/machinery/atmospherics/components/unary/cryo_cell/attack_hand(mob/user) - if(..() | !user) - return - interact(user) - -/obj/machinery/atmospherics/components/unary/cryo_cell/interact(mob/user) - if(panel_open) - return - ui_interact(user) - -/obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) - ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) - if (!ui) - ui = new(user, src, ui_key, "cryo", name, 520, 600, state = notcontained_state) - ui.open() - -/obj/machinery/atmospherics/components/unary/cryo_cell/get_ui_data() - // this is the data which will be sent to the ui - var/datum/gas_mixture/air_contents = AIR1 - - var/data = list() - data["isOperating"] = on - data["hasOccupant"] = occupant ? 1 : 0 - data["autoEject"] = autoEject - - var/occupantData = list() - if (!occupant) - occupantData["name"] = null - occupantData["stat"] = null - occupantData["health"] = null - occupantData["maxHealth"] = null - occupantData["minHealth"] = null - occupantData["bruteLoss"] = null - occupantData["oxyLoss"] = null - occupantData["toxLoss"] = null - occupantData["fireLoss"] = null - occupantData["bodyTemperature"] = null - else - occupantData["name"] = occupant.name - occupantData["stat"] = occupant.stat - occupantData["health"] = occupant.health - occupantData["maxHealth"] = occupant.maxHealth - occupantData["minHealth"] = config.health_threshold_dead - occupantData["bruteLoss"] = occupant.getBruteLoss() - occupantData["oxyLoss"] = occupant.getOxyLoss() - occupantData["toxLoss"] = occupant.getToxLoss() - occupantData["fireLoss"] = occupant.getFireLoss() - occupantData["bodyTemperature"] = occupant.bodytemperature - data["occupant"] = occupantData - - data["isOpen"] = state_open - data["cellTemperature"] = round(air_contents.temperature) - data["cellTemperatureStatus"] = "good" - if(air_contents.temperature > T0C) // if greater than 273.15 kelvin (0 celcius) - data["cellTemperatureStatus"] = "bad" - else if(air_contents.temperature > 225) - data["cellTemperatureStatus"] = "average" - - data["isBeakerLoaded"] = beaker ? 1 : 0 - var beakerContents[0] - if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list... - data["beakerContents"] = beakerContents - return data - -/obj/machinery/atmospherics/components/unary/cryo_cell/ui_act(action, params) - if(..()) - return - - switch(action) - if("open") - open_machine() - if("close") - close_machine() - if("autoeject") - autoEject = !autoEject - if("on") - if(!state_open) - on = 1 - if("off") - on = 0 - if("ejectbeaker") - if(beaker) - beaker.loc = get_step(loc, SOUTH) - beaker = null - update_icon() - return 1 - -/obj/machinery/atmospherics/components/unary/cryo_cell/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/weapon/reagent_containers/glass)) - if(isrobot(user)) - return - if(beaker) - user << "A beaker is already loaded into [src]!" - return - if(!user.drop_item()) - return - - beaker = I - I.loc = src - user.visible_message("[user] places [I] in [src].", \ - "You place [I] in [src].") - - if(!(on || occupant || state_open)) - if(default_deconstruction_screwdriver(user, "cell-o", "cell-off", I)) - return - - if(default_change_direction_wrench(user, I)) - return - - if(exchange_parts(user, I)) - return - - if(default_pry_open(I)) - return - - default_deconstruction_crowbar(I) - -/obj/machinery/atmospherics/components/unary/cryo_cell/open_machine() - if(!state_open && !panel_open) - on = 0 - layer = 3 - if(occupant) - occupant.bodytemperature = Clamp(occupant.bodytemperature, 261, 360) - ..() - if(beaker) - beaker.loc = src - -/obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/M) - if(state_open && !panel_open) - layer = 4 - ..(M) - return occupant - -/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() - if(panel_open) - icon_state = "cell-o" - return - if(state_open) - icon_state = "cell-open" - return - if(on && is_operational()) - if(occupant) - icon_state = "cell-occupied" - else - icon_state = "cell-on" - else - icon_state = "cell-off" - -/obj/machinery/atmospherics/components/unary/cryo_cell/power_change() - ..() - update_icon() - -/obj/machinery/atmospherics/components/unary/cryo_cell/proc/process_occupant() - var/datum/gas_mixture/air_contents = AIR1 - if(!on) - return - if(air_contents.total_moles() < 10) - return - if(occupant) - if(occupant.stat == 2 || occupant.health >= 100) //Why waste energy on dead or healthy people - occupant.bodytemperature = T0C - return - occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature) * current_heat_capacity / (current_heat_capacity + air_contents.heat_capacity()) - occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise //TODO: fix someone else's broken promise - duncathan - if(occupant.bodytemperature < T0C) - occupant.sleeping = max(5 / efficiency, (1 / occupant.bodytemperature) * 2000 / efficiency) - occupant.Paralyse(max(5 / efficiency, (1 / occupant.bodytemperature) * 3000 / efficiency)) - if(air_contents.oxygen > 2) - if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1) - else - occupant.adjustOxyLoss(-1) - // Severe damage should heal waaay slower without proper chemicals... - if(occupant.bodytemperature < 225) - if(occupant.getToxLoss()) - occupant.adjustToxLoss(max(-efficiency, (-20*(efficiency ** 2)) / occupant.getToxLoss())) - var/heal_brute = occupant.getBruteLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getBruteLoss()) : 0 - var/heal_fire = occupant.getFireLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getFireLoss()) : 0 - occupant.heal_organ_damage(heal_brute, heal_fire) - if(beaker && next_trans == 0) - beaker.reagents.trans_to(occupant, 1, 10) - beaker.reagents.reaction(occupant, VAPOR) - next_trans++ - if(next_trans == 10) - next_trans = 0 - - -/obj/machinery/atmospherics/components/unary/cryo_cell/proc/heat_gas_contents() - var/datum/gas_mixture/air_contents = AIR1 - - if(air_contents.total_moles() < 1) - return - var/air_heat_capacity = air_contents.heat_capacity() - var/combined_heat_capacity = current_heat_capacity + air_heat_capacity - if(combined_heat_capacity > 0) - var/combined_energy = T20C * current_heat_capacity + air_heat_capacity * air_contents.temperature - air_contents.temperature = combined_energy/combined_heat_capacity - -/obj/machinery/atmospherics/components/unary/cryo_cell/proc/expel_gas() - var/datum/gas_mixture/air_contents = AIR1 - - if(air_contents.total_moles() < 1) - return - var/datum/gas_mixture/expel_gas = new - var/remove_amount = air_contents.total_moles() / 100 - expel_gas = air_contents.remove(remove_amount) - expel_gas.temperature = T20C //Lets expel hot gas and see if that helps people not die as they are removed - loc.assume_air(expel_gas) +/obj/machinery/atmospherics/components/unary/cryo_cell + name = "cryo cell" + icon = 'icons/obj/cryogenics.dmi' + icon_state = "cell-off" + density = 1 + anchored = 1 + layer = 4 + + var/on = 0 + var/temperature_archived + var/obj/item/weapon/reagent_containers/glass/beaker = null + var/next_trans = 0 + var/current_heat_capacity = 50 + state_open = 0 + var/efficiency = 1 + var/autoEject = 0 + +/obj/machinery/atmospherics/components/unary/cryo_cell/New() + ..() + initialize_directions = dir + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/cryo_tube(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/stack/cable_coil(null, 1) + + +/obj/machinery/atmospherics/components/unary/cryo_cell/construction() + ..(dir,dir) + +/obj/machinery/atmospherics/components/unary/cryo_cell/RefreshParts() + var/C + for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) + C += M.rating + current_heat_capacity = 50 * C + efficiency = C + +/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy() + var/turf/T = loc + T.contents += contents + + if(beaker) + beaker.loc = get_step(loc, SOUTH) // Beaker is carefully ejected from the wreckage of the cryotube. + beaker = null + return ..() + +/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos() + ..() + var/datum/gas_mixture/air_contents = AIR1 + + if(air_contents) + temperature_archived = air_contents.temperature + heat_gas_contents() + if(abs(temperature_archived-air_contents.temperature) > 1) + update_parents() + +/obj/machinery/atmospherics/components/unary/cryo_cell/process() + ..() + if(occupant && occupant.health >= 100) + on = 0 + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + if(autoEject) + open_machine() + + if(!NODE1 || !is_operational()) + return + if(AIR1) + if(on && occupant) + process_occupant() + expel_gas() + + return 1 + +/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user) + if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !iscarbon(target)) + return + close_machine(target) + +/obj/machinery/atmospherics/components/unary/cryo_cell/relaymove(mob/user) + return + +/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist() + usr << "You struggle inside the cryotube, kicking the release with your foot." + sleep(150) + if(!src || !usr || (!occupant && !contents.Find(usr))) // Make sure they didn't disappear. + return + open_machine() + +/obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) + ..() + + var/list/otherstuff = contents - beaker + if(otherstuff.len > 0) + user << "You can just about make out some loose objects floating in the murk:" + for(var/atom/movable/floater in otherstuff) + user << "\icon[floater] [floater.name]" + else + user << "Seems empty." + +/obj/machinery/atmospherics/components/unary/cryo_cell/attack_hand(mob/user) + if(..() | !user) + return + interact(user) + +/obj/machinery/atmospherics/components/unary/cryo_cell/interact(mob/user) + if(panel_open) + return + ui_interact(user) + +/obj/machinery/atmospherics/components/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0) + ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open) + if (!ui) + ui = new(user, src, ui_key, "cryo", name, 410, 550, state = notcontained_state) + ui.open() + +/obj/machinery/atmospherics/components/unary/cryo_cell/get_ui_data() + // this is the data which will be sent to the ui + var/datum/gas_mixture/air_contents = AIR1 + + var/data = list() + data["isOperating"] = on + data["hasOccupant"] = occupant ? 1 : 0 + data["autoEject"] = autoEject + + var/occupantData = list() + if (!occupant) + occupantData["name"] = null + occupantData["stat"] = null + occupantData["health"] = null + occupantData["maxHealth"] = null + occupantData["minHealth"] = null + occupantData["bruteLoss"] = null + occupantData["oxyLoss"] = null + occupantData["toxLoss"] = null + occupantData["fireLoss"] = null + occupantData["bodyTemperature"] = null + else + occupantData["name"] = occupant.name + occupantData["stat"] = occupant.stat + occupantData["health"] = occupant.health + occupantData["maxHealth"] = occupant.maxHealth + occupantData["minHealth"] = config.health_threshold_dead + occupantData["bruteLoss"] = occupant.getBruteLoss() + occupantData["oxyLoss"] = occupant.getOxyLoss() + occupantData["toxLoss"] = occupant.getToxLoss() + occupantData["fireLoss"] = occupant.getFireLoss() + occupantData["bodyTemperature"] = occupant.bodytemperature + data["occupant"] = occupantData + + data["isOpen"] = state_open + data["cellTemperature"] = round(air_contents.temperature) + data["cellTemperatureStatus"] = "good" + if(air_contents.temperature > T0C) // if greater than 273.15 kelvin (0 celcius) + data["cellTemperatureStatus"] = "bad" + else if(air_contents.temperature > 225) + data["cellTemperatureStatus"] = "average" + + data["isBeakerLoaded"] = beaker ? 1 : 0 + var beakerContents[0] + if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) + for(var/datum/reagent/R in beaker.reagents.reagent_list) + beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list... + data["beakerContents"] = beakerContents + return data + +/obj/machinery/atmospherics/components/unary/cryo_cell/ui_act(action, params) + if(..()) + return + + switch(action) + if("open") + open_machine() + if("close") + close_machine() + if("autoeject") + autoEject = !autoEject + if("on") + if(!state_open) + on = 1 + if("off") + on = 0 + if("ejectbeaker") + if(beaker) + beaker.loc = get_step(loc, SOUTH) + beaker = null + update_icon() + return 1 + +/obj/machinery/atmospherics/components/unary/cryo_cell/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/weapon/reagent_containers/glass)) + if(isrobot(user)) + return + if(beaker) + user << "A beaker is already loaded into [src]!" + return + if(!user.drop_item()) + return + + beaker = I + I.loc = src + user.visible_message("[user] places [I] in [src].", \ + "You place [I] in [src].") + + if(!(on || occupant || state_open)) + if(default_deconstruction_screwdriver(user, "cell-o", "cell-off", I)) + return + + if(default_change_direction_wrench(user, I)) + return + + if(exchange_parts(user, I)) + return + + if(default_pry_open(I)) + return + + default_deconstruction_crowbar(I) + +/obj/machinery/atmospherics/components/unary/cryo_cell/open_machine() + if(!state_open && !panel_open) + on = 0 + layer = 3 + if(occupant) + occupant.bodytemperature = Clamp(occupant.bodytemperature, 261, 360) + ..() + if(beaker) + beaker.loc = src + +/obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/M) + if(state_open && !panel_open) + layer = 4 + ..(M) + return occupant + +/obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() + if(panel_open) + icon_state = "cell-o" + return + if(state_open) + icon_state = "cell-open" + return + if(on && is_operational()) + if(occupant) + icon_state = "cell-occupied" + else + icon_state = "cell-on" + else + icon_state = "cell-off" + +/obj/machinery/atmospherics/components/unary/cryo_cell/power_change() + ..() + update_icon() + +/obj/machinery/atmospherics/components/unary/cryo_cell/proc/process_occupant() + var/datum/gas_mixture/air_contents = AIR1 + if(!on) + return + if(air_contents.total_moles() < 10) + return + if(occupant) + if(occupant.stat == 2 || occupant.health >= 100) //Why waste energy on dead or healthy people + occupant.bodytemperature = T0C + return + occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature) * current_heat_capacity / (current_heat_capacity + air_contents.heat_capacity()) + occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise //TODO: fix someone else's broken promise - duncathan + if(occupant.bodytemperature < T0C) + occupant.sleeping = max(5 / efficiency, (1 / occupant.bodytemperature) * 2000 / efficiency) + occupant.Paralyse(max(5 / efficiency, (1 / occupant.bodytemperature) * 3000 / efficiency)) + if(air_contents.oxygen > 2) + if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1) + else + occupant.adjustOxyLoss(-1) + // Severe damage should heal waaay slower without proper chemicals... + if(occupant.bodytemperature < 225) + if(occupant.getToxLoss()) + occupant.adjustToxLoss(max(-efficiency, (-20*(efficiency ** 2)) / occupant.getToxLoss())) + var/heal_brute = occupant.getBruteLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getBruteLoss()) : 0 + var/heal_fire = occupant.getFireLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getFireLoss()) : 0 + occupant.heal_organ_damage(heal_brute, heal_fire) + if(beaker && next_trans == 0) + beaker.reagents.trans_to(occupant, 1, 10) + beaker.reagents.reaction(occupant, VAPOR) + next_trans++ + if(next_trans == 10) + next_trans = 0 + + +/obj/machinery/atmospherics/components/unary/cryo_cell/proc/heat_gas_contents() + var/datum/gas_mixture/air_contents = AIR1 + + if(air_contents.total_moles() < 1) + return + var/air_heat_capacity = air_contents.heat_capacity() + var/combined_heat_capacity = current_heat_capacity + air_heat_capacity + if(combined_heat_capacity > 0) + var/combined_energy = T20C * current_heat_capacity + air_heat_capacity * air_contents.temperature + air_contents.temperature = combined_energy/combined_heat_capacity + +/obj/machinery/atmospherics/components/unary/cryo_cell/proc/expel_gas() + var/datum/gas_mixture/air_contents = AIR1 + + if(air_contents.total_moles() < 1) + return + var/datum/gas_mixture/expel_gas = new + var/remove_amount = air_contents.total_moles() / 100 + expel_gas = air_contents.remove(remove_amount) + expel_gas.temperature = T20C //Lets expel hot gas and see if that helps people not die as they are removed + loc.assume_air(expel_gas) air_update_turf() \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index e68c5d08c52..c565740299b 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -68,7 +68,7 @@ if(current) //remove ourself from our old body's mind variable current.mind = null - SSnano.user_transferred(current, new_character) + SSnano.on_transfer(current, new_character) if(key) if(new_character.key != key) //if we're transfering into a body with a key associated which is not ours diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 91198db5fe4..630da54c790 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -1,240 +1,233 @@ -/* -Asset cache quick users guide: - -Make a datum at the bottom of this file with your assets for your thing. -The simple subsystem will most like be of use for most cases. -Then call get_asset_datum() with the type of the datum you created and store the return -Then call .send(client) on that stored return value. - -You can set verify to TRUE if you want send() to sleep until the client has the assets. -*/ - - -// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping. -// This is doubled for the first asset, then added per asset after -#define ASSET_CACHE_SEND_TIMEOUT 7 - -//When sending mutiple assets, how many before we give the client a quaint little sending resources message -#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8 - -/client - var/list/cache = list() // List of all assets sent to this client by the asset cache. - var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement. - var/list/sending = list() - var/last_asset_job = 0 // Last job done. - -//This proc sends the asset to the client, but only if it needs it. -//This proc blocks(sleeps) unless verify is set to false -/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE) - if(!istype(client)) - if(ismob(client)) - var/mob/M = client - if(M.client) - client = M.client - - else - return 0 - - else - return 0 - - if(client.cache.Find(asset_name) || client.sending.Find(asset_name)) - return 0 - - client << browse_rsc(SSasset.cache[asset_name], asset_name) - if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. - if (client) - client.cache += asset_name - return 1 - if (!client) - return 0 - - client.sending |= asset_name - var/job = ++client.last_asset_job - - client << browse({" - - "}, "window=asset_cache_browser") - - var/t = 0 - var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT - while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() - sleep(1) // Lock up the caller until this is received. - t++ - - if(client) - client.sending -= asset_name - client.cache |= asset_name - client.completed_asset_jobs -= job - - return 1 - -//This proc blocks(sleeps) unless verify is set to false -/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE) - if(!istype(client)) - if(ismob(client)) - var/mob/M = client - if(M.client) - client = M.client - - else - return 0 - - else - return 0 - - var/list/unreceived = asset_list - (client.cache + client.sending) - if(!unreceived || !unreceived.len) - return 0 - if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT) - client << "Sending Resources..." - for(var/asset in unreceived) - if (asset in SSasset.cache) - client << browse_rsc(SSasset.cache[asset], asset) - - if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. - if (client) - client.cache += unreceived - return 1 - if (!client) - return 0 - client.sending |= unreceived - var/job = ++client.last_asset_job - - client << browse({" - - "}, "window=asset_cache_browser") - - var/t = 0 - var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len - while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() - sleep(1) // Lock up the caller until this is received. - t++ - - if(client) - client.sending -= unreceived - client.cache |= unreceived - client.completed_asset_jobs -= job - - return 1 - -//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start. -//The proc calls procs that sleep for long times. -/proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE) - for(var/file in files) - if (!client) - break - if (register_asset) - register_asset(file,files[file]) - send_asset(client,file) - sleep(-1) //queuing calls like this too quickly can cause issues in some client versions - -//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up. -//if it's an icon or something be careful, you'll have to copy it before further use. -/proc/register_asset(var/asset_name, var/asset) - SSasset.cache[asset_name] = asset - -//These datums are used to populate the asset cache, the proc "register()" does this. - -//all of our asset datums, used for referring to these later -/var/global/list/asset_datums = list() - -//get a assetdatum or make a new one -/proc/get_asset_datum(var/type) - if (!(type in asset_datums)) - return new type() - return asset_datums[type] - -/datum/asset/New() - asset_datums[type] = src - -/datum/asset/proc/register() - return - -/datum/asset/proc/send(client) - return - -//If you don't need anything complicated. -/datum/asset/simple - var/assets = list() - var/verify = FALSE - -/datum/asset/simple/register() - for(var/asset_name in assets) - register_asset(asset_name, assets[asset_name]) -/datum/asset/simple/send(client) - send_asset_list(client,assets,verify) - - -//DEFINITIONS FOR ASSET DATUMS START HERE. - - -/datum/asset/simple/nanoui - assets = list( - "nanoui.lib.js" = 'nano/assets/nanoui.lib.js', - "nanoui.main.js" = 'nano/assets/nanoui.main.js', - "nanoui.templates.js" = 'nano/assets/nanoui.templates.js', - "nanoui.lib.css" = 'nano/assets/nanoui.lib.css', - "nanoui.common.css" = 'nano/assets/nanoui.common.css', - "nanoui.generic.css" = 'nano/assets/nanoui.generic.css', - "nanoui.nanotrasen.css" = 'nano/assets/nanoui.nanotrasen.css', - "fontawesome-webfont.eot" = 'nano/assets/fontawesome-webfont.eot', - "fontawesome-webfont.woff2" = 'nano/assets/fontawesome-webfont.woff2' - ) - -/datum/asset/simple/pda - assets = list( - "pda_atmos.png" = 'icons/pda_icons/pda_atmos.png', - "pda_back.png" = 'icons/pda_icons/pda_back.png', - "pda_bell.png" = 'icons/pda_icons/pda_bell.png', - "pda_blank.png" = 'icons/pda_icons/pda_blank.png', - "pda_boom.png" = 'icons/pda_icons/pda_boom.png', - "pda_bucket.png" = 'icons/pda_icons/pda_bucket.png', - "pda_medbot.png" = 'icons/pda_icons/pda_medbot.png', - "pda_floorbot.png" = 'icons/pda_icons/pda_floorbot.png', - "pda_cleanbot.png" = 'icons/pda_icons/pda_cleanbot.png', - "pda_crate.png" = 'icons/pda_icons/pda_crate.png', - "pda_cuffs.png" = 'icons/pda_icons/pda_cuffs.png', - "pda_eject.png" = 'icons/pda_icons/pda_eject.png', - "pda_exit.png" = 'icons/pda_icons/pda_exit.png', - "pda_flashlight.png" = 'icons/pda_icons/pda_flashlight.png', - "pda_honk.png" = 'icons/pda_icons/pda_honk.png', - "pda_mail.png" = 'icons/pda_icons/pda_mail.png', - "pda_medical.png" = 'icons/pda_icons/pda_medical.png', - "pda_menu.png" = 'icons/pda_icons/pda_menu.png', - "pda_mule.png" = 'icons/pda_icons/pda_mule.png', - "pda_notes.png" = 'icons/pda_icons/pda_notes.png', - "pda_power.png" = 'icons/pda_icons/pda_power.png', - "pda_rdoor.png" = 'icons/pda_icons/pda_rdoor.png', - "pda_reagent.png" = 'icons/pda_icons/pda_reagent.png', - "pda_refresh.png" = 'icons/pda_icons/pda_refresh.png', - "pda_scanner.png" = 'icons/pda_icons/pda_scanner.png', - "pda_signaler.png" = 'icons/pda_icons/pda_signaler.png', - "pda_status.png" = 'icons/pda_icons/pda_status.png' - ) - -/datum/asset/simple/paper - assets = list( - "large_stamp-clown.png" = 'icons/stamp_icons/large_stamp-clown.png', - "large_stamp-deny.png" = 'icons/stamp_icons/large_stamp-deny.png', - "large_stamp-ok.png" = 'icons/stamp_icons/large_stamp-ok.png', - "large_stamp-hop.png" = 'icons/stamp_icons/large_stamp-hop.png', - "large_stamp-cmo.png" = 'icons/stamp_icons/large_stamp-cmo.png', - "large_stamp-ce.png" = 'icons/stamp_icons/large_stamp-ce.png', - "large_stamp-hos.png" = 'icons/stamp_icons/large_stamp-hos.png', - "large_stamp-rd.png" = 'icons/stamp_icons/large_stamp-rd.png', - "large_stamp-cap.png" = 'icons/stamp_icons/large_stamp-cap.png', - "large_stamp-qm.png" = 'icons/stamp_icons/large_stamp-qm.png', - "large_stamp-law.png" = 'icons/stamp_icons/large_stamp-law.png' - ) - - -//Registers HTML Interface assets. -/datum/asset/HTML_interface/register() - for(var/path in typesof(/datum/html_interface)) - var/datum/html_interface/hi = new path() - hi.registerResources() +/* +Asset cache quick users guide: + +Make a datum at the bottom of this file with your assets for your thing. +The simple subsystem will most like be of use for most cases. +Then call get_asset_datum() with the type of the datum you created and store the return +Then call .send(client) on that stored return value. + +You can set verify to TRUE if you want send() to sleep until the client has the assets. +*/ + + +// Amount of time(ds) MAX to send per asset, if this get exceeded we cancel the sleeping. +// This is doubled for the first asset, then added per asset after +#define ASSET_CACHE_SEND_TIMEOUT 7 + +//When sending mutiple assets, how many before we give the client a quaint little sending resources message +#define ASSET_CACHE_TELL_CLIENT_AMOUNT 8 + +/client + var/list/cache = list() // List of all assets sent to this client by the asset cache. + var/list/completed_asset_jobs = list() // List of all completed jobs, awaiting acknowledgement. + var/list/sending = list() + var/last_asset_job = 0 // Last job done. + +//This proc sends the asset to the client, but only if it needs it. +//This proc blocks(sleeps) unless verify is set to false +/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE) + if(!istype(client)) + if(ismob(client)) + var/mob/M = client + if(M.client) + client = M.client + + else + return 0 + + else + return 0 + + if(client.cache.Find(asset_name) || client.sending.Find(asset_name)) + return 0 + + client << browse_rsc(SSasset.cache[asset_name], asset_name) + if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. + if (client) + client.cache += asset_name + return 1 + if (!client) + return 0 + + client.sending |= asset_name + var/job = ++client.last_asset_job + + client << browse({" + + "}, "window=asset_cache_browser") + + var/t = 0 + var/timeout_time = (ASSET_CACHE_SEND_TIMEOUT * client.sending.len) + ASSET_CACHE_SEND_TIMEOUT + while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() + sleep(1) // Lock up the caller until this is received. + t++ + + if(client) + client.sending -= asset_name + client.cache |= asset_name + client.completed_asset_jobs -= job + + return 1 + +//This proc blocks(sleeps) unless verify is set to false +/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE) + if(!istype(client)) + if(ismob(client)) + var/mob/M = client + if(M.client) + client = M.client + + else + return 0 + + else + return 0 + + var/list/unreceived = asset_list - (client.cache + client.sending) + if(!unreceived || !unreceived.len) + return 0 + if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT) + client << "Sending Resources..." + for(var/asset in unreceived) + if (asset in SSasset.cache) + client << browse_rsc(SSasset.cache[asset], asset) + + if(!verify || !winexists(client, "asset_cache_browser")) // Can't access the asset cache browser, rip. + if (client) + client.cache += unreceived + return 1 + if (!client) + return 0 + client.sending |= unreceived + var/job = ++client.last_asset_job + + client << browse({" + + "}, "window=asset_cache_browser") + + var/t = 0 + var/timeout_time = ASSET_CACHE_SEND_TIMEOUT * client.sending.len + while(client && !client.completed_asset_jobs.Find(job) && t < timeout_time) // Reception is handled in Topic() + sleep(1) // Lock up the caller until this is received. + t++ + + if(client) + client.sending -= unreceived + client.cache |= unreceived + client.completed_asset_jobs -= job + + return 1 + +//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start. +//The proc calls procs that sleep for long times. +/proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE) + for(var/file in files) + if (!client) + break + if (register_asset) + register_asset(file,files[file]) + send_asset(client,file) + sleep(-1) //queuing calls like this too quickly can cause issues in some client versions + +//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up. +//if it's an icon or something be careful, you'll have to copy it before further use. +/proc/register_asset(var/asset_name, var/asset) + SSasset.cache[asset_name] = asset + +//These datums are used to populate the asset cache, the proc "register()" does this. + +//all of our asset datums, used for referring to these later +/var/global/list/asset_datums = list() + +//get a assetdatum or make a new one +/proc/get_asset_datum(var/type) + if (!(type in asset_datums)) + return new type() + return asset_datums[type] + +/datum/asset/New() + asset_datums[type] = src + +/datum/asset/proc/register() + return + +/datum/asset/proc/send(client) + return + +//If you don't need anything complicated. +/datum/asset/simple + var/assets = list() + var/verify = FALSE + +/datum/asset/simple/register() + for(var/asset_name in assets) + register_asset(asset_name, assets[asset_name]) +/datum/asset/simple/send(client) + send_asset_list(client,assets,verify) + + +//DEFINITIONS FOR ASSET DATUMS START HERE. + + +/datum/asset/simple/nanoui + assets = list( + "nanoui.js" = 'nano/assets/nanoui.js', + "nanoui.css" = 'nano/assets/nanoui.css', + ) + +/datum/asset/simple/pda + assets = list( + "pda_atmos.png" = 'icons/pda_icons/pda_atmos.png', + "pda_back.png" = 'icons/pda_icons/pda_back.png', + "pda_bell.png" = 'icons/pda_icons/pda_bell.png', + "pda_blank.png" = 'icons/pda_icons/pda_blank.png', + "pda_boom.png" = 'icons/pda_icons/pda_boom.png', + "pda_bucket.png" = 'icons/pda_icons/pda_bucket.png', + "pda_medbot.png" = 'icons/pda_icons/pda_medbot.png', + "pda_floorbot.png" = 'icons/pda_icons/pda_floorbot.png', + "pda_cleanbot.png" = 'icons/pda_icons/pda_cleanbot.png', + "pda_crate.png" = 'icons/pda_icons/pda_crate.png', + "pda_cuffs.png" = 'icons/pda_icons/pda_cuffs.png', + "pda_eject.png" = 'icons/pda_icons/pda_eject.png', + "pda_exit.png" = 'icons/pda_icons/pda_exit.png', + "pda_flashlight.png" = 'icons/pda_icons/pda_flashlight.png', + "pda_honk.png" = 'icons/pda_icons/pda_honk.png', + "pda_mail.png" = 'icons/pda_icons/pda_mail.png', + "pda_medical.png" = 'icons/pda_icons/pda_medical.png', + "pda_menu.png" = 'icons/pda_icons/pda_menu.png', + "pda_mule.png" = 'icons/pda_icons/pda_mule.png', + "pda_notes.png" = 'icons/pda_icons/pda_notes.png', + "pda_power.png" = 'icons/pda_icons/pda_power.png', + "pda_rdoor.png" = 'icons/pda_icons/pda_rdoor.png', + "pda_reagent.png" = 'icons/pda_icons/pda_reagent.png', + "pda_refresh.png" = 'icons/pda_icons/pda_refresh.png', + "pda_scanner.png" = 'icons/pda_icons/pda_scanner.png', + "pda_signaler.png" = 'icons/pda_icons/pda_signaler.png', + "pda_status.png" = 'icons/pda_icons/pda_status.png' + ) + +/datum/asset/simple/paper + assets = list( + "large_stamp-clown.png" = 'icons/stamp_icons/large_stamp-clown.png', + "large_stamp-deny.png" = 'icons/stamp_icons/large_stamp-deny.png', + "large_stamp-ok.png" = 'icons/stamp_icons/large_stamp-ok.png', + "large_stamp-hop.png" = 'icons/stamp_icons/large_stamp-hop.png', + "large_stamp-cmo.png" = 'icons/stamp_icons/large_stamp-cmo.png', + "large_stamp-ce.png" = 'icons/stamp_icons/large_stamp-ce.png', + "large_stamp-hos.png" = 'icons/stamp_icons/large_stamp-hos.png', + "large_stamp-rd.png" = 'icons/stamp_icons/large_stamp-rd.png', + "large_stamp-cap.png" = 'icons/stamp_icons/large_stamp-cap.png', + "large_stamp-qm.png" = 'icons/stamp_icons/large_stamp-qm.png', + "large_stamp-law.png" = 'icons/stamp_icons/large_stamp-law.png' + ) + + +//Registers HTML Interface assets. +/datum/asset/HTML_interface/register() + for(var/path in typesof(/datum/html_interface)) + var/datum/html_interface/hi = new path() + hi.registerResources() diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 4c7da6069be..f1bc6dcabcc 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -1,5 +1,5 @@ /mob/Logout() - SSnano.user_logout(src) // this is used to clean up (remove) this user's Nano UIs + SSnano.on_logout(src) player_list -= src log_access("Logout: [key_name(src)]") if(admin_datums[src.ckey]) diff --git a/code/modules/nano/external.dm b/code/modules/nano/external.dm index bd72394934e..fcf1a4cf4d4 100644 --- a/code/modules/nano/external.dm +++ b/code/modules/nano/external.dm @@ -27,6 +27,20 @@ datum/topic_state/state = default_state) return -1 // Sorta implemented. + /** + * public + * + * Data to be sent to the NanoUI. + * This must be implemented for a NanoUI to work. + * + * required user mob The mob interacting with the NanoUI. + * + * return list Data to be sent to the NanoUI. + **/ +/atom/movable/proc/get_ui_data(mob/user) + return list() // Not implemented. + + /** * public * @@ -41,18 +55,6 @@ /atom/movable/proc/ui_act(action, list/params) return // Not implemented. - /** - * public - * - * Data to be sent to the NanoUI. - * This must be implemented for a NanoUI to work. - * - * required user mob The mob interacting with the NanoUI. - * - * return list Data to be sent to the NanoUI. - **/ -/atom/movable/proc/get_ui_data(mob/user) - return list() // Not implemented. /** * private @@ -67,7 +69,6 @@ * global * * Used to track NanoUIs for a mob. - * **/ /mob/var/list/open_uis = list() diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 076d8baba53..b2b76fdf2f5 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -1,405 +1,403 @@ - /** - * NanoUI - * - * Contains the NanoUI datum, and its procs. - * - * /tg/station user interface library - * thanks to baystation12 - * - * modified by neersighted - **/ - - /** - * NanoUI datum: - * - * Represents a NanoUI. - **/ -/datum/nanoui - var/mob/user // The mob who opened/is using the NanoUI. - var/atom/movable/src_object // The object which owns the NanoUI. - var/title // The title of te NanoUI. - var/ui_key // The ui_key of the NanoUI. This allows multiple UIs for one src_object. - var/window_id // The window_id for browse() and onclose(). - var/width = 0 // The window width. - var/height = 0 // The window height - var/window_options = list( // Extra options to winset(). - "focus" = 0, - "titlebar" = 1, - "can_resize" = 1, - "can_minimize" = 1, - "can_maximize" = 0, - "can_close" = 1, - "auto_format" = 0 - ) - var/atom/ref = null // An extra ref to call when the window is closed. - var/layout = "nanotrasen" // The layout to be used for this UI. - var/template // The template to be used for this UI. - var/auto_update = 1 // Update the NanoUI every MC tick. - var/list/initial_data // The data (and datastructure) used to initialize the NanoUI - var/status = NANO_INTERACTIVE // The status/visibility of the NanoUI. - var/datum/topic_state/state = null // Topic state used to determine status. Topic states are in interactions/. - var/datum/nanoui/master_ui // The parent NanoUI. - var/list/datum/nanoui/children = list() // Children of this NanoUI. - - /** - * public - * - * Create a new NanoUI. - * - * required user mob The mob who opened/is using the NanoUI. - * required src_object atom/movable The object which owns the NanoUI. - * required ui_key string The ui_key of the NanoUI. - * required template string The template to render the NanoUI content with. - * optional title string The title of the NanoUI. - * optional width int The window width. - * optional height int The window height. - * optional ref atom An extra ref to use when the window is closed. - * optional master_ui datum/nanoui The parent NanoUI. - * optional state datum/topic_state The state used to determine status. - * - * return datum/nanoui The requested NanoUI. - **/ -/datum/nanoui/New(mob/user, atom/movable/src_object, ui_key, template, \ - title = 0, width = 0, height = 0, \ - atom/ref = null, datum/nanoui/master_ui = null, \ - datum/topic_state/state = default_state) - src.user = user - src.src_object = src_object - src.ui_key = ui_key - src.window_id = "\ref[src_object]-[ui_key]" - - set_template(template) - - if (title) - src.title = sanitize(title) - if (width) - src.width = width - if (height) - src.height = height - - if (ref) - src.ref = ref - - src.master_ui = master_ui - if(master_ui) - master_ui.children += src - src.state = state - - var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nanoui) - assets.send(user) - - - /** - * public - * - * Enable/disable auto-updating of the NanoUI. - * - * required state bool Enable/disable auto-updating. - **/ -/datum/nanoui/proc/set_auto_update(state = 1) - auto_update = state - - /** - * private - * - * Set the data to initialize the NanoUI with. - * The datastructure cannot be changed by subsequent updates. - * - * optional data list The data/datastructure to initialize the NanoUI with. - **/ -/datum/nanoui/proc/set_initial_data(list/data) - initial_data = data - - /** - * private - * - * Get the config data/datastructure to initialize the NanoUI with. - * - * return list The config data. - **/ -/datum/nanoui/proc/get_config_data() - var/list/config_data = list( - "title" = title, - "status" = status, - "ref" = "\ref[src]", - "window" = list( - "width" = width, - "height" = height, - "ref" = window_id - ), - "user" = list( - "name" = user.name, - "fancy" = user.client.prefs.nanoui_fancy, - "ref" = "\ref[user]" - ), - "srcObject" = list( - "name" = src_object.name, - "ref" = "\ref[src_object]" - ), - "templates" = list( - "layout" = "_[layout]", - "content" = "[template]" - ) - ) - return config_data - - /** - * private - * - * Package the data to send to the UI. - * This is the (regular) data and config data, bundled together. - * - * return list The packaged data. - **/ -/datum/nanoui/proc/get_send_data(list/data) - var/list/send_data = list() - - send_data["config"] = get_config_data() - if (!isnull(data)) - send_data["data"] = data - - return send_data - - /** - * public - * - * Sets the browse() window options for this NanoUI. - * - * required window_options list The window options to set. - **/ -/datum/nanoui/proc/set_window_options(list/window_options) - src.window_options = window_options - - /** - * public - * - * Set the layout for this NanoUI. - * This loads custom layout styles and templates for this NanoUI. - * - * required layout string The new UI layout. - **/ -/datum/nanoui/proc/set_layout(layout) - src.layout = lowertext(layout) - - /** - * public - * - * Set the template for this NanoUI. - * - * required template string The new UI template. - **/ -/datum/nanoui/proc/set_template(template) - src.template = lowertext(template) - - /** - * private - * - * Generate HTML for this NanoUI. - * - * return string NanoUI HTML output. - **/ -/datum/nanoui/proc/get_html() - // Generate - - - "} - var/stylesheet_html = {" - - - - - "} - - // Generate JSON. - var/list/send_data = get_send_data(initial_data) - var/initial_data_json = replacetext(JSON.stringify(send_data), "'", "\\'") - - // Generate the HTML document. - return {" - - - - - - [stylesheet_html] - [script_html] - - -
-
-
- Sending Resources... -
-
- - - - "} - - /** - * public - * - * Open this NanoUI (and initialize it with data). - * - * optional data list The data to intialize the UI with. - **/ -/datum/nanoui/proc/open(list/data = null) - if(!user.client) return - - if (!initial_data) - if (!data) // If we don't have initial_data and data was not passed, get data from the src_object. - data = src_object.get_ui_data(user) - set_initial_data(data) // Otherwise use the passed data. - - var/window_size = "" - if (width && height) // If we have a width and height, use them. - window_size = "size=[width]x[height];" - update_status(push = 0) // Update the window state. - if (status == NANO_CLOSE) - return // Bail if we should close. - - user << browse(get_html(), "window=[window_id];[window_size][list2params(window_options)]") // Open the window. - winset(user, window_id, "on-close=\"nanoclose \ref[src]\"") // Instruct the client to signal NanoUI when the window is closed. - SSnano.ui_opened(src) // Call the opened handler. - - /** - * public - * - * Reinitialize the NanoUI. - * (Possibly with a new template and/or data). - * - * optional template string The filename of the new template. - * optional data list The new initial data. - **/ -/datum/nanoui/proc/reinitialize(template, list/data) - if(template) - src.template = template // Set a new template. - if(data) - set_initial_data(data) // Replace the initial_data. - open() - - /** - * public - * - * Close the NanoUI, and all its children. - **/ -/datum/nanoui/proc/close() - set_auto_update(0) // Disable auto-updates. - user << browse(null, "window=[window_id]") // Close the window. - SSnano.ui_closed(src) // Call the closed handler. - for(var/datum/nanoui/child in children) // Loop through and close all children. - child.close() - - /** - * private - * - * Push data to an already open NanoUI. - * - * required data list The data to send. - * optional force bool If the update should be sent regardless of state. - **/ -/datum/nanoui/proc/push_data(data, force = 0) - update_status(push = 0) // Update the window state. - if (status == NANO_DISABLED && !force) - return // Cannot update UI, we have no visibility. - - var/list/send_data = get_send_data(data) // Get the data to send. - - // Send the new data to the recieveUpdate() Javascript function. - user << output(list2params(list(JSON.stringify(send_data))), "[window_id].browser:receiveUpdate") - - /** - * private - * - * Handle clicks from the NanoUI. - * Call the src_object's Topic() if status is NANO_INTERACTIVE. - * If the src_object's Topic() returns 1, update all UIs attacked to it. - **/ -/datum/nanoui/Topic(href, href_list) - update_status(push = 0) // Update the window state. - if (status != NANO_INTERACTIVE || user != usr) - return // If UI is not interactive or usr calling Topic is not the UI user. - - var/action = href_list["nano"] // Pull the action out. - href_list -= "nano" - - var/update = src_object.ui_act(action, href_list, state) // Call Topic() on the src_object. - - if (src_object && update) - SSnano.update_uis(src_object) // If we have a src_object and its Topic() told us to update. - - /** - * private - * - * Update the NanoUI. Only updates the contents/layout if update is true, - * otherwise only updates the status. - * - * optional force bool If the UI should be forced to update. - **/ -/datum/nanoui/process(force = 0) - if (!src_object || !user) // If the object or user died (or something else), abort. - close() - return - - if (status && (force || auto_update)) - update() // Update the UI if the status and update settings allow it. - else - update_status(push = 1) // Otherwise only update status. - - /** - * private - * - * Updates the UI by interacting with the src_object again, which will hopefully - * call try_ui_update on it. - * - * optional force_open bool If force_open should be passed to ui_interact. - **/ -/datum/nanoui/proc/update(force_open = 0) - src_object.ui_interact(user, ui_key, src, force_open, master_ui, state) - - /** - * private - * - * Set the status/visibility of the NanoUI. - * - * required state int The status to set (NANO_CLOSE/NANO_DISABLED/NANO_UPDATE/NANO_INTERACTIVE). - * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). - **/ -/datum/nanoui/proc/set_status(state, push = 0) - if (state != status) // Only update if status has changed. - if (status == NANO_DISABLED) - status = state - if (push) - update() - else - status = state - if (push || status == 0) // Force an update if NANO_DISABLED. - push_data(null, 1) - - /** - * private - * - * Update the status/visibility of the NanoUI for its user. - * - * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). - **/ -/datum/nanoui/proc/update_status(push = 0) - var/new_status = src_object.CanUseTopic(user, state) - if(master_ui) - new_status = min(new_status, master_ui.status) - - set_status(new_status, push) - if(new_status == NANO_CLOSE) - close() \ No newline at end of file + /** + * NanoUI + * + * Contains the NanoUI datum, and its procs. + * + * /tg/station user interface library + * thanks to baystation12 + * + * modified by neersighted + **/ + + /** + * NanoUI datum: + * + * Represents a NanoUI. + **/ +/datum/nanoui + var/mob/user // The mob who opened/is using the NanoUI. + var/atom/movable/src_object // The object which owns the NanoUI. + var/title // The title of te NanoUI. + var/ui_key // The ui_key of the NanoUI. This allows multiple UIs for one src_object. + var/window_id // The window_id for browse() and onclose(). + var/width = 0 // The window width. + var/height = 0 // The window height + var/window_options = list( // Extra options to winset(). + "focus" = 0, + "titlebar" = 1, + "can_resize" = 1, + "can_minimize" = 1, + "can_maximize" = 0, + "can_close" = 1, + "auto_format" = 0 + ) + var/atom/ref = null // An extra ref to call when the window is closed. + var/layout = "nanotrasen" // The layout to be used for this UI. + var/template // The template to be used for this UI. + var/auto_update = 1 // Update the NanoUI every MC tick. + var/list/initial_data // The data (and datastructure) used to initialize the NanoUI + var/status = NANO_INTERACTIVE // The status/visibility of the NanoUI. + var/datum/topic_state/state = null // Topic state used to determine status. Topic states are in interactions/. + var/datum/nanoui/master_ui // The parent NanoUI. + var/list/datum/nanoui/children = list() // Children of this NanoUI. + + /** + * public + * + * Create a new NanoUI. + * + * required user mob The mob who opened/is using the NanoUI. + * required src_object atom/movable The object which owns the NanoUI. + * required ui_key string The ui_key of the NanoUI. + * required template string The template to render the NanoUI content with. + * optional title string The title of the NanoUI. + * optional width int The window width. + * optional height int The window height. + * optional ref atom An extra ref to use when the window is closed. + * optional master_ui datum/nanoui The parent NanoUI. + * optional state datum/topic_state The state used to determine status. + * + * return datum/nanoui The requested NanoUI. + **/ +/datum/nanoui/New(mob/user, atom/movable/src_object, ui_key, template, \ + title = 0, width = 0, height = 0, \ + atom/ref = null, datum/nanoui/master_ui = null, \ + datum/topic_state/state = default_state) + src.user = user + src.src_object = src_object + src.ui_key = ui_key + src.window_id = "\ref[src_object]-[ui_key]" + + set_template(template) + + if (title) + src.title = sanitize(title) + if (width) + src.width = width + if (height) + src.height = height + + if (ref) + src.ref = ref + + src.master_ui = master_ui + if(master_ui) + master_ui.children += src + src.state = state + + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nanoui) + assets.send(user) + + /** + * public + * + * Open this NanoUI (and initialize it with data). + * + * optional data list The data to intialize the UI with. + **/ +/datum/nanoui/proc/open(list/data = null) + if(!user.client) + return // Bail if there is no client. + if (status == NANO_CLOSE) + return // Bail if we should close. + + if (!initial_data) + if (!data) // If we don't have initial_data and data was not passed, get data from the src_object. + data = src_object.get_ui_data(user) + set_initial_data(data) // Otherwise use the passed data. + + var/window_size = "" + if (width && height) // If we have a width and height, use them. + window_size = "size=[width]x[height];" + update_status(push = 0) // Update the window state. + + user << browse(get_html(), "window=[window_id];[window_size][list2params(window_options)]") // Open the window. + winset(user, window_id, "on-close=\"nanoclose \ref[src]\"") // Instruct the client to signal NanoUI when the window is closed. + SSnano.on_open(src) + + /** + * public + * + * Reinitialize the NanoUI. + * (Possibly with a new template and/or data). + * + * optional template string The filename of the new template. + * optional data list The new initial data. + **/ +/datum/nanoui/proc/reinitialize(template, list/data) + if(template) + set_template(template) // Set a new template. + if(data) + set_initial_data(data) // Replace the initial_data. + open() + + /** + * public + * + * Close the NanoUI, and all its children. + **/ +/datum/nanoui/proc/close() + set_auto_update(0) // Disable auto-updates. + user << browse(null, "window=[window_id]") // Close the window. + SSnano.on_close(src) + for(var/datum/nanoui/child in children) // Loop through and close all children. + child.close() + + /** + * public + * + * Sets the browse() window options for this NanoUI. + * + * required window_options list The window options to set. + **/ +/datum/nanoui/proc/set_window_options(list/window_options) + src.window_options = window_options + + /** + * public + * + * Set the layout for this NanoUI. + * This loads custom layout styles and templates for this NanoUI. + * + * required layout string The new UI layout. + **/ +/datum/nanoui/proc/set_layout(layout) + src.layout = lowertext(layout) + + /** + * public + * + * Set the template for this NanoUI. + * + * required template string The new UI template. + **/ +/datum/nanoui/proc/set_template(template) + src.template = lowertext(template) + + /** + * public + * + * Enable/disable auto-updating of the NanoUI. + * + * required state bool Enable/disable auto-updating. + **/ +/datum/nanoui/proc/set_auto_update(state = 1) + auto_update = state + + /** + * private + * + * Set the data to initialize the NanoUI with. + * The datastructure cannot be changed by subsequent updates. + * + * optional data list The data/datastructure to initialize the NanoUI with. + **/ +/datum/nanoui/proc/set_initial_data(list/data) + initial_data = data + + /** + * private + * + * Generate HTML for this NanoUI. + * + * return string NanoUI HTML output. + **/ +/datum/nanoui/proc/get_html() + // Generate + "} + var/stylesheet_html = {" + + + + "} + + // Generate JSON. + var/list/send_data = get_send_data(initial_data) + var/initial_data_json = replacetext(JSON.stringify(send_data), "'", "'") + + // Generate the HTML document. + return {" + + + + + + [stylesheet_html] + [script_html] + + +
+
+
+ Sending Resources... +
+
+ + + + "} + + /** + * private + * + * Get the config data/datastructure to initialize the NanoUI with. + * + * return list The config data. + **/ +/datum/nanoui/proc/get_config_data() + var/list/config_data = list( + "title" = title, + "status" = status, + "ref" = "\ref[src]", + "window" = list( + "width" = width, + "height" = height, + "ref" = window_id + ), + "user" = list( + "name" = user.name, + "fancy" = user.client.prefs.nanoui_fancy, + "ref" = "\ref[user]" + ), + "srcObject" = list( + "name" = src_object.name, + "ref" = "\ref[src_object]" + ), + "templates" = list( + "layout" = "_[layout]", + "content" = "[template]" + ) + ) + return config_data + + /** + * private + * + * Package the data to send to the UI. + * This is the (regular) data and config data, bundled together. + * + * return list The packaged data. + **/ +/datum/nanoui/proc/get_send_data(list/data) + var/list/send_data = list() + + send_data["config"] = get_config_data() + if (!isnull(data)) + send_data["data"] = data + + return send_data + + /** + * private + * + * Handle clicks from the NanoUI. + * Call the src_object's Topic() if status is NANO_INTERACTIVE. + * If the src_object's Topic() returns 1, update all UIs attacked to it. + **/ +/datum/nanoui/Topic(href, href_list) + update_status(push = 0) // Update the window state. + if (status != NANO_INTERACTIVE || user != usr) + return // If UI is not interactive or usr calling Topic is not the UI user. + + var/action = href_list["nano"] // Pull the action out. + href_list -= "nano" + + var/update = src_object.ui_act(action, href_list, state) // Call Topic() on the src_object. + + if (src_object && update) + SSnano.update_uis(src_object) // If we have a src_object and its Topic() told us to update. + + /** + * private + * + * Update the NanoUI. Only updates the contents/layout if update is true, + * otherwise only updates the status. + * + * optional force bool If the UI should be forced to update. + **/ +/datum/nanoui/process(force = 0) + if (!src_object || !user) // If the object or user died (or something else), abort. + close() + return + + if (status && (force || auto_update)) + update() // Update the UI if the status and update settings allow it. + else + update_status(push = 1) // Otherwise only update status. + + /** + * private + * + * Push data to an already open NanoUI. + * + * required data list The data to send. + * optional force bool If the update should be sent regardless of state. + **/ +/datum/nanoui/proc/push_data(data, force = 0) + update_status(push = 0) // Update the window state. + if (status == NANO_DISABLED && !force) + return // Cannot update UI, we have no visibility. + + var/list/send_data = get_send_data(data) // Get the data to send. + + // Send the new data to the recieveUpdate() Javascript function. + user << output(list2params(list(JSON.stringify(send_data))), "[window_id].browser:receiveUpdate") + + + /** + * private + * + * Updates the UI by interacting with the src_object again, which will hopefully + * call try_ui_update on it. + * + * optional force_open bool If force_open should be passed to ui_interact. + **/ +/datum/nanoui/proc/update(force_open = 0) + src_object.ui_interact(user, ui_key, src, force_open, master_ui, state) + + /** + * private + * + * Update the status/visibility of the NanoUI for its user. + * + * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). + **/ +/datum/nanoui/proc/update_status(push = 0) + var/new_status = src_object.nano_state(user, state) + if(master_ui) + new_status = min(new_status, master_ui.status) + + set_status(new_status, push) + if(new_status == NANO_CLOSE) + close() + + /** + * private + * + * Set the status/visibility of the NanoUI. + * + * required state int The status to set (NANO_CLOSE/NANO_DISABLED/NANO_UPDATE/NANO_INTERACTIVE). + * optional push bool Push an update to the UI (an update is always sent for NANO_DISABLED). + **/ +/datum/nanoui/proc/set_status(state, push = 0) + if (state != status) // Only update if status has changed. + if (status == NANO_DISABLED) + status = state + if (push) + update() + else + status = state + if (push || status == 0) // Force an update if NANO_DISABLED. + push_data(null, 1) \ No newline at end of file diff --git a/code/modules/nano/states/states.dm b/code/modules/nano/states/states.dm index 0034342e9db..3d2c61bf027 100644 --- a/code/modules/nano/states/states.dm +++ b/code/modules/nano/states/states.dm @@ -14,7 +14,7 @@ * * return NANO_state The state of the UI. **/ -/atom/proc/CanUseTopic(mob/user, datum/topic_state/state) +/atom/proc/nano_state(mob/user, datum/topic_state/state) var/src_object = nano_host() return state.can_use_topic(src_object, user) // Check if the state allows interaction. diff --git a/code/modules/nano/subsystem.dm b/code/modules/nano/subsystem.dm index 7e6840198df..8b468b94186 100644 --- a/code/modules/nano/subsystem.dm +++ b/code/modules/nano/subsystem.dm @@ -158,7 +158,7 @@ * * required ui datum/nanoui The UI to be added. **/ -/datum/subsystem/nano/proc/ui_opened(datum/nanoui/ui) +/datum/subsystem/nano/proc/on_open(datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) open_uis[src_object_key] = list(ui.ui_key = list()) // Make a list for the ui_key and src_object. @@ -180,7 +180,7 @@ * * return bool If the UI was removed or not. **/ -/datum/subsystem/nano/proc/ui_closed(datum/nanoui/ui) +/datum/subsystem/nano/proc/on_close(datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // It wasn't open. @@ -203,7 +203,7 @@ * * return int The number of NanoUIs closed. **/ -/datum/subsystem/nano/proc/user_logout(mob/user) +/datum/subsystem/nano/proc/on_logout(mob/user) return close_user_uis(user) /** @@ -216,7 +216,7 @@ * * return bool If the NanoUIs were transferred. **/ -/datum/subsystem/nano/proc/user_transferred(mob/oldMob, mob/newMob) +/datum/subsystem/nano/proc/on_transfer(mob/oldMob, mob/newMob) if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) return 0 // The old mob had no open NanoUIs. diff --git a/nano/Gulpfile.coffee b/nano/Gulpfile.coffee index 1775e2c0232..6fc390ddd29 100644 --- a/nano/Gulpfile.coffee +++ b/nano/Gulpfile.coffee @@ -1,127 +1,121 @@ -### Settings ### -util = require("gulp-util") -s = - min: util.env.min - colorblind: util.env.colorblind - -# Project Paths -input = - fonts: "**/*.{eot,woff2}" - images: "images" - scripts: "scripts" - styles: "styles" - templates: "templates" - -output = - dir: "assets" - scripts: - lib: "nanoui.lib.js" - main: "nanoui.main.js" - styles: - lib: "nanoui.lib.css" - prefix: "nanoui." - templates: "nanoui.templates.js" - -# doT Settings -dotOpts = - evaluate: /\{\{([\s\S]+?)\}\}/g, - interpolate: /\{\{=([\s\S]+?)\}\}/g, - encode: /\{\{!([\s\S]+?)\}\}/g, - use: /\{\{#([\s\S]+?)\}\}/g, - define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, - conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, - iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, - varname: "data, config, helper", - strip: true, - append: true, - selfcontained: true - -### Pacakages ### -bower = require "main-bower-files" -child_process = require "child_process" -del = require "del" -gulp = require "gulp" -merge = require "merge-stream" - -### Plugins ### -g = require("gulp-load-plugins")({replaceString: /^gulp(-|\.)|-/g}) -p = - autoprefixer: require "autoprefixer" - colorblind: require "postcss-colorblind" - fontweights: require "postcss-font-weights" - gradient: require "postcss-filter-gradient" - opacity: require "postcss-opacity" - plsfilters: require "pleeease-filters" - rgba: require "postcss-color-rgba-fallback" - -### Helpers ### - -glob = (path) -> - "#{path}/*" - -### Tasks ### -gulp.task "default", ["fonts", "scripts", "styles", "templates"] - -gulp.task "clean", -> - del glob output.dir - -gulp.task "watch", -> - gulp.watch [glob input.images], ["reload"] - gulp.watch [glob input.scripts], ["reload"] - gulp.watch [glob input.styles], ["reload"] - gulp.watch [glob input.templates], ["reload"] - -gulp.task "reload", ["default"], -> - child_process.exec "reload.bat", (err, stdout, stderr) -> - return console.log err if err - -gulp.task "fonts", ["clean"], -> - gulp.src bower input.fonts - .pipe gulp.dest output.dir - -gulp.task "scripts", ["clean"], -> - lib = gulp.src bower "**/*.js" - .pipe g.concat(output.scripts.lib) - .pipe g.if(s.min, g.uglify(), g.jsbeautifier()) - .pipe gulp.dest output.dir - - main = gulp.src glob input.scripts - .pipe g.coffee() - .pipe g.concat(output.scripts.main) - .pipe g.if(s.min, g.uglify(), g.jsbeautifier()) - .pipe gulp.dest output.dir - - merge lib, main - -gulp.task "styles", ["clean"], -> - lib = gulp.src bower "**/*.css" - .pipe g.replace("../fonts/", "") - .pipe g.concat(output.styles.lib) - .pipe g.if(s.min, g.cssnano({discardComments: {removeAll: true}}), g.csscomb()) - .pipe gulp.dest output.dir - - main = gulp.src glob input.styles - .pipe g.filter(["*.less", "!_*.less"]) - .pipe g.less({paths: [input.images]}) - .pipe g.postcss([ - p.autoprefixer({browsers: ["last 2 versions", "ie >= 8"]}), - p.plsfilters({oldIE: true}), - p.rgba({oldie: true}), - p.opacity, - p.gradient, - p.fontweights - ]) - .pipe g.if(s.colorblind, g.postcss([p.colorblind])) - .pipe g.if(s.min, g.cssnano({discardComments: {removeAll: true}}), g.csscomb()) - .pipe g.rename({prefix: output.styles.prefix}) - .pipe gulp.dest output.dir - - merge lib, main - -gulp.task "templates", ["clean"], -> - gulp.src glob input.templates - .pipe g.dotprecompiler({dictionary: "TMPL", templateSettings: dotOpts}) - .pipe g.concat(output.templates) - .pipe g.header("window.TMPL = {};\n") - .pipe g.if(s.min, g.uglify(), g.jsbeautifier()) - .pipe gulp.dest output.dir +### Settings ### +util = require("gulp-util") +f = + colorblind: util.env.colorblind || util.env.c + min: util.env.min || util.env.m + sourcemaps: util.env.sourcemaps || util.env.s + +# Project Paths +input = + images: "images" + scripts: "scripts" + styles: "styles" + templates: "templates" + +output = + dir: "assets" + js: "nanoui.js" + css: "nanoui.css" + +# doT Settings +dotOpts = + evaluate: /\{\{([\s\S]+?)\}\}/g, + interpolate: /\{\{=([\s\S]+?)\}\}/g, + encode: /\{\{!([\s\S]+?)\}\}/g, + use: /\{\{#([\s\S]+?)\}\}/g, + define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, + conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, + iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, + varname: "data, config, helper", + strip: true, + append: true, + selfcontained: true + +### Pacakages ### +bower = require "main-bower-files" +child_process = require "child_process" +del = require "del" +gulp = require "gulp" +merge = require "merge2" + +### Plugins ### +g = require("gulp-load-plugins")({replaceString: /^gulp(-|\.)|-/g}) +p = + autoprefixer: require "autoprefixer" + colorblind: require "postcss-colorblind" + fontweights: require "postcss-font-weights" + gradient: require "postcss-filter-gradient" + opacity: require "postcss-opacity" + plsfilters: require "pleeease-filters" + rgba: require "postcss-color-rgba-fallback" + +### Helpers ### + +glob = (path) -> + "#{path}/*" + +### Tasks ### +gulp.task "default", ["js", "css"] + + +gulp.task "clean", -> + del glob output.dir + + +gulp.task "watch", -> + gulp.watch [glob input.images], ["reload"] + gulp.watch [glob input.scripts], ["reload"] + gulp.watch [glob input.styles], ["reload"] + gulp.watch [glob input.templates], ["reload"] + + +gulp.task "reload", ["default"], -> + child_process.exec "reload.bat", (err, stdout, stderr) -> + return console.log err if err + + +gulp.task "js", ["clean"], -> + lib = gulp.src bower "**/*.js" + .pipe g.if(f.sourcemaps, g.sourcemaps.init()) + + main = gulp.src glob input.scripts + .pipe g.if(f.sourcemaps, g.sourcemaps.init()) + .pipe g.coffee() + + templates = gulp.src glob input.templates + .pipe g.dotprecompiler({dictionary: "TMPL", templateSettings: dotOpts}) + .pipe g.concat("templates") + .pipe g.header("window.TMPL = {};\n") + + combined = merge lib, main, templates + combined + .pipe g.concat(output.js) + .pipe g.if(f.min, g.uglify(), g.jsbeautifier()) + .pipe g.if(f.sourcemaps, g.sourcemaps.write()) + .pipe gulp.dest output.dir + + +gulp.task "css", ["clean"], -> + lib = gulp.src bower "**/*.css" + .pipe g.if(f.sourcemaps, g.sourcemaps.init()) + + main = gulp.src glob input.styles + .pipe g.filter(["*.less", "!_*.less"]) + .pipe g.if(f.sourcemaps, g.sourcemaps.init()) + .pipe g.less({paths: [input.images]}) + .pipe g.postcss([ + p.autoprefixer({browsers: ["last 2 versions", "ie >= 8"]}), + p.plsfilters({oldIE: true}), + p.rgba({oldie: true}), + p.opacity, + p.gradient, + p.fontweights + ]) + .pipe g.if(f.colorblind, g.postcss([p.colorblind])) + + combined = merge lib, main + combined + .pipe g.if(f.min, g.cssnano({discardComments: {removeAll: true}}), g.csscomb()) + .pipe g.concat(output.css) + .pipe g.if(f.sourcemaps, g.sourcemaps.write()) + .pipe gulp.dest output.dir diff --git a/nano/assets/fontawesome-webfont.eot b/nano/assets/fontawesome-webfont.eot deleted file mode 100644 index 9b6afaedc0f..00000000000 Binary files a/nano/assets/fontawesome-webfont.eot and /dev/null differ diff --git a/nano/assets/fontawesome-webfont.woff2 b/nano/assets/fontawesome-webfont.woff2 deleted file mode 100644 index 500e5172534..00000000000 Binary files a/nano/assets/fontawesome-webfont.woff2 and /dev/null differ diff --git a/nano/assets/nanoui.common.css b/nano/assets/nanoui.common.css deleted file mode 100644 index 9a13dd4b9f6..00000000000 --- a/nano/assets/nanoui.common.css +++ /dev/null @@ -1 +0,0 @@ -html{cursor:default}body,html{min-height:100%}body{font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff}h1,h2,h3{font-size:18px;margin:0;padding:6px 0}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;border:none}.normal{color:#40628a}.good{color:#537d29}.average{color:#be6209}.bad{color:#b00e0e}.highlight,.label{color:#8ba5c4}.dark{color:#272727}.bold{font-weight:700}.italic{font-style:italic}.fontReset{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.noticeStripes{background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}.hidden{display:none}.clearBoth{clear:both}.clearLeft{clear:left}.clearRight{clear:right}.floatNone{float:none}.floatLeft{float:left}.floatRight{float:right}.alignTop{vertical-align:top}.alignBottom{vertical-align:bottom}.alignLeft{text-align:left}.alignCenter{text-align:center}.alignRight{text-align:right}article.display,article.notice{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column;width:auto;padding:4px;margin:6px 2px;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000);background-color:rgba(0,0,0,.33);box-shadow:inset 0 0 5px rgba(0,0,0,.5)}article.display header,article.notice header{padding-left:4px;margin-bottom:6px;border-bottom:2px solid #40628a}article.display section,article.notice section{width:100%;padding:3px 0}article.display .label,article.notice .label{display:inline-block;margin:0;width:33%;color:#8ba5c4}article.display .content,article.notice .content{display:inline-block;margin:0;width:66%}article.display .line,article.notice .line{display:inline-block;margin:0;width:100%}article.display .buttoninfo,article.notice .buttoninfo{margin-left:5px}article.display table,article.notice table{width:auto;border-collapse:collapse}article.display table.grow,article.notice table.grow{width:100%}article.display th,article.notice th{vertical-align:top;padding:4px 16px 4px 0;text-align:left;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;color:#8ba5c4}article.display td,article.notice td{padding:2px 2px 0 0;vertical-align:top}article.notice{margin:8px 2px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}article.notice .label{color:#000}span.link{display:inline-block;box-sizing:border-box;height:22px;margin:1px;padding:2px 3px;white-space:nowrap;border:1px solid #272727;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;background-color:#40628a}span.link .fa{margin-right:3px}span.link .iconed{padding-left:3px}span.link.active{background-color:#40628a}span.link.active:hover{background-color:#507bad}span.link.active.selected{background-color:#2f943c}span.link.active.selected:hover{background-color:#3bbb4c}span.link.active.caution{background-color:#9a9d00}span.link.active.caution:hover{background-color:#ccd000}span.link.active.danger{background-color:#9d0808}span.link.active.danger:hover{background-color:#ce0a0a}span.link.inactive{background-color:#999}span.link.inactive.selected{background-color:#2f943c}span.link.inactive.caution{background-color:#9a9d00}span.link.inactive.danger{background-color:#9d0808}span.link.disabled{background-color:#999}span.link.gridable{width:125px}.bar{display:inline-block;position:relative;top:4px;vertical-align:top;box-sizing:border-box;width:100%;height:20px;margin:1px;padding:1px;border:1px solid #40628a;background:#272727}.bar .barText{position:absolute;top:1px;right:3px;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.bar .barFill{display:block;height:100%;overflow:hidden;background:#40628a}.bar .barFill.good{background:#537d29}.bar .barFill.average{background:#be6209}.bar .barFill.bad{background:#b00e0e}.bar .barFill.highlight{background:#8ba5c4}.fancy{display:none}div.loading{background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);padding:8px}div.content{margin:32px 4px 0}div.content.titlebared{padding-top:3px}header.titlebar{position:fixed;top:0;left:0;width:100%;height:32px;background-color:#363636;box-shadow:0 3px 3px rgba(0,0,0,.1)}header.titlebar .statusicon{position:absolute;top:4px;left:12px}header.titlebar .title{position:absolute;top:6px;left:46px;color:#98b0c3;font-size:16px;white-space:nowrap}header.titlebar .minimize{color:#98b0c3;position:absolute;top:6px;right:46px}header.titlebar .minimize:hover{color:#b8c9d6}header.titlebar .close{color:#98b0c3;position:absolute;top:4px;right:12px}header.titlebar .close:hover{color:#b8c9d6}div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 30px 30px;border-color:transparent transparent #363636;-webkit-transform:rotate(1turn);transform:rotate(1turn)} \ No newline at end of file diff --git a/nano/assets/nanoui.css b/nano/assets/nanoui.css new file mode 100644 index 00000000000..5b24401cc8e --- /dev/null +++ b/nano/assets/nanoui.css @@ -0,0 +1,2 @@ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} +html{cursor:default}body,html{min-height:100%}body{height:100%;background-color:#202020;font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff}h1,h2,h3{font-size:18px;margin:0;padding:6px 0}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;border:none}.normal{color:#40628a}.good{color:#537d29}.average{color:#be6209}.bad{color:#b00e0e}.highlight,.label{color:#8ba5c4}.dark{color:#272727}.bold{font-weight:700}.italic{font-style:italic}.fontReset{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.noticeStripes{background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}.hidden{display:none!important}.clearBoth{clear:both}.clearLeft{clear:left}.clearRight{clear:right}.floatNone{float:none}.floatLeft{float:left}.floatRight{float:right}.alignTop{vertical-align:top}.alignBottom{vertical-align:bottom}.alignLeft{text-align:left}.alignCenter{text-align:center}.alignRight{text-align:right}div.loading{background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);padding:8px}div.content{margin:32px 4px 0}div.content.titlebared{padding-top:3px}header.titlebar{position:fixed;top:0;left:0;width:100%;height:32px;background-color:#363636;box-shadow:0 3px 3px rgba(0,0,0,.1)}header.titlebar .statusicon{position:absolute;top:4px;left:12px}header.titlebar .title{position:absolute;top:6px;left:46px;color:#98b0c3;font-size:16px;white-space:nowrap}header.titlebar .minimize{color:#98b0c3;position:absolute;top:6px;right:46px}header.titlebar .minimize:hover{color:#b8c9d6}header.titlebar .close{color:#98b0c3;position:absolute;top:4px;right:12px}header.titlebar .close:hover{color:#b8c9d6}div.resize{position:fixed;bottom:0;right:0;width:0;height:0;border-style:solid;border-width:0 0 30px 30px;border-color:transparent transparent #363636;-webkit-transform:rotate(1turn);transform:rotate(1turn)}.fancy{display:none!important}article.display,article.notice{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column;width:auto;padding:4px;margin:6px 2px;background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#54000000,endColorStr=#54000000);background-color:rgba(0,0,0,.33);box-shadow:inset 0 0 5px rgba(0,0,0,.5)}article.display header,article.notice header{padding-left:4px;margin-bottom:6px;border-bottom:2px solid #40628a}article.display section,article.notice section{width:100%;padding:3px 0}article.display .label,article.notice .label{display:inline-block;margin:0;width:33%;color:#8ba5c4}article.display .content,article.notice .content{display:inline-block;margin:0;width:66%}article.display .line,article.notice .line{display:inline-block;margin:0;width:100%}article.display .buttoninfo,article.notice .buttoninfo{margin-left:5px}article.display table,article.notice table{width:auto;border-collapse:collapse}article.display table.grow,article.notice table.grow{width:100%}article.display th,article.notice th{vertical-align:top;padding:4px 16px 4px 0;text-align:left;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;color:#8ba5c4}article.display td,article.notice td{padding:2px 2px 0 0;vertical-align:top}article.notice{margin:8px 2px;box-shadow:none;color:#000;font-weight:700;font-style:italic;background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}article.notice .label{color:#000}span.link{display:inline-block;box-sizing:border-box;height:22px;margin:1px;padding:2px 3px;white-space:nowrap;border:1px solid #272727;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;background-color:#40628a}span.link .fa{margin-right:3px}span.link .iconed{padding-left:3px}span.link.active{background-color:#40628a}span.link.active:hover{background-color:#507bad}span.link.active.selected{background-color:#2f943c}span.link.active.selected:hover{background-color:#3bbb4c}span.link.active.caution{background-color:#9a9d00}span.link.active.caution:hover{background-color:#ccd000}span.link.active.danger{background-color:#9d0808}span.link.active.danger:hover{background-color:#ce0a0a}span.link.inactive{background-color:#999}span.link.inactive.selected{background-color:#2f943c}span.link.inactive.caution{background-color:#9a9d00}span.link.inactive.danger{background-color:#9d0808}span.link.disabled{background-color:#999}span.link.gridable{width:125px}.bar{display:inline-block;position:relative;top:4px;vertical-align:top;box-sizing:border-box;width:100%;height:20px;margin:1px;padding:1px;border:1px solid #40628a;background:#272727}.bar .barText{position:absolute;top:1px;right:3px;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.bar .barFill{display:block;height:100%;overflow:hidden;background:#40628a}.bar .barFill.good{background:#537d29}.bar .barFill.average{background:#be6209}.bar .barFill.bad{background:#b00e0e}.bar .barFill.highlight{background:#8ba5c4}body.generic{background:linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FF2A2A2A',EndColorStr='#FF202020')}body.nanotrasen{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1' viewBox='0 0 425 200' opacity='.25'%3E%3Cpath d='M178.004.04H106.8a6.76 6.026 0 0 0-6.76 6.024v187.872a6.76 6.026 0 0 0 6.76 6.025h53.107a6.76 6.026 0 0 0 6.762-6.024V92.392l72.215 104.7a6.76 6.026 0 0 0 5.76 2.87H318.2a6.76 6.026 0 0 0 6.76-6.026V6.064A6.76 6.026 0 0 0 318.2.04h-54.717a6.76 6.026 0 0 0-6.76 6.024v102.62L183.762 2.91a6.76 6.026 0 0 0-5.76-2.87zM4.845 22.11A13.412 12.502 0 0 1 13.478.04h66.118a5.365 5 0 0 1 5.365 5v79.88zM420.155 177.89a13.412 12.502 0 0 1-8.633 22.07h-66.118a5.365 5 0 0 1-5.365-5v-79.88z'/%3E%3C/svg%3E") no-repeat fixed center/70% 70%,linear-gradient(180deg,#2a2a2a 0,#202020) no-repeat fixed center/100% 100%;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FF2A2A2A',EndColorStr='#FF000000')} \ No newline at end of file diff --git a/nano/assets/nanoui.generic.css b/nano/assets/nanoui.generic.css deleted file mode 100644 index cfcfa762a80..00000000000 --- a/nano/assets/nanoui.generic.css +++ /dev/null @@ -1 +0,0 @@ -body{background:linear-gradient(180deg,#2a2a2a 0,#202020);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FF2A2A2A',EndColorStr='#FF202020')} \ No newline at end of file diff --git a/nano/assets/nanoui.js b/nano/assets/nanoui.js new file mode 100644 index 00000000000..d275b35323d --- /dev/null +++ b/nano/assets/nanoui.js @@ -0,0 +1,3 @@ +!function(e){function t(e,t,n,a){for(var s,i=n.slice(),o=r(t,e),l=0,c=i.length;c>l&&(handler=i[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(o):handler.call(e,o),!o.stoppedImmediatePropagation);l++);return s=!o.stoppedPropagation,a&&s&&e.parentNode?e.parentNode.dispatchEvent(o):!o.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function a(e,t,a){var r=b(t||e,a);g(e,"textContent",n(function(){return r.get.call(this)},function(e){r.set.call(this,e)}))}function r(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function s(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function i(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function o(e){var t=document.createEvent("Event");t.initEvent("input",!0,!0),(e.srcElement||e.fromElement||document).dispatchEvent(t)}function l(e){!p&&E.test(document.readyState)&&(p=!p,document.detachEvent(f,l),e=document.createEvent("Event"),e.initEvent(h,!0,!0),document.dispatchEvent(e))}function c(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var d=!0,p=!1,f="onreadystatechange",h="DOMContentLoaded",v="__IE8__"+Math.random(),g=Object.defineProperty||function(e,t,n){e[t]=n.value},m=Object.defineProperties||function(t,n){for(var a in n)if(y.call(n,a))try{g(t,a,n[a])}catch(r){e.console&&console.log(a+" failed on object:",t,r.message)}},b=Object.getOwnPropertyDescriptor,y=Object.prototype.hasOwnProperty,w=e.Element.prototype,k=e.Text.prototype,T=/^[a-z]+$/,E=/loaded|complete/,S={},x=document.createElement("div"),O=document.documentElement,C=O.removeAttribute,P=O.setAttribute;a(e.HTMLCommentElement.prototype,w,"nodeValue"),a(e.HTMLScriptElement.prototype,null,"text"),a(k,null,"nodeValue"),a(e.HTMLTitleElement.prototype,null,"text"),g(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(b(e.CSSStyleSheet.prototype,"cssText"))),m(w,{textContent:{get:i,set:c},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},oninput:{get:function(){return this._oninput||null},set:function(e){this._oninput&&(this.removeEventListener("input",this._oninput),this._oninput=e,e&&this.addEventListener("input",e))}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,a){var r,i,l=this,c="on"+e,d=l[v]||g(l,v,{value:{}})[v],p=d[c]||(d[c]={}),f=p.h||(p.h=[]);if(!y.call(p,"w")){if(p.w=function(e){return e[v]||t(l,u(l,e),f,!1)},!y.call(S,c))if(T.test(e)){try{r=document.createEventObject(),r[v]=!0,9!=l.nodeType&&null==l.parentNode&&x.appendChild(l),(i=l.getAttribute(c))&&C.call(l,c),l.fireEvent(c,r),S[c]=!0}catch(r){for(S[c]=!1;x.hasChildNodes();)x.removeChild(x.firstChild)}null!=i&&P.call(l,c,i)}else S[c]=!1;(p.n=S[c])&&l.attachEvent(c,p.w)}s(f,n)<0&&f[a?"unshift":"push"](n),"input"===e&&l.attachEvent("onkeyup",o)}},dispatchEvent:{value:function(e){var n,a=this,r="on"+e.type,s=a[v],i=s&&s[r],o=!!i;return e.target||(e.target=a),o?i.n?a.fireEvent(r,e):t(a,e,i.h,!0):(n=a.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v],o=i&&i[r],l=o&&o.h,c=l?s(l,t):-1;c>-1&&l.splice(c,1)}}}),m(k,{addEventListener:{value:w.addEventListener},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener}}),m(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var a=this,r="on"+e,i=a[v]||g(a,v,{value:{}})[v],o=i[r]||(i[r]={}),l=o.h||(o.h=[]);s(l,t)<0&&(a[r]||(a[r]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),a.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,a="on"+e.type,r=n[v],s=r&&r[a],i=!!s;return i&&(s.n?n.fireEvent(a,e):t(n,e,s.h,!0))}},removeEventListener:{value:w.removeEventListener}}),m(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),m(e.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType?i.call(this):null},set:function(e){11===this.nodeType&&c.call(this,e)}},addEventListener:{value:function(t,n,a){var r=this;w.addEventListener.call(r,t,n,a),d&&t===h&&!E.test(r.readyState)&&(d=!1,r.attachEvent(f,l),e==top&&!function s(e){try{r.documentElement.doScroll("left"),l()}catch(t){setTimeout(s,50)}}())}},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),m(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,a=/^(top|right|bottom|left)$/,r=/\-([a-z])/g,s=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,i,o,l=this._,c=l.style,u=l.currentStyle,d=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(r,s),t=u?u[e]:c[e],n.test(t)&&!a.test(e)&&(i=c.left,o=d&&d.left,o&&(d.left=u.left),c.left="fontSize"===e?"1em":t,t=c.pixelLeft+"px",c.left=i,o&&(d.left=o)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,a){return a?new t(n):new e(n)}}()},addEventListener:{value:function(n,a,r){var i,o=e,l="on"+n;o[l]||(o[l]=function(e){return t(o,u(o,e),i,!1)}),i=o[l][v]||(o[l][v]=[]),s(i,a)<0&&i[r?"unshift":"push"](a)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,a){var r="on"+t,i=(e[r]||Object)[v],o=i?s(i,n):-1;o>-1&&i.splice(o,1)}}}),function(e,t,n){for(n=0;n0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,a,r;if(M(t))return t;if(a=t.valueOf,e(a)&&(n=a.call(t),M(n)))return n;if(r=t.toString,e(r)&&(n=r.call(t),M(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return a(e)},ToUint32:function(e){return e>>>0}},I=function(){};A(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,s=u.call(arguments,1),i=function(){if(this instanceof r){var e=n.apply(this,h.call(s,u.call(arguments)));return a(e)===e?e:this}return n.apply(t,h.call(s,u.call(arguments)))},o=g(0,n.length-s.length),l=[],c=0;o>c;c++)p.call(l,"$"+c);return r=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this, arguments); }")(i),n.prototype&&(I.prototype=n.prototype,r.prototype=new I,I.prototype=null),r}});var R=v.bind(r.hasOwnProperty),U=v.bind(r.toString),z=v.bind(o.slice),q=v.bind(o.split),F=v.bind(o.indexOf),B=v.bind(p),H=t.isArray||function(e){return"[object Array]"===U(e)},$=1!==[].unshift(0);A(n,{unshift:function(){return f.apply(this,arguments),this.length}},$),A(t,{isArray:H});var J=a("a"),V="a"!==J[0]||!(0 in J),W=function(e){var t=!0,n=!0;return e&&(e.call("foo",function(e,n,a){"object"!=typeof a&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")),!!e&&t&&n};A(n,{forEach:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=-1,i=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++s1&&(a=arguments[1]),!e(n))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;i>l;l++)l in s&&("undefined"==typeof a?o[l]=n(s[l],l,r):o[l]=n.call(a,s[l],l,r));return o}},!W(n.map)),A(n,{filter:function(t){var n,a,r=D.ToObject(this),s=V&&P(this)?q(this,""):r,i=D.ToUint32(s.length),o=[];if(arguments.length>1&&(a=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;i>l;l++)l in s&&(n=s[l],("undefined"==typeof a?t(n,l,r):t.call(a,n,l,r))&&B(o,n));return o}},!W(n.filter)),A(n,{every:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var i=0;s>i;i++)if(i in r&&!("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!1;return!0}},!W(n.every)),A(n,{some:function(t){var n,a=D.ToObject(this),r=V&&P(this)?q(this,""):a,s=D.ToUint32(r.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var i=0;s>i;i++)if(i in r&&("undefined"==typeof n?t(r[i],i,a):t.call(n,r[i],i,a)))return!0;return!1}},!W(n.some));var Z=!1;n.reduce&&(Z="object"==typeof n.reduce.call("es5",function(e,t,n,a){return a})),A(n,{reduce:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,i=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}for(;r>i;i++)i in a&&(s=t(s,a[i],i,n));return s}},!Z);var X=!1;n.reduceRight&&(X="object"==typeof n.reduceRight.call("es5",function(e,t,n,a){return a})),A(n,{reduceRight:function(t){var n=D.ToObject(this),a=V&&P(this)?q(this,""):n,r=D.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===r&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,i=r-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(i in a){s=a[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return s;do i in a&&(s=t(s,a[i],i,n));while(i--);return s}},!X);var Y=n.indexOf&&-1!==[0,1].indexOf(1,2);A(n,{indexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=0;for(arguments.length>1&&(a=D.ToInteger(arguments[1])),a=a>=0?a:g(0,n+a);n>a;a++)if(a in t&&t[a]===e)return a;return-1}},Y);var G=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);A(n,{lastIndexOf:function(e){var t=V&&P(this)?q(this,""):D.ToObject(this),n=D.ToUint32(t.length);if(0===n)return-1;var a=n-1;for(arguments.length>1&&(a=m(a,D.ToInteger(arguments[1]))),a=a>=0?a:n-Math.abs(a);a>=0;a--)if(a in t&&e===t[a])return a;return-1}},G);var K=function(){var e=[1,2],t=e.splice();return 2===e.length&&H(t)&&0===t.length}();A(n,{splice:function(e,t){return 0===arguments.length?[]:d.apply(this,arguments)}},!K);var Q=function(){var e={};return n.splice.call(e,0,0,1),1===e.length}();A(n,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=g(D.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=u.call(arguments),n.length<2?B(n,this.length-e):n[1]=D.ToInteger(t)),d.apply(this,n)}},!Q);var ee=function(){var e=new t(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),te=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();A(n,{splice:function(e,t){for(var n,a=D.ToObject(this),r=[],s=D.ToUint32(a.length),o=D.ToInteger(e),l=0>o?g(s+o,0):m(o,s),c=m(g(D.ToInteger(t),0),s-l),d=0;c>d;)n=i(l+d),R(a,n)&&(r[d]=a[n]),d+=1;var p,f=u.call(arguments,2),h=f.length;if(c>h){for(d=l;s-c>d;)n=i(d+c),p=i(d+h),R(a,n)?a[p]=a[n]:delete a[p],d+=1;for(d=s;d>s-c+h;)delete a[d-1],d-=1}else if(h>c)for(d=s-c;d>l;)n=i(d+c-1),p=i(d+h-1),R(a,n)?a[p]=a[n]:delete a[p],d-=1;d=l;for(var v=0;v=0&&!H(t)&&e(t.callee)},be=ge(arguments)?ge:me;A(a,{keys:function(t){var n=e(t),a=be(t),r=null!==t&&"object"==typeof t,s=r&&P(t);if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var o=[],l=le&&n;if(s&&ce||a)for(var c=0;cp;p++){var f=he[p];d&&"constructor"===f||!R(t,f)||B(o,f)}return o}});var ye=a.keys&&function(){return 2===a.keys(arguments).length}(1,2),we=a.keys&&function(){var e=a.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),ke=a.keys;A(a,{keys:function(e){return ke(be(e)?u.call(e):e)}},!ye||we);var Te=-621987552e5,Ee="-000001",Se=Date.prototype.toISOString&&-1===new Date(Te).toISOString().indexOf(Ee),xe=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();A(Date.prototype,{toISOString:function(){var e,t,n,a,r;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(a=this.getUTCFullYear(),r=this.getUTCMonth(),a+=Math.floor(r/12),r=(r%12+12)%12,e=[r+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],a=(0>a?"-":a>9999?"+":"")+z("00000"+Math.abs(a),a>=0&&9999>=a?-4:-6),t=e.length;t--;)n=e[t],10>n&&(e[t]="0"+n);return a+"-"+u.call(e,0,2).join("-")+"T"+u.call(e,2).join(":")+"."+z("000"+this.getUTCMilliseconds(),-3)+"Z"}},Se||xe);var Oe=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(Te).toJSON().indexOf(Ee)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();Oe||(Date.prototype.toJSON=function(t){var n=a(this),r=D.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var s=n.toISOString;if(!e(s))throw new TypeError("toISOString property is not callable");return s.call(n)});var Ce=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),Pe=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),_e=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(_e||Pe||!Ce){var je=Math.pow(2,31)-1,Le=(Math.floor(je/1e3),N(new Date(1970,0,1,0,0,0,je+1).getTime()));Date=function(e){var t=function(n,a,r,s,o,l,c){var u,d=arguments.length;if(this instanceof e){var p=l,f=c;if(Le&&d>=7&&c>je){var h=Math.floor(c/je)*je,v=Math.floor(h/1e3);p+=v,f-=1e3*v}u=1===d&&i(n)===n?new e(t.parse(n)):d>=7?new e(n,a,r,s,o,p,f):d>=6?new e(n,a,r,s,o,p):d>=5?new e(n,a,r,s,o):d>=4?new e(n,a,r,s):d>=3?new e(n,a,r):d>=2?new e(n,a):d>=1?new e(n):new e}else u=e.apply(this,arguments);return M(u)||A(u,{constructor:t},!0),u},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),a=[0,31,59,90,120,151,181,212,243,273,304,334,365],r=function(e,t){var n=t>1?1:0;return a[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},s=function(t){var n=0,a=t;if(Le&&a>je){var r=Math.floor(a/je)*je,s=Math.floor(r/1e3);n+=s,a-=1e3*s}return l(new e(1970,0,1,0,0,n,a))};for(var o in e)R(e,o)&&(t[o]=e[o]);A(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,A(t.prototype,{constructor:t},!0);var c=function(t){var a=n.exec(t);if(a){var i,o=l(a[1]),c=l(a[2]||1)-1,u=l(a[3]||1)-1,d=l(a[4]||0),p=l(a[5]||0),f=l(a[6]||0),h=Math.floor(1e3*l(a[7]||0)),v=Boolean(a[4]&&!a[8]),g="-"===a[9]?1:-1,m=l(a[10]||0),b=l(a[11]||0),y=p>0||f>0||h>0;return(y?24:25)>d&&60>p&&60>f&&1e3>h&&c>-1&&12>c&&24>m&&60>b&&u>-1&&u=-864e13&&864e13>=i)?i:NaN}return e.parse.apply(this,arguments)};return A(t,{parse:c}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var Ae=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),Me={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,a=t;++n=0;)n+=Me.data[t],Me.data[t]=Math.floor(n/e),n=n%e*Me.base},numToString:function(){for(var e=Me.size,t="";--e>=0;)if(""!==t||0===e||0!==Me.data[e]){var n=i(Me.data[e]);""===t?t=n:t+=z("0000000",0,7-n.length)+n}return t},pow:function Ye(e,t,n){return 0===t?n:t%2===1?Ye(e,t-1,n*e):Ye(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},Ne=function(e){var t,n,a,r,s,o,c,u;if(t=l(e),t=N(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),N(n))return"NaN";if(-1e21>=n||n>=1e21)return i(n);if(a="",0>n&&(a="-",n=-n),r="0",n>1e-21)if(s=Me.log(n*Me.pow(2,69,1))-69,o=0>s?n*Me.pow(2,-s,1):n/Me.pow(2,s,1),o*=4503599627370496,s=52-s,s>0){for(Me.multiply(0,o),c=t;c>=7;)Me.multiply(1e7,0),c-=7;for(Me.multiply(Me.pow(10,c,1),0),c=s-1;c>=23;)Me.divide(1<<23),c-=23;Me.divide(1<0?(u=r.length,r=t>=u?a+z("0.0000000000000000000",0,t-u+2)+r:a+z(r,0,u-t)+"."+z(r,u-t)):r=a+r,r};A(c,{toFixed:Ne},Ae);var De=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),Ie=c.toPrecision;A(c,{toPrecision:function(e){return"undefined"==typeof e?Ie.call(this):Ie.call(this,e)}},De),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],t=Math.pow(2,32)-1;o.split=function(n,a){var r=this;if("undefined"==typeof n&&0===a)return[];if(!S(n))return q(this,n,a);var s,i,o,l,c=[],d=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),f=0,h=new RegExp(n.source,d+"g");r+="",e||(s=new RegExp("^"+h.source+"$(?!\\s)",d));var v="undefined"==typeof a?t:D.ToUint32(a);for(i=h.exec(r);i&&(o=i.index+i[0].length,!(o>f&&(B(c,z(r,f,i.index)),!e&&i.length>1&&i[0].replace(s,function(){for(var e=1;e1&&i.index=v)));)h.lastIndex===i.index&&h.lastIndex++,i=h.exec(r);return f===r.length?(l||!h.test(""))&&B(c,""):B(c,z(r,f)),c.length>v?z(c,0,v):c}}():"0".split(void 0,0).length&&(o.split=function(e,t){return"undefined"==typeof e&&0===t?[]:q(this,e,t)});var Re=o.replace,Ue=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){B(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ue||(o.replace=function(t,n){var a=e(n),r=S(t)&&/\)[*?]/.test(t.source);if(a&&r){var s=function(e){var a=arguments.length,r=t.lastIndex;t.lastIndex=0;var s=t.exec(e)||[];return t.lastIndex=r,B(s,arguments[a-2],arguments[a-1]),n.apply(this,s)};return Re.call(this,t,s)}return Re.call(this,t,n)});var ze=o.substr,qe="".substr&&"b"!=="0b".substr(-1);A(o,{substr:function(e,t){var n=e;return 0>e&&(n=g(this.length+e,0)),ze.call(this,n,t)}},qe);var Fe=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Be="​",He="["+Fe+"]",$e=new RegExp("^"+He+He+"*"),Je=new RegExp(He+He+"*$"),Ve=o.trim&&(Fe.trim()||!Be.trim());A(o,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return i(this).replace($e,"").replace(Je,"")}},Ve);var We=o.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);A(o,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=i(this),n=i(e),a=arguments.length>1?l(arguments[1]):NaN,r=N(a)?1/0:D.ToInteger(a),s=m(g(r,0),t.length),o=n.length,c=s+o;c>0;){c=g(0,c-o);var u=F(z(t,c,s+o),n);if(-1!==u)return c+u}return-1}},We);var Ze=o.lastIndexOf;if(A(o,{lastIndexOf:function(e){return Ze.apply(this,arguments)}},1!==o.lastIndexOf.length),(8!==parseInt(Fe+"08")||22!==parseInt(Fe+"0x16"))&&(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,a){var r=i(n).trim(),s=l(a)||(t.test(r)?16:10);return e(r,s)}}(parseInt)),"RangeError: test"!==String(new RangeError("test"))){var Xe=(Error.prototype.toString,function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=i(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=i(t)),e?t?e+": "+t:e:t});Error.prototype.toString=Xe}}),function(e,t){function n(e,t){var n=e.createElement("p"),a=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",a.insertBefore(n.lastChild,a.firstChild)}function a(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function r(e,t){var n=y.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),y.elements=n+" "+e,c(t)}function s(e){var t=b[e[g]];return t||(t={},m++,e[g]=m,b[m]=t),t}function i(e,n,a){if(n||(n=t),d)return n.createElement(e);a||(a=s(n));var r;return r=a.cache[e]?a.cache[e].cloneNode():v.test(e)?(a.cache[e]=a.createElem(e)).cloneNode():a.createElem(e),!r.canHaveChildren||h.test(e)||r.tagUrn?r:a.frag.appendChild(r)}function o(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||s(e);for(var r=n.frag.cloneNode(),i=0,o=a(),l=o.length;l>i;i++)r.createElement(o[i]);return r}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+a().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function c(e){e||(e=t);var a=s(e);return!y.shivCSS||u||a.hasCSS||(a.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||l(e,a),e}var u,d,p="3.7.3",f=e.html5||{},h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,v=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",m=0,b={};!function(){try{var e=t.createElement("a");e.innerHTML="",u="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,d=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:p,shivCSS:f.shivCSS!==!1,supportsUnknownElements:d,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:i,createDocumentFragment:o,addElements:r};e.html5=y,c(t),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document),function(){function e(t,a){function s(e){if(s[e]!==g)return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=a.stringify,u="function"==typeof l&&y;if(u){(n=function(){return 1}).toJSON=n;try{u="0"===l(0)&&"0"===l(new i)&&'""'==l(new o)&&l(b)===g&&l(g)===g&&l()===g&&"1"===l(n)&&"[1]"==l([n])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,b,null])&&l({a:[n,!0,!1,null,"\x00\b\n\f\r "]})==r&&"1"===l(null,n)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new c(-1))}catch(d){u=!1}}t=u}if("json-parse"==e){var p=a.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){n=p(r);var f=5==n.a.length&&1===n.a[0];if(f){try{f=!p('" "')}catch(d){}if(f)try{f=1!==p("01")}catch(d){}if(f)try{f=1!==p("1.")}catch(d){}}}}catch(d){f=!1}t=f}}return s[e]=!!t}t||(t=r.Object()),a||(a=r.Object());var i=t.Number||r.Number,o=t.String||r.String,l=t.Object||r.Object,c=t.Date||r.Date,u=t.SyntaxError||r.SyntaxError,d=t.TypeError||r.TypeError,p=t.Math||r.Math,f=t.JSON||r.JSON;"object"==typeof f&&f&&(a.stringify=f.stringify,a.parse=f.parse);var h,v,g,m=l.prototype,b=m.toString,y=new c(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(w){}if(!s("json")){var k="[object Function]",T="[object Date]",E="[object Number]",S="[object String]",x="[object Array]",O="[object Boolean]",C=s("bug-string-char-index");if(!y)var P=p.floor,_=[0,31,59,90,120,151,181,212,243,273,304,334],j=function(e,t){return _[t]+365*(e-1970)+P((e-1969+(t=+(t>1)))/4)-P((e-1901+t)/100)+P((e-1601+t)/400)};if((h=m.hasOwnProperty)||(h=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?h=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,h=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,h.call(this,e)}),v=function(e,t){var a,r,s,i=0;(a=function(){this.valueOf=0}).prototype.valueOf=0,r=new a;for(s in r)h.call(r,s)&&i++;return a=r=null,i?v=2==i?function(e,t){var n,a={},r=b.call(e)==k;for(n in e)r&&"prototype"==n||h.call(a,n)||!(a[n]=1)||!h.call(e,n)||t(n)}:function(e,t){var n,a,r=b.call(e)==k;for(n in e)r&&"prototype"==n||!h.call(e,n)||(a="constructor"===n)||t(n);(a||h.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var a,s,i=b.call(e)==k,o=!i&&"function"!=typeof e.constructor&&n[typeof e.hasOwnProperty]&&e.hasOwnProperty||h;for(a in e)i&&"prototype"==a||!o.call(e,a)||t(a);for(s=r.length;a=r[--s];o.call(e,a)&&t(a));}),v(e,t)},!s("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",M=function(e,t){return(A+(t||0)).slice(-e)},N="\\u00",D=function(e){for(var t='"',n=0,a=e.length,r=!C||a>10,s=r&&(C?e.split(""):e);a>n;n++){var i=e.charCodeAt(n);switch(i){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=L[i];break;default:if(32>i){t+=N+M(2,i.toString(16));break}t+=r?s[n]:e.charAt(n)}}return t+'"'},I=function(e,t,n,a,r,s,i){var o,l,c,u,p,f,m,y,w,k,C,_,L,A,N,R;try{o=t[e]}catch(U){}if("object"==typeof o&&o)if(l=b.call(o),l!=T||h.call(o,"toJSON"))"function"==typeof o.toJSON&&(l!=E&&l!=S&&l!=x||h.call(o,"toJSON"))&&(o=o.toJSON(e));else if(o>-1/0&&1/0>o){if(j){for(p=P(o/864e5),c=P(p/365.2425)+1970-1;j(c+1,0)<=p;c++);for(u=P((p-j(c,0))/30.42);j(c,u+1)<=p;u++);p=1+p-j(c,u),f=(o%864e5+864e5)%864e5,m=P(f/36e5)%24,y=P(f/6e4)%60,w=P(f/1e3)%60,k=f%1e3}else c=o.getUTCFullYear(),u=o.getUTCMonth(),p=o.getUTCDate(),m=o.getUTCHours(),y=o.getUTCMinutes(),w=o.getUTCSeconds(),k=o.getUTCMilliseconds();o=(0>=c||c>=1e4?(0>c?"-":"+")+M(6,0>c?-c:c):M(4,c))+"-"+M(2,u+1)+"-"+M(2,p)+"T"+M(2,m)+":"+M(2,y)+":"+M(2,w)+"."+M(3,k)+"Z"}else o=null;if(n&&(o=n.call(t,e,o)),null===o)return"null";if(l=b.call(o),l==O)return""+o;if(l==E)return o>-1/0&&1/0>o?""+o:"null";if(l==S)return D(""+o);if("object"==typeof o){for(A=i.length;A--;)if(i[A]===o)throw d();if(i.push(o),C=[], +N=s,s+=r,l==x){for(L=0,A=o.length;A>L;L++)_=I(L,o,n,a,r,s,i),C.push(_===g?"null":_);R=C.length?r?"[\n"+s+C.join(",\n"+s)+"\n"+N+"]":"["+C.join(",")+"]":"[]"}else v(a||o,function(e){var t=I(e,o,n,a,r,s,i);t!==g&&C.push(D(e)+":"+(r?" ":"")+t)}),R=C.length?r?"{\n"+s+C.join(",\n"+s)+"\n"+N+"}":"{"+C.join(",")+"}":"{}";return i.pop(),R}};a.stringify=function(e,t,a){var r,s,i,o;if(n[typeof t]&&t)if((o=b.call(t))==k)s=t;else if(o==x){i={};for(var l,c=0,u=t.length;u>c;l=t[c++],o=b.call(l),(o==S||o==E)&&(i[l]=1));}if(a)if((o=b.call(a))==E){if((a-=a%1)>0)for(r="",a>10&&(a=10);r.lengthR;)switch(r=s.charCodeAt(R)){case 9:case 10:case 13:case 32:R++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=C?s.charAt(R):s[R],R++,e;case 34:for(e="@",R++;i>R;)if(r=s.charCodeAt(R),32>r)F();else if(92==r)switch(r=s.charCodeAt(++R)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=q[r],R++;break;case 117:for(t=++R,n=R+4;n>R;R++)r=s.charCodeAt(R),r>=48&&57>=r||r>=97&&102>=r||r>=65&&70>=r||F();e+=z("0x"+s.slice(t,R));break;default:F()}else{if(34==r)break;for(r=s.charCodeAt(R),t=R;r>=32&&92!=r&&34!=r;)r=s.charCodeAt(++R);e+=s.slice(t,R)}if(34==s.charCodeAt(R))return R++,e;F();default:if(t=R,45==r&&(a=!0,r=s.charCodeAt(++R)),r>=48&&57>=r){for(48==r&&(r=s.charCodeAt(R+1),r>=48&&57>=r)&&F(),a=!1;i>R&&(r=s.charCodeAt(R),r>=48&&57>=r);R++);if(46==s.charCodeAt(R)){for(n=++R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}if(r=s.charCodeAt(R),101==r||69==r){for(r=s.charCodeAt(++R),(43==r||45==r)&&R++,n=R;i>n&&(r=s.charCodeAt(n),r>=48&&57>=r);n++);n==R&&F(),R=n}return+s.slice(t,R)}if(a&&F(),"true"==s.slice(R,R+4))return R+=4,!0;if("false"==s.slice(R,R+5))return R+=5,!1;if("null"==s.slice(R,R+4))return R+=4,null;F()}return"$"},H=function(e){var t,n;if("$"==e&&F(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;n||(n=!0))n&&(","==e?(e=B(),"]"==e&&F()):F()),","==e&&F(),t.push(H(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;n||(n=!0))n&&(","==e?(e=B(),"}"==e&&F()):F()),(","==e||"string"!=typeof e||"@"!=(C?e.charAt(0):e[0])||":"!=B())&&F(),t[e.slice(1)]=H(B());return t}F()}return e},$=function(e,t,n){var a=J(e,t,n);a===g?delete e[t]:e[t]=a},J=function(e,t,n){var a,r=e[t];if("object"==typeof r&&r)if(b.call(r)==x)for(a=r.length;a--;)$(r,a,n);else v(r,function(e){$(r,e,n)});return n.call(e,t,r)};a.parse=function(e,t){var n,a;return R=0,U=""+e,n=H(B()),"$"!=B()&&F(),R=U=null,t&&b.call(t)==k?J((a={},a[""]=n,a),"",t):n}}}return a.runInContext=e,a}var t="function"==typeof define&&define.amd,n={"function":!0,object:!0},a=n[typeof exports]&&exports&&!exports.nodeType&&exports,r=n[typeof window]&&window||this,s=a&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(r=s),a&&!t)e(r,a);else{var i=r.JSON,o=r.JSON3,l=!1,c=e(r,r.JSON3={noConflict:function(){return l||(l=!0,r.JSON=i,r.JSON3=o,i=o=null),c}});r.JSON={parse:c.parse,stringify:c.stringify}}t&&define(function(){return c})}.call(this);var Url=function(){"use strict";var e={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},t={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},n=function(n,a){var i,o=document,l=o.createElement("a"),a=a||o.location.href,c=a.match(/\/\/(.*?)(?::(.*?))?@/)||[];l.href=a;for(i in e)n[i]=l[e[i]]||"";if(n.protocol=n.protocol.replace(/:$/,""),n.query=n.query.replace(/^\?/,""),n.hash=r(n.hash.replace(/^#/,"")),n.user=r(c[1]||""),n.pass=r(c[2]||""),n.port=t[n.protocol]==n.port||0==n.port?"":n.port,n.protocol||/^([a-z]+:)?\/\//.test(a))n.path=n.path.replace(/^\/?/,"/");else{var u=new Url(o.location.href.match(/(.*\/)/)[0]),d=u.path.split("/"),p=n.path.split("/"),f=["protocol","user","pass","host","port"],h=f.length;for(d.pop(),i=0;h>i;i++)n[f[i]]=u[f[i]];for(;".."==p[0];)d.pop(),p.shift();n.path=("/"!=a.charAt(0)?d.join("/"):"")+"/"+p.join("/")}n.paths(("/"==n.path.charAt(0)?n.path.slice(1):n.path).split("/")),s(n)},a=function(e){return encodeURIComponent(e).replace(/'/g,"%27")},r=function(e){return e=e.replace(/\+/g," "),e=e.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n,a){var r=parseInt(t,16)-224,s=parseInt(n,16)-128;if(0==r&&32>s)return e;var i=parseInt(a,16)-128,o=(r<<12)+(s<<6)+i;return o>65535?e:String.fromCharCode(o)}),e=e.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(e,t,n){var a=parseInt(t,16)-192;if(2>a)return e;var r=parseInt(n,16)-128;return String.fromCharCode((a<<6)+r)}),e=e.replace(/%([0-7][0-9a-f])/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},s=function(e){var t=e.query;e.query=new function(e){for(var t,n=/([^=&]+)(=([^&]*))?/g;t=n.exec(e);){var s=decodeURIComponent(t[1].replace(/\+/g," ")),i=t[3]?r(t[3]):"";null!=this[s]?(this[s]instanceof Array||(this[s]=[this[s]]),this[s].push(i)):this[s]=i}this.clear=function(){for(var e in this)this[e]instanceof Function||delete this[e]},this.count=function(){var e,t=0;for(e in this)this[e]instanceof Function||t++;return t},this.isEmpty=function(){return 0===this.count()},this.toString=function(){var e,t,n="",r=a;for(e in this)if(!(this[e]instanceof Function))if(this[e]instanceof Array){var s=this[e].length;if(s)for(t=0;s>t;t++)n+=n?"&":"",n+=r(e)+"="+r(this[e][t]);else n+=(n?"&":"")+r(e)+"="}else n+=n?"&":"",n+=r(e)+"="+r(this[e]);return n}}(t)};return function(e){this.paths=function(e){var t,n="",s=0;if(e&&e.length&&e+""!==e){for(this.isAbsolute()&&(n="/"),t=e.length;t>s;s++)e[s]=a(e[s]);this.path=n+e.join("/")}for(e=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/"),s=0,t=e.length;t>s;s++)e[s]=r(e[s]);return e},this.encode=a,this.decode=r,this.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},this.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&a(this.user)+(this.pass&&":"+a(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+a(this.hash))},n(this,e)}}();!function(e){"use strict";function t(){return u.createDocumentFragment()}function n(e){return u.createElement(e)}function a(e){if(1===e.length)return r(e[0]);for(var n=t(),a=z.call(e),s=0;s-1}}([].indexOf||function(e){for(q=this.length;q--&&this[q]!==e;);return q}),item:function(e){return this[e]||null},remove:function(){for(var e,t=0;ti?r[c.call(a,s)-1]=y.call(s,this):r[i]},emit:function(e){for(var t=l.call(this,f),a=t&&this[f].l,r=t&&l.call(a,e),s=r&&a[e].slice(0),i=r&&u.call(arguments,1),o=0,c=r?s.length:o;c>o;)n(this,s[o++],i);return r},expect:function(){for(var e=0;e-1&&(s.splice(n,1),s.length||delete r[e])),this},on:function(e,t,n){var a=l.call(this,f),r=(a?this[f]:T(this)).l,s=a&&l.call(r,e)?r[e]:r[e]=[];return w.call(s,t)<0&&(n?d:c).call(s,t),this},once:function(e,t,a){var r=function(i){s.off(e,r,a),n(s,t,arguments)},s=this;return s.on(e,r,a)},trigger:function(e,t){var r=l.call(this,f),s=r&&this[f].l,i="string"==typeof e,c=i?e:e.type,u=r&&l.call(s,c),d=u&&s[c].slice(0),p=i?new a(this,c,t):e,h=0,v=u?d.length:h,g=!(p instanceof a);for(g&&(p._active=!0,p.stopImmediatePropagation=o.stopImmediatePropagation),p.currentTarget=this,m[0]=p;p._active&&v>h;)n(this,d[h++],m);return g&&(delete p._active,delete p.stopImmediatePropagation),!p.defaultPrevented},when:function(e,t){var a=l.call(this,f),r=(a?this[f]:T(this)).w,s=a&&l.call(r,e);return s?(n(this,t,r[e]),this):this.once(e,function(){l.call(r,e)||(r[e]=arguments)},!0).once(e,t)}},x=function(e,t,n){l.call(e,t)||(e[t]=n)},O=!1;o.defaultPrevented=!1,o._active=o.cancelable=!0,o.preventDefault=function(){this.defaultPrevented=!0},o.stopImmediatePropagation=function(){this._active=!1};for(r in S)l.call(S,r)&&b(i,r,{enumerable:!1,configurable:!0,writable:!0,value:S[r]});!function(e){function t(t){function n(e){e[t].apply(e,this)}return function(){return e.call(this,n,arguments),this}}for(var n in S)S.hasOwnProperty(n)&&!/^listeners|boundTo$/.test(n)&&b(s,n,{enumerable:!1,configurable:!0,writable:!0,value:t(n)})}(s.forEach||function(e,t){for(var n=this,a=0;a-1&&(n.splice(a,1),n.length||(self["on"+e]=null))}),u.expect("ready","DOMContentLoaded"),/loaded|complete/.test(u.readyState)?(e.setImmediate||setTimeout)(c):u.once("DOMContentLoaded",c,!0)}(window),"$"in window||b(window,"$",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=t||document,a=e.length-6,r=e.lastIndexOf(":first")===a&&a>0,s=r?n.querySelector(e.slice(0,a)):n.querySelectorAll(e);return r?s?[s]:[]:v.call(s)}})}}(Object);var Class=Class||function(e){"use strict";function t(e,t,a){for(var r,s=[],i=0;it;)r[t++].call(this);return e.apply(this,arguments)}}(k),k[f]=S)),y.call(e,h)&&n(e[h],k,b,!0,!0),p&&(v!==b&&n(v,k,b,!0,!0),k[f]=S),S[c]!==k&&a(S,c,k,!1),n(e,S,b,!1,!0),y.call(e,d)&&i([].concat(e[d]),S),k}}(Object);(function(){this.NANO={INTERACTIVE:2,UPDATE:1,DISABLED:0}}).call(this),function(){this.helpers={link:function(e,t,n,a,r,s){return null==e&&(e=""),null==t&&(t=""),null==n&&(n=""),null==a&&(a={}),null==r&&(r=""),null==s&&(s=""),a=JSON.stringify(a),t&&(t="",s+=" iconed"),r?""+t+e+"":""+t+e+""},bar:function(e,t,n,a,r){var s;return null==e&&(e=0),null==t&&(t=0),null==n&&(n=100),null==a&&(a=""),null==r&&(r=""),n>t?t>e?e=t:e>n&&(e=n):e>t?e=t:n>e&&(e=n),s=Math.round((e-t)/(n-t)*100),"
"+r+"
"},round:function(e){return Math.round(e)},fixed:function(e,t){return null==t&&(t=1),Number(Math.round(e+"e"+t)+"e-"+t)},floor:function(e){return Math.floor(e)},ceil:function(e){return Math.ceil(e)}}}.call(this),function(){document.when("ready",function(e){return function(){var t;t={},e.nanoui=new e.NanoUI(t,document),e.nanowindow=new e.Window(t,document),t.emit("memes"),e.NanoBus=t}}(this))}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.NanoUI=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.winset=e(this.winset,this),this.close=e(this.close,this),this.act=e(this.act,this),this.render=e(this.render,this),this.update=e(this.update,this),this.serverUpdate=e(this.serverUpdate,this),this.bus.on("serverUpdate",this.serverUpdate),this.bus.on("update",this.update),this.bus.on("render",this.render),this.bus.on("memes",this.render),this.initialized=!1,this.data={},this.initialData=JSON.parse(this.fragment.query("#data").data("initial")),null==this.initialData&&("data"in this.initialData||"config"in this.initalData)&&this.error("Initial data did not load correctly.")}return t.prototype.serverUpdate=function(e){var t,n,a;try{t=JSON.parse(e)}catch(a){n=a,this.error(n)}this.bus.emit("update",t)},t.prototype.update=function(e){null==e.data&&(null!=this.data.data?e.data=this.data.data:e.data={}),this.data=e,this.initialized&&this.bus.emit("render",this.data),this.bus.emit("updated")},t.prototype.render=function(e){var t,n,a,r;this.initialized||(e=this.initialData);try{this.initialized||(r=this.fragment.query("#layout"),r.innerHTML=TMPL[e.config.templates.layout](e.data,e.config,helpers)),t=this.fragment.query("#content"),t.innerHTML=TMPL[e.config.templates.content](e.data,e.config,helpers)}catch(a){return n=a,void this.error(n)}return this.bus.emit("rendered",e),this.initialized?void 0:(this.initialized=!0,this.data=this.initialData,this.bus.emit("initialized",e))},t.prototype.act=function(e,t){return null==t&&(t={}),t.src=this.data.config.ref,t.nano=e,location.href=util.href(null,t)},t.prototype.error=function(e){var t;return e instanceof Error&&(e=e.fileName+":"+e.lineNumber+" "+e.message),t={nano_error:e},location.href=util.href(null,t)},t.prototype.log=function(e){var t;return t={nano_log:e},location.href=util.href(null,t)},t.prototype.close=function(){var e;return e={command:"nanoclose "+this.data.config.ref},this.winset("is-visible","false"),location.href=util.href("winset",e)},t.prototype.winset=function(e,t,n){var a,r;return null==n&&(n=this.data.config.window.ref),a={},a[n+"."+e]=t,r=a,location.href=util.href("winset",r)},t}()}.call(this),function(){this.util={extend:function(e,t){return Object.keys(t).forEach(function(n){var a;return a=t[n],a&&"[object Object]"===Object.prototype.toString.call(a)?(e[n]=e[n]||{},util.extend(e[n],a)):e[n]=a}),e},href:function(e,t){return null==e&&(e=""),null==t&&(t={}),e=new Url("byond://"+e),util.extend(e.query,t),e}}}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.Window=function(){function t(t,n){this.bus=t,this.fragment=null!=n?n:document,this.attachLinks=e(this.attachLinks,this),this.updateLinks=e(this.updateLinks,this),this.updateStatus=e(this.updateStatus,this),this.resize=e(this.resize,this),this.attachResize=e(this.attachResize,this),this.drag=e(this.drag,this),this.attachDrag=e(this.attachDrag,this),this.attachButtons=e(this.attachButtons,this),this.calcOffset=e(this.calcOffset,this),this.fancyChrome=e(this.fancyChrome,this),this.dragging=!1,this.resizing=!1,this.bus.once("initialized",function(e){return function(t){return setTimeout(e.focusMap,100),t.config.user.fancy?(e.fancyChrome(),e.calcOffset(),e.attachButtons(),e.attachDrag(),e.attachResize()):void 0}}(this)),this.bus.on("rendered",this.updateStatus),this.bus.on("rendered",this.updateLinks),this.bus.on("rendered",this.attachLinks),this.fragment.on("keydown",this.focusMap)}return t.prototype.setPos=function(e,t){return nanoui.winset("pos",e+","+t)},t.prototype.setSize=function(e,t){return nanoui.winset("size",e+","+t)},t.prototype.focusMap=function(){return nanoui.winset("focus",1,"mapwindow.map")},t.prototype.fancyChrome=function(){var e;return nanoui.winset("titlebar",0),nanoui.winset("can-resize",0),e=this.fragment.queryAll(".fancy"),e.forEach(function(e){return e.classList.remove("fancy")})},t.prototype.calcOffset=function(){return this.xOriginal=window.screenLeft,this.yOriginal=window.screenTop,this.setPos(0,0),this.xOffset=window.screenLeft,this.yOffset=window.screenTop,this.setPos(this.xOriginal-this.xOffset,this.yOriginal-this.yOffset)},t.prototype.attachButtons=function(){var e,t,n,a;return e=function(){return nanoui.close()},n=function(){return nanoui.winset("is-minimized","true")},t=this.fragment.queryAll(".close"),t.forEach(function(t){return t.on("click",e)}),a=this.fragment.queryAll(".minimize"),a.forEach(function(e){return e.on("click",n)})},t.prototype.attachDrag=function(){var e;return e=this.fragment.query("#titlebar"),this.fragment.on("mousemove",this.drag),e.on("mousedown",function(e){return function(){return e.dragging=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.dragging=!1}}(this))},t.prototype.drag=function(e){var t,n;return null==e&&(e=window.event),this.dragging?(null==this.xDrag&&(this.xDrag=e.screenX),null==this.yDrag&&(this.yDrag=e.screenY),t=e.screenX-this.xDrag+(window.screenLeft-this.xOffset),n=e.screenY-this.yDrag+(window.screenTop-this.yOffset),this.setPos(t,n),this.xDrag=e.screenX,this.yDrag=e.screenY):void 0},t.prototype.attachResize=function(){var e;return e=this.fragment.query("#resize"),this.fragment.on("mousemove",this.resize),e.on("mousedown",function(e){return function(){return e.resizing=!0}}(this)),this.fragment.on("mouseup",function(e){return function(){return e.resizing=!1}}(this))},t.prototype.resize=function(e){var t,n;return null==e&&(e=window.event),this.resizing?(null==this.xResize&&(this.xResize=e.screenX),null==this.yResize&&(this.yResize=e.screenY),t=Math.max(250,e.screenX-this.xResize+window.innerWidth),n=Math.max(250,e.screenY-this.yResize+window.innerHeight),this.setSize(t,n),this.xResize=e.screenX,this.yResize=e.screenY):void 0},t.prototype.updateStatus=function(e){var t;return t=this.fragment.queryAll(".statusicon"),t.forEach(function(t){var n;switch(t.className=t.className.replace(/good|bad|average/g,""),e.config.status){case NANO.INTERACTIVE:n="good";break;case NANO.UPDATE:n="average";break;default:n="bad"}return t.classList.add(n)})},t.prototype.updateLinks=function(e){var t;return t=this.fragment.queryAll(".link"),e.config.status!==NANO.INTERACTIVE?t.forEach(function(e){return e.className="link disabled"}):void 0},t.prototype.attachLinks=function(e){var t;return t=function(){var t,n;return t=this.data("action"),n=JSON.parse(this.data("params")),null!=t&&null!=n&&e.config.status===NANO.INTERACTIVE?nanoui.act(t,n):void 0},this.fragment.queryAll(".link.active").forEach(function(e){return e.on("click",t)})},t}()}.call(this),window.TMPL={},TMPL.airlock_electronics=function(e,t,n){var a='
';a+=e.oneAccess?""+n.link("One Required","unlock","one_access"):""+n.link("All Required","lock","one_access"),a+=""+n.link("Clear","refresh","clear")+'
';var r=e.regions;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='";a+="";var l=e.regions;if(l)for(var s,i=-1,c=l.length-1;c>i;){s=l[i+=1],a+=""}return a+="
'+s.name+"
";var u=s.accesses;if(u)for(var d,p=-1,f=u.length-1;f>p;)d=u[p+=1],a+=""+n.link(d.name,d.req?"check-square-o":"square-o","set",{access:d.id},null,d.req?"selected":null)+"
";a+="
"},TMPL.air_alarm=function(e,t,n){var a='
';if(a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Air Status

',e.environment_data){var r=e.environment_data;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+='
'+s.name+':
',a+=2==s.danger_level?'':1==s.danger_level?'':'',a+=""+n.fixed(s.value,2)+s.unit+"
";a+='
Local Status:
',a+=2==e.danger_level?'Danger (Internals Required)':1==e.danger_level?'Caution':'Optimal',a+='
Area Status:
',a+=e.atmos_alarm?'Atmosphere Alarm':e.fire_alarm?'Fire Alarm':'Nominal',a+="
"}else a+='
Warning: Cannot obtain air sample for analysis.
';if(e.dangerous&&(a+='
Warning: Safety measures offline. Device may exhibit abnormal behavior.
'),a+="
",!e.locked||e.siliconUser)if(1!=e.screen&&(a+=""+n.link("Back","arrow-left","screen",{screen:1})),1==e.screen)a+='

Air Controls

',a+=e.atmos_alarm?""+n.link("Area Atmospheric Alarm","close","reset",null,null,"caution"):""+n.link("Area Atmospheric Alarm","hand-stop-o","alarm"),a+='
',a+=3!=e.mode?""+n.link("Panic Siphon","exclamation","mode",{mode:3}):""+n.link("Panic Siphon","close","mode",{mode:1},null,"danger"),a+='
'+n.link("Vent Controls","sign-out","screen",{screen:2})+'
'+n.link("Scrubber Controls","filter","screen",{screen:3})+'
'+n.link("Set Environmental Mode","cog","screen",{screen:4})+'
'+n.link("Set Alarm Threshold","bar-chart","screen",{screen:5})+"
";else if(2==e.screen){var l=e.vents;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+='

'+c.long_name+'

Power:
',a+=c.power?""+n.link("On","power-off","adjust",{id_tag:c.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:c.id_tag,command:"power",val:1},null,"danger"),a+='
Mode:
',a+="release"==c.direction?'Pressurizing':'Siphoning',a+='
Pressure Checks:
'+n.link("Internal","sign-in","adjust",{id_tag:c.id_tag,command:"incheck",val:c.checks},null,c.incheck?"selected":null)+n.link("External","sign-out","adjust",{id_tag:c.id_tag,command:"excheck",val:c.checks},null,c.excheck?"selected":null)+'
Set Pressure:
'+n.link(n.fixed(c.external),"pencil","adjust",{id_tag:c.id_tag,command:"set_external_pressure"})+n.link("Reset","refresh","adjust",{id_tag:c.id_tag,command:"reset_external_pressure"},c.extdefault?"disabled":null)+"
";e.vents.length||(a+='No vents connected.')}else if(3==e.screen){var d=e.scrubbers;if(d)for(var p,i=-1,f=d.length-1;f>i;)p=d[i+=1],a+='

'+p.long_name+'

Power:
',a+=p.power?""+n.link("On","power-off","adjust",{id_tag:p.id_tag,command:"power",val:0},null,null):""+n.link("Off","close","adjust",{id_tag:p.id_tag,command:"power",val:1},null,"danger"), +a+='
Mode:
',a+=p.scrubbing?""+n.link("Scrubbing","filter","adjust",{id_tag:p.id_tag,command:"scrubbing",val:0},null,null):""+n.link("Siphoning","sign-in","adjust",{id_tag:p.id_tag,command:"scrubbing",val:1},null,"danger"),a+='
Range:
',a+=p.widenet?""+n.link("Extended","expand","adjust",{id_tag:p.id_tag,command:"widenet",val:0},null,"caution"):""+n.link("Normal","compress","adjust",{id_tag:p.id_tag,command:"widenet",val:1},null,null),a+='
Filters:
'+n.link("CO2",p.filter_co2?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"co2_scrub",val:p.filter_co2?0:1},null,p.filter_co2?"selected":null)+n.link("N2O",p.filter_n2o?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"n2o_scrub",val:p.filter_n2o?0:1},null,p.filter_n2o?"selected":null)+n.link("Plasma",p.filter_toxins?"check-square-o":"square-o","adjust",{id_tag:p.id_tag,command:"tox_scrub",val:p.filter_toxins?0:1},null,p.filter_toxins?"selected":null)+"
";e.scrubbers.length||(a+='No scrubbers connected.')}else if(4==e.screen){a+='

Environmental Modes

';var h=e.modes;if(h)for(var v,i=-1,g=h.length-1;g>i;)v=h[i+=1],a+='
'+n.link(v.name,v.selected?"check-square-o":"square-o","mode",{mode:v.mode},null,v.selected?v.danger?"danger":"selected":null)+"
";a+="
"}else if(5==e.screen){a+='

Alarm Thresholds

';var m=e.thresholds;if(m)for(var b,i=-1,y=m.length-1;y>i;){b=m[i+=1],a+="";var w=b.settings;if(w)for(var k,T=-1,E=w.length-1;E>T;)k=w[T+=1],a+="";a+=""}a+="
min2min1max1max2
"+b.name+""+n.link(k.selected>=0?n.round(100*k.selected)/100:"Off",null,"adjust",{command:"set_threshold",env:k.env,"var":k.val})+"
"}return a},TMPL.apc=function(e,t,n){var a='
';a+=e.siliconUser?'
Interface Lock:
'+n.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+n.link("Disengaged","unlock","toggleaccess",null,e.malfStatus>=2?"linkOff":e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",a+='

Power Status

Main Breaker:
',a+=e.locked&&!e.siliconUser?e.isOperating?'On':'Off':""+n.link("On","power-off","breaker",null,e.isOperating?"selected":null)+n.link("Off","close","breaker",null,e.isOperating?null:"selected"),a+='
External Power:
',a+=2==e.externalPower?'Good':1==e.externalPower?'Low':'None',a+='
Power Cell:
',a+=null!=e.powerCellStatus?""+n.bar(e.powerCellStatus,0,100,e.powerCellStatus>=50?"good":e.powerCellStatus>=25?"average":"bad",n.fixed(e.powerCellStatus)+"%"):'Power cell removed.',a+="
",null!=e.powerCellStatus&&(a+='
Charge Mode:
',a+=e.locked&&!e.siliconUser?e.chargeMode?'Auto':'Off':""+n.link("Auto","refresh","chargemode",null,e.chargeMode?"selected":null)+n.link("Off","close","chargemode",null,e.chargeMode?null:"selected"),a+=" ",a+=e.chargingStatus>1?'[Fully Charged]':1==e.chargingStatus?'[Charging]':'[Not Charging]',a+="
"),a+='

Power Channels

';var r=e.powerChannels;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+="";return a+='
"+s.title+":"+s.powerLoad+" W",s.status<=1?a+='Off':s.status>=2&&(a+='On'),a+="",a+=1==s.status||3==s.status?"[Auto]":"[Manual]",a+='',(!e.locked||e.siliconUser)&&(a+=""+n.link("Auto","refresh","channel",s.topicParams.auto,1==s.status||3==s.status?"selected":null)+n.link("On","power-off","channel",s.topicParams.on,2==s.status?"selected":null)+n.link("Off","close","channel",s.topicParams.off,0==s.status?"selected":null)),a+="
Total Load:'+e.totalLoad+" W
",e.siliconUser&&(a+='

System Overrides

'+n.link("Overload Lighting Circuit","lightbulb-o","overload")+"
",1==e.malfStatus?a+=""+n.link("Override Programming","terminal","hack"):2==e.malfStatus?a+=""+n.link("Shunt Core Processes","caret-square-o-down","occupy"):3==e.malfStatus?a+=""+n.link("Return to Main Core","carat-square-o-left","deoccupy"):4==e.malfStatus&&(a+=""+n.link("Shunt Core Processes","caret-square-o-down")),a+="
"),a+='
Cover Lock:
',a+=e.locked&&!e.siliconUser?e.coverLocked?"Engaged":"Disengaged":""+n.link("Engaged","lock","lock",null,e.coverLocked?"selected":null)+n.link("Disengaged","unlock","lock",null,e.coverLocked?null:"selected"),a+="
"},TMPL.atmos_filter=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Filter:
'+n.link("Nothing",null,"filter",{mode:-1},-1==e.filter_type?"selected":null)+n.link("Plasma",null,"filter",{mode:0},0==e.filter_type?"selected":null)+n.link("O2",null,"filter",{mode:1},1==e.filter_type?"selected":null)+n.link("N2",null,"filter",{mode:2},2==e.filter_type?"selected":null)+n.link("CO2",null,"filter",{mode:3},3==e.filter_type?"selected":null)+n.link("N2O",null,"filter",{mode:4},4==e.filter_type?"selected":null)+"
";return a},TMPL.atmos_mixer=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Node 1:
'+n.link("","fast-backward","node1",{concentration:"-0.1"},null)+n.link("","backward","node1",{concentration:"-0.01"},null)+n.link("","forward","node1",{concentration:"0.01"},null)+n.link("","fast-forward","node1",{concentration:"0.1"},null)+''+e.node1_concentration+'%
Node 2:
'+n.link("","fast-backward","node2",{concentration:"-0.1"},null)+n.link("","backward","node2",{concentration:"-0.01"},null)+n.link("","forward","node2",{concentration:"0.01"},null)+n.link("","fast-forward","node2",{concentration:"0.1"},null)+''+e.node2_concentration+"%
";return a},TMPL.atmos_pump=function(e,t,n){var a='
Power:
'+n.link(e.on?"On":"Off",e.on?"power-off":"close","power")+"
";return a+=e.max_rate?'
Transfer Rate:
'+n.link("Set","pencil","transfer",{set:"custom"})+n.link("Max","plus","transfer",{set:"max"},e.transfer_rate==e.max_rate?"disabled":null)+''+e.transfer_rate+" L/s
":'
Output Pressure:
'+n.link("Set","pencil","pressure",{set:"custom"})+n.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+" kPa
",a+="
"},TMPL.canister=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a tank.":"The regulator is not connected to a tank.",a+='

Canister

'+n.link("Relabel","pencil","relabel",null,e.canLabel?null:"disabled")+'
Pressure:
'+e.tankPressure+' kPa
Port:
',a+=e.portConnected?'Connected':'Disconnected',a+='

Valve

Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.valveOpen?"selected":null)+n.link("Close","lock","valve",null,e.valveOpen?null:"selected")+'

Holding Tank

',a+=e.hasHoldingTank?"
"+n.link("Eject","eject","eject")+'
Label:
'+e.holdingTank.name+'
Tank Pressure:
'+e.holdingTank.tankPressure+" kPa
":'
No Holding Tank
',a+="
"},TMPL.chem_dispenser=function(e,t,n){var a='

Status

Energy:
'+n.bar(e.energy,0,e.maxEnergy,null,e.energy+" Units")+'
Amount:
',r=e.beakerTransferAmounts;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=""+n.link(s,"plus","amount",{set:s},e.amount==s?"selected":null);a+='

Dispense

';var l=e.chemicals;if(l)for(var c,i=-1,u=l.length-1;u>i;)c=l[i+=1],a+=""+n.link(c.title,"tint","dispense",c.commands,null,"gridable");a+='

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
';var d=e.beakerTransferAmounts;if(d)for(var s,i=-1,p=d.length-1;p>i;)s=d[i+=1],a+=""+n.link(s,"minus","remove",{amount:s});if(a+='
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){a+=""+e.beakerCurrentVolume+"/"+e.beakerMaxVolume+" Units
";var f=e.beakerContents;if(f)for(var h,i=-1,v=f.length-1;v>i;)h=f[i+=1],a+=''+h.volume+" units of "+h.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.chem_heater=function(e,t,n){var a='

Status

Power:
'+n.link(e.isActive?"On":"Off",e.isActive?"power-off":"close","power",null,e.isBeakerLoaded?null:"disabled")+'
Target:
'+n.link(e.targetTemp+"K","pencil","temperature")+'

Beaker

'+n.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
';if(e.isBeakerLoaded)if(a+="Temperature: "+e.currentTemp+"K
",e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.cryo=function(e,t,n){var a='

Occupant

Occupant:
';if(a+=e.hasOccupant?""+e.occupant.name+"":'No Occupant',a+="
",e.hasOccupant&&(a+='
State:
',a+=0==e.occupant.stat?'Conscious':1==e.occupant.stat?'Unconscious':'Dead',a+='
Temperature:
'+n.round(e.occupant.bodyTemperature)+" K
"),e.hasOccupant&&e.occupant.stat<2&&(a+='
Health:
'+n.bar(e.occupant.health,e.occupant.minHealth,e.occupant.Maxhealth,e.occupant.health>=0?"good":"average",n.round(e.occupant.health))+'
Brute:
'+n.bar(e.occupant.bruteLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.bruteLoss))+'
Respiratory:
'+n.bar(e.occupant.oxyLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.oxyLoss))+'
Toxin:
'+n.bar(e.occupant.toxLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.toxLoss))+'
Burn:
'+n.bar(e.occupant.fireLoss,0,e.occupant.maxHealth,"bad",n.round(e.occupant.fireLoss))+"
"),a+='

Cell

Power:
',a+=e.isOperating?""+n.link("On","power-off","off"):""+n.link("Off","close","on"),a+='
Temperature:
'+e.cellTemperature+' K
Door:
',a+=e.isOpen?""+n.link("Open","unlock","close"):""+n.link("Closed","lock","open"),a+=e.autoEject?""+n.link("Auto","sign-out","autoeject"):""+n.link("Manual","sign-in","autoeject"),a+='

Beaker

'+n.link("Eject","eject","ejectbeaker",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){var r=e.beakerContents;if(r)for(var s,i=-1,o=r.length-1;o>i;)s=r[i+=1],a+=''+s.volume+" units of "+s.name+"
"}else a+='Beaker Empty';else a+='No Beaker Loaded';return a+="
"},TMPL.smes=function(e,t,n){var a='

Storage

Stored Energy:
'+n.bar(e.capacityPercent,0,100,e.capacityPercent>=50?"good":e.capacityPercent>=15?"average":"bad",n.round(e.capacityPercent)+"%")+'

Input

Charge Mode:
'+n.link("Auto","refresh","tryinput",null,e.inputAttempt?"selected":null)+n.link("Off","close","tryinput",null,e.inputAttempt?null:"selected")+" ";return a+=e.capacityPercent>=99?"[Fully Charged]":e.inputting?"[Charging]":"[Not Charging]",a+='
Input Setting:
'+n.bar(e.inputLevel,0,e.inputLevelMax,null,e.inputLevel+" W")+'
Adjust Input:
'+n.link("","fast-backward","input",{set:"min"},e.inputLevel?null:"selected")+n.link("","backward","input",{set:"minus"},e.inputLevel?null:"disabled")+n.link("Set","pencil","input",{set:"custom"},null)+n.link("","forward","input",{set:"plus"},e.inputLevel==e.inputLevelMax?"disabled":null)+n.link("","fast-forward","input",{set:"max"},e.inputLevel==e.inputLevelMax?"selected":null)+'
Available:
'+e.inputAvailable+' W

Output

Charge Mode:
'+n.link("On","power-off","tryoutput",null,e.outputAttempt?"selected":null)+n.link("Off","close","tryoutput",null,e.outputAttempt?null:"selected")+" ",a+=e.outputting?'[Sending]':e.charge>0?'[Not Sending]':'[No Charge]',a+='
Output Setting:
'+n.bar(e.outputLevel,0,e.outputLevelMax,null,e.outputLevel+" W")+'
Adjust Output:
'+n.link("","fast-backward","output",{set:"min"},e.outputLevel?null:"selected")+n.link("","backward","output",{set:"minus"},e.outputLevel?null:"disabled")+n.link("Set","pencil","output",{set:"custom"},null)+n.link("","forward","output",{set:"plus"},e.outputLevel==e.outputLevelMax?"disabled":null)+n.link("","fast-forward","output",{set:"max"},e.outputLevel==e.outputLevelMax?"selected":null)+'
Outputting:
'+e.outputUsed+" W
"},TMPL.solar_control=function(e,t,n){var a='

Status

Generated Power:
'+e.generated+' W
Orientation:
'+e.angle+"° ("+e.direction+')
Adjust:
'+n.link("15°","step-backward","control",{cdir:"-15"})+n.link("1°","backward","control",{cdir:"-1"})+n.link("1°","forward","control",{cdir:"1"})+n.link("15°","step-forward","control",{cdir:"15"})+'

Tracking

Tracker Mode:
'+n.link("Off","close","tracking",{mode:"0"},0==e.tracking_state?"selected":"")+n.link("Timed","clock-o","tracking",{mode:"1"},1==e.tracking_state?"selected":"");return a+=e.connected_tracker?""+n.link("Auto","refresh","tracking",{mode:"2"},2==e.tracking_state?"selected":""):""+n.link("Auto","refresh",null,null,"disabled"),a+='
Tracking Rate:
'+e.tracking_rate+" deg/h ("+e.rotating_way+')
Adjust:
'+n.link("180°","fast-backward","control",{tdir:"-180"})+n.link("30°","step-backward","control",{tdir:"-30"})+n.link("1°","backward","control",{tdir:"-1"})+n.link("1°","forward","control",{tdir:"1"})+n.link("30°","step-forward","control",{tdir:"30"})+n.link("180°","fast-forward","control",{tdir:"180"})+'

Devices

Search:
'+n.link("Refresh","refresh","refresh")+'
Solar Tracker:
',a+=e.connected_tracker?'Found':'Not Found',a+='
Solars Panels:
'+e.connected_panels+" Connected
"},TMPL.space_heater=function(e,t,n){var a='

Status

Power:
'+n.link("On","power-off","power",null,e.on?"selected":null)+n.link("Off","close","power",null,e.on?null:"selected")+'
Stored Energy:
';return a+=e.hasPowercell?""+n.bar(e.powerLevel,0,100,"good",e.powerLevel+"%"):'No power cell loaded.',a+="
",e.open&&(a+='
Cell:
',a+=e.hasPowercell?""+n.link("Eject","eject","ejectcell"):""+n.link("Install","eject","installcell"),a+="
"),a+='

Thermostat

Current Temp:
'+e.currentTemp+'°C
Target Temp:
'+e.targetTemp+"°C
",e.open&&(a+='
Adjustment:
'+n.link("","fast-backward","temp",{set:-20},e.targetTemp>e.minTemp?null:"disabled")+n.link("","backward","temp",{set:-5},e.targetTemp>e.minTemp?null:"disabled")+n.link("Set","pencil","temp",{set:"custom"},null)+n.link("","forward","temp",{set:5},e.targetTemp
"),a+='
Operational Mode:
',a+=e.open?""+n.link("Heat","long-arrow-up","mode",{mode:"heat"},"heat"!=e.mode?null:"selected")+n.link("Cool","long-arrow-down","mode",{mode:"cool"},"cool"!=e.mode?null:"selected")+n.link("Auto","arrows-v","mode",{mode:"auto"},"heat"==e.mode||"cool"==e.mode?null:"selected"):"heat"==e.mode?'Heat':"cool"==e.mode?'Cool':'Auto',a+="
"},TMPL.tanks=function(e,t,n){var a='
';return a+=e.hasHoldingTank?"The regulator is connected to a mask.":"The regulator is not connected to a mask.",a+='
Tank Pressure:
'+n.bar(e.tankPressure,0,1013,e.tankPressure>200?"good":e.tankPressure>100?"average":"bad",e.tankPressure+" kPa")+'
Release Pressure:
'+n.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+n.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+n.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+n.link("Set","pencil","pressure",{set:"custom"},null)+n.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+n.link("Open","unlock","valve",null,e.maskConnected?e.valveOpen?"selected":null:"disabled")+n.link("Close","lock","valuve",null,e.valveOpen?null:"selected")+"
"},TMPL._generic=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a},TMPL._nanotrasen=function(e,t,n){var a="
"+t.title+"
Initiating...
";return a}; \ No newline at end of file diff --git a/nano/assets/nanoui.lib.css b/nano/assets/nanoui.lib.css deleted file mode 100644 index 034c7f33676..00000000000 --- a/nano/assets/nanoui.lib.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:FontAwesome;src:url(fontawesome-webfont.eot?v=4.5.0);src:url(fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(fontawesome-webfont.woff?v=4.5.0) format('woff'),url(fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:a 2s infinite linear;animation:a 2s infinite linear}.fa-pulse{-webkit-animation:a 1s infinite steps(8);animation:a 1s infinite steps(8)}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/nano/assets/nanoui.lib.js b/nano/assets/nanoui.lib.js deleted file mode 100644 index 0c13cdd523f..00000000000 --- a/nano/assets/nanoui.lib.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t){function e(t,e,n,r){for(var i,a=n.slice(),l=o(e,t),u=0,c=a.length;c>u&&(handler=a[u],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(l):handler.call(t,l),!l.stoppedImmediatePropagation);u++);return i=!l.stoppedPropagation,r&&i&&t.parentNode?t.parentNode.dispatchEvent(l):!l.defaultPrevented}function n(t,e){return{configurable:!0,get:t,set:e}}function r(t,e,r){var o=y(e||t,r);g(t,"textContent",n(function(){return o.get.call(this)},function(t){o.set.call(this,t)}))}function o(t,e){return t.currentTarget=e,t.eventPhase=t.target===t.currentTarget?2:3,t}function i(t,e){for(var n=t.length;n--&&t[n]!==e;);return n}function a(){if("BR"===this.tagName)return"\n";for(var t=this.firstChild,e=[];t;)8!==t.nodeType&&7!==t.nodeType&&e.push(t.textContent),t=t.nextSibling;return e.join("")}function l(t){var e=document.createEvent("Event");e.initEvent("input",!0,!0),(t.srcElement||t.fromElement||document).dispatchEvent(e)}function u(t){!h&&S.test(document.readyState)&&(h=!h,document.detachEvent(p,u),t=document.createEvent("Event"),t.initEvent(d,!0,!0),document.dispatchEvent(t))}function c(t){for(var e;e=this.lastChild;)this.removeChild(e);null!=t&&this.appendChild(document.createTextNode(t))}function s(e,n){return n||(n=t.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var f=!0,h=!1,p="onreadystatechange",d="DOMContentLoaded",v="__IE8__"+Math.random(),g=Object.defineProperty||function(t,e,n){t[e]=n.value},m=Object.defineProperties||function(e,n){for(var r in n)if(b.call(n,r))try{g(e,r,n[r])}catch(o){t.console&&console.log(r+" failed on object:",e,o.message)}},y=Object.getOwnPropertyDescriptor,b=Object.prototype.hasOwnProperty,w=t.Element.prototype,E=t.Text.prototype,T=/^[a-z]+$/,S=/loaded|complete/,x={},C=document.createElement("div"),O=document.documentElement,j=O.removeAttribute,N=O.setAttribute;r(t.HTMLCommentElement.prototype,w,"nodeValue"),r(t.HTMLScriptElement.prototype,null,"text"),r(E,null,"nodeValue"),r(t.HTMLTitleElement.prototype,null,"text"),g(t.HTMLStyleElement.prototype,"textContent",function(t){return n(function(){return t.get.call(this.styleSheet)},function(e){t.set.call(this.styleSheet,e)})}(y(t.CSSStyleSheet.prototype,"cssText"))),m(w,{textContent:{get:a,set:c},firstElementChild:{get:function(){for(var t=this.childNodes||[],e=0,n=t.length;n>e;e++)if(1==t[e].nodeType)return t[e]}},lastElementChild:{get:function(){for(var t=this.childNodes||[],e=t.length;e--;)if(1==t[e].nodeType)return t[e]}},oninput:{get:function(){return this._oninput||null},set:function(t){this._oninput&&(this.removeEventListener("input",this._oninput),this._oninput=t,t&&this.addEventListener("input",t))}},previousElementSibling:{get:function(){for(var t=this.previousSibling;t&&1!=t.nodeType;)t=t.previousSibling;return t}},nextElementSibling:{get:function(){for(var t=this.nextSibling;t&&1!=t.nodeType;)t=t.nextSibling;return t}},childElementCount:{get:function(){for(var t=0,e=this.childNodes||[],n=e.length;n--;t+=1==e[n].nodeType);return t}},addEventListener:{value:function(t,n,r){var o,a,u=this,c="on"+t,f=u[v]||g(u,v,{value:{}})[v],h=f[c]||(f[c]={}),p=h.h||(h.h=[]);if(!b.call(h,"w")){if(h.w=function(t){return t[v]||e(u,s(u,t),p,!1)},!b.call(x,c))if(T.test(t)){try{o=document.createEventObject(),o[v]=!0,9!=u.nodeType&&null==u.parentNode&&C.appendChild(u),(a=u.getAttribute(c))&&j.call(u,c),u.fireEvent(c,o),x[c]=!0}catch(o){for(x[c]=!1;C.hasChildNodes();)C.removeChild(C.firstChild)}null!=a&&N.call(u,c,a)}else x[c]=!1;(h.n=x[c])&&u.attachEvent(c,h.w)}i(p,n)<0&&p[r?"unshift":"push"](n),"input"===t&&u.attachEvent("onkeyup",l)}},dispatchEvent:{value:function(t){var n,r=this,o="on"+t.type,i=r[v],a=i&&i[o],l=!!a;return t.target||(t.target=r),l?a.n?r.fireEvent(o,t):e(r,t,a.h,!0):(n=r.parentNode)?n.dispatchEvent(t):!0,!t.defaultPrevented}},removeEventListener:{value:function(t,e,n){var r=this,o="on"+t,a=r[v],l=a&&a[o],u=l&&l.h,c=u?i(u,e):-1;c>-1&&u.splice(c,1)}}}),m(E,{addEventListener:{value:w.addEventListener},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener}}),m(t.XMLHttpRequest.prototype,{addEventListener:{value:function(t,e,n){var r=this,o="on"+t,a=r[v]||g(r,v,{value:{}})[v],l=a[o]||(a[o]={}),u=l.h||(l.h=[]);i(u,e)<0&&(r[o]||(r[o]=function(){var e=document.createEvent("Event");e.initEvent(t,!0,!0),r.dispatchEvent(e)}),u[n?"unshift":"push"](e))}},dispatchEvent:{value:function(t){var n=this,r="on"+t.type,o=n[v],i=o&&o[r],a=!!i;return a&&(i.n?n.fireEvent(r,t):e(n,t,i.h,!0))}},removeEventListener:{value:w.removeEventListener}}),m(t.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(t,e,n){this.type=t,this.bubbles=!!e,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),m(t.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(t){11===this.nodeType&&c.call(this,t)}},addEventListener:{value:function(e,n,r){var o=this;w.addEventListener.call(o,e,n,r),f&&e===d&&!S.test(o.readyState)&&(f=!1,o.attachEvent(p,u),t==top&&!function i(t){try{o.documentElement.doScroll("left"),u()}catch(e){setTimeout(i,50)}}())}},dispatchEvent:{value:w.dispatchEvent},removeEventListener:{value:w.removeEventListener},createEvent:{value:function(t){var e;if("Event"!==t)throw new Error("unsupported "+t);return e=document.createEventObject(),e.timeStamp=(new Date).getTime(),e}}}),m(t.Window.prototype,{getComputedStyle:{value:function(){function t(t){this._=t}function e(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,o=/\-([a-z])/g,i=function(t,e){return e.toUpperCase()};return t.prototype.getPropertyValue=function(t){var e,a,l,u=this._,c=u.style,s=u.currentStyle,f=u.runtimeStyle;return t=("float"===t?"style-float":t).replace(o,i),e=s?s[t]:c[t],n.test(e)&&!r.test(t)&&(a=c.left,l=f&&f.left,l&&(f.left=s.left),c.left="fontSize"===t?"1em":e,e=c.pixelLeft+"px",c.left=a,l&&(f.left=l)),null==e?e:e+""||"auto"},e.prototype.getPropertyValue=function(){return null},function(n,r){return r?new e(n):new t(n)}}()},addEventListener:{value:function(n,r,o){var a,l=t,u="on"+n;l[u]||(l[u]=function(t){return e(l,s(l,t),a,!1)}),a=l[u][v]||(l[u][v]=[]),i(a,r)<0&&a[o?"unshift":"push"](r)}},dispatchEvent:{value:function(e){var n=t["on"+e.type];return n?n.call(t,e)!==!1&&!e.defaultPrevented:!0}},removeEventListener:{value:function(e,n,r){var o="on"+e,a=(t[o]||Object)[v],l=a?i(a,n):-1;l>-1&&a.splice(l,1)}}}),function(t,e,n){for(n=0;n0||-1)*Math.floor(Math.abs(e))),e},ToPrimitive:function(e){var n,r,o;if(_(e))return e;if(r=e.valueOf,t(r)&&(n=r.call(e),_(n)))return n;if(o=e.toString,t(o)&&(n=o.call(e),_(n)))return n;throw new TypeError},ToObject:function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return r(t)},ToUint32:function(t){return t>>>0}},U=function(){};D(i,{bind:function(e){var n=this;if(!t(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=s.call(arguments,1),a=function(){if(this instanceof o){var t=n.apply(this,d.call(i,s.call(arguments)));return r(t)===t?t:this}return n.apply(e,d.call(i,s.call(arguments)))},l=g(0,n.length-i.length),u=[],c=0;l>c;c++)h.call(u,"$"+c);return o=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this, arguments); }")(a),n.prototype&&(U.prototype=n.prototype,o.prototype=new U,U.prototype=null),o}});var F=v.bind(o.hasOwnProperty),k=v.bind(o.toString),q=v.bind(l.slice),$=v.bind(l.split),R=v.bind(l.indexOf),J=v.bind(h),H=e.isArray||function(t){return"[object Array]"===k(t)},z=1!==[].unshift(0);D(n,{unshift:function(){return p.apply(this,arguments),this.length}},z),D(e,{isArray:H});var Z=r("a"),B="a"!==Z[0]||!(0 in Z),V=function(t){var e=!0,n=!0;return t&&(t.call("foo",function(t,n,r){"object"!=typeof r&&(e=!1)}),t.call([1],function(){"use strict";n="string"==typeof this},"x")),!!t&&e&&n};D(n,{forEach:function(e){var n,r=L.ToObject(this),o=B&&N(this)?$(this,""):r,i=-1,a=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i1&&(r=arguments[1]),!t(n))throw new TypeError("Array.prototype.map callback must be a function");for(var u=0;a>u;u++)u in i&&("undefined"==typeof r?l[u]=n(i[u],u,o):l[u]=n.call(r,i[u],u,o));return l}},!V(n.map)),D(n,{filter:function(e){var n,r,o=L.ToObject(this),i=B&&N(this)?$(this,""):o,a=L.ToUint32(i.length),l=[];if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.filter callback must be a function");for(var u=0;a>u;u++)u in i&&(n=i[u],("undefined"==typeof r?e(n,u,o):e.call(r,n,u,o))&&J(l,n));return l}},!V(n.filter)),D(n,{every:function(e){var n,r=L.ToObject(this),o=B&&N(this)?$(this,""):r,i=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;i>a;a++)if(a in o&&!("undefined"==typeof n?e(o[a],a,r):e.call(n,o[a],a,r)))return!1;return!0}},!V(n.every)),D(n,{some:function(e){var n,r=L.ToObject(this),o=B&&N(this)?$(this,""):r,i=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;i>a;a++)if(a in o&&("undefined"==typeof n?e(o[a],a,r):e.call(n,o[a],a,r)))return!0;return!1}},!V(n.some));var G=!1;n.reduce&&(G="object"==typeof n.reduce.call("es5",function(t,e,n,r){return r})),D(n,{reduce:function(e){var n=L.ToObject(this),r=B&&N(this)?$(this,""):n,o=L.ToUint32(r.length);if(!t(e))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;o>a;a++)a in r&&(i=e(i,r[a],a,n));return i}},!G);var W=!1;n.reduceRight&&(W="object"==typeof n.reduceRight.call("es5",function(t,e,n,r){return r})),D(n,{reduceRight:function(e){var n=L.ToObject(this),r=B&&N(this)?$(this,""):n,o=L.ToUint32(r.length);if(!t(e))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return i;do a in r&&(i=e(i,r[a],a,n));while(a--);return i}},!W);var X=n.indexOf&&-1!==[0,1].indexOf(1,2);D(n,{indexOf:function(t){var e=B&&N(this)?$(this,""):L.ToObject(this),n=L.ToUint32(e.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=L.ToInteger(arguments[1])),r=r>=0?r:g(0,n+r);n>r;r++)if(r in e&&e[r]===t)return r;return-1}},X);var Y=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);D(n,{lastIndexOf:function(t){var e=B&&N(this)?$(this,""):L.ToObject(this),n=L.ToUint32(e.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=m(r,L.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in e&&t===e[r])return r;return-1}},Y);var K=function(){var t=[1,2],e=t.splice();return 2===t.length&&H(e)&&0===e.length}();D(n,{splice:function(t,e){return 0===arguments.length?[]:f.apply(this,arguments)}},!K);var Q=function(){var t={};return n.splice.call(t,0,0,1),1===t.length}();D(n,{splice:function(t,e){if(0===arguments.length)return[];var n=arguments;return this.length=g(L.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof e&&(n=s.call(arguments),n.length<2?J(n,this.length-t):n[1]=L.ToInteger(e)),f.apply(this,n)}},!Q);var tt=function(){var t=new e(1e5);return t[8]="x",t.splice(1,1),7===t.indexOf("x")}(),et=function(){var t=256,e=[];return e[t]="a",e.splice(t+1,0,"b"),"a"===e[t]}();D(n,{splice:function(t,e){for(var n,r=L.ToObject(this),o=[],i=L.ToUint32(r.length),l=L.ToInteger(t),u=0>l?g(i+l,0):m(l,i),c=m(g(L.ToInteger(e),0),i-u),f=0;c>f;)n=a(u+f),F(r,n)&&(o[f]=r[n]),f+=1;var h,p=s.call(arguments,2),d=p.length;if(c>d){for(f=u;i-c>f;)n=a(f+c),h=a(f+d),F(r,n)?r[h]=r[n]:delete r[h],f+=1;for(f=i;f>i-c+d;)delete r[f-1],f-=1}else if(d>c)for(f=i-c;f>u;)n=a(f+c-1),h=a(f+d-1),F(r,n)?r[h]=r[n]:delete r[h],f-=1;f=u;for(var v=0;v=0&&!H(e)&&t(e.callee)},yt=gt(arguments)?gt:mt;D(r,{keys:function(e){var n=t(e),r=yt(e),o=null!==e&&"object"==typeof e,i=o&&N(e);if(!o&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var l=[],u=ut&&n;if(i&&ct||r)for(var c=0;ch;h++){var p=dt[h];f&&"constructor"===p||!F(e,p)||J(l,p)}return l}});var bt=r.keys&&function(){return 2===r.keys(arguments).length}(1,2),wt=r.keys&&function(){var t=r.keys(arguments);return 1!==arguments.length||1!==t.length||1!==t[0]}(1),Et=r.keys;D(r,{keys:function(t){return Et(yt(t)?s.call(t):t)}},!bt||wt);var Tt=-621987552e5,St="-000001",xt=Date.prototype.toISOString&&-1===new Date(Tt).toISOString().indexOf(St),Ct=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();D(Date.prototype,{toISOString:function(){var t,e,n,r,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(r=this.getUTCFullYear(),o=this.getUTCMonth(),r+=Math.floor(o/12),o=(o%12+12)%12,t=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],r=(0>r?"-":r>9999?"+":"")+q("00000"+Math.abs(r),r>=0&&9999>=r?-4:-6),e=t.length;e--;)n=t[e],10>n&&(t[e]="0"+n);return r+"-"+s.call(t,0,2).join("-")+"T"+s.call(t,2).join(":")+"."+q("000"+this.getUTCMilliseconds(),-3)+"Z"}},xt||Ct);var Ot=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(Tt).toJSON().indexOf(St)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(t){return!1}}();Ot||(Date.prototype.toJSON=function(e){var n=r(this),o=L.ToPrimitive(n);if("number"==typeof o&&!isFinite(o))return null;var i=n.toISOString;if(!t(i))throw new TypeError("toISOString property is not callable");return i.call(n)});var jt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),Nt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),At=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(At||Nt||!jt){var It=Math.pow(2,31)-1,Mt=(Math.floor(It/1e3),P(new Date(1970,0,1,0,0,0,It+1).getTime()));Date=function(t){var e=function(n,r,o,i,l,u,c){var s,f=arguments.length;if(this instanceof t){var h=u,p=c;if(Mt&&f>=7&&c>It){var d=Math.floor(c/It)*It,v=Math.floor(d/1e3);h+=v,p-=1e3*v}s=1===f&&a(n)===n?new t(e.parse(n)):f>=7?new t(n,r,o,i,l,h,p):f>=6?new t(n,r,o,i,l,h):f>=5?new t(n,r,o,i,l):f>=4?new t(n,r,o,i):f>=3?new t(n,r,o):f>=2?new t(n,r):f>=1?new t(n):new t}else s=t.apply(this,arguments);return _(s)||D(s,{constructor:e},!0),s},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(t,e){var n=e>1?1:0;return r[e]+Math.floor((t-1969+n)/4)-Math.floor((t-1901+n)/100)+Math.floor((t-1601+n)/400)+365*(t-1970)},i=function(e){var n=0,r=e;if(Mt&&r>It){var o=Math.floor(r/It)*It,i=Math.floor(o/1e3);n+=i,r-=1e3*i}return u(new t(1970,0,1,0,0,n,r))};for(var l in t)F(t,l)&&(e[l]=t[l]);D(e,{now:t.now,UTC:t.UTC},!0),e.prototype=t.prototype,D(e.prototype,{constructor:e},!0);var c=function(e){var r=n.exec(e);if(r){var a,l=u(r[1]),c=u(r[2]||1)-1,s=u(r[3]||1)-1,f=u(r[4]||0),h=u(r[5]||0),p=u(r[6]||0),d=Math.floor(1e3*u(r[7]||0)),v=Boolean(r[4]&&!r[8]),g="-"===r[9]?1:-1,m=u(r[10]||0),y=u(r[11]||0),b=h>0||p>0||d>0;return(b?24:25)>f&&60>h&&60>p&&1e3>d&&c>-1&&12>c&&24>m&&60>y&&s>-1&&s=-864e13&&864e13>=a)?a:NaN}return t.parse.apply(this,arguments)};return D(e,{parse:c}),e}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var Dt=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),_t={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(t,e){for(var n=-1,r=e;++n<_t.size;)r+=t*_t.data[n],_t.data[n]=r%_t.base,r=Math.floor(r/_t.base)},divide:function(t){for(var e=_t.size,n=0;--e>=0;)n+=_t.data[e],_t.data[e]=Math.floor(n/t),n=n%t*_t.base},numToString:function(){for(var t=_t.size,e="";--t>=0;)if(""!==e||0===t||0!==_t.data[t]){var n=a(_t.data[t]);""===e?e=n:e+=q("0000000",0,7-n.length)+n}return e},pow:function Xt(t,e,n){return 0===e?n:e%2===1?Xt(t,e-1,n*t):Xt(t*t,e/2,n)},log:function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}},Pt=function(t){var e,n,r,o,i,l,c,s;if(e=u(t),e=P(e)?0:Math.floor(e),0>e||e>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=u(this),P(n))return"NaN";if(-1e21>=n||n>=1e21)return a(n);if(r="",0>n&&(r="-",n=-n),o="0",n>1e-21)if(i=_t.log(n*_t.pow(2,69,1))-69,l=0>i?n*_t.pow(2,-i,1):n/_t.pow(2,i,1),l*=4503599627370496,i=52-i,i>0){for(_t.multiply(0,l),c=e;c>=7;)_t.multiply(1e7,0),c-=7;for(_t.multiply(_t.pow(10,c,1),0),c=i-1;c>=23;)_t.divide(1<<23),c-=23;_t.divide(1<0?(s=o.length,o=e>=s?r+q("0.0000000000000000000",0,e-s+2)+o:r+q(o,0,s-e)+"."+q(o,s-e)):o=r+o,o};D(c,{toFixed:Pt},Dt);var Lt=function(){try{return"1"===1..toPrecision(void 0)}catch(t){return!0}}(),Ut=c.toPrecision;D(c,{toPrecision:function(t){return"undefined"==typeof t?Ut.call(this):Ut.call(this,t)}},Lt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var t="undefined"==typeof/()??/.exec("")[1],e=Math.pow(2,32)-1;l.split=function(n,r){var o=this;if("undefined"==typeof n&&0===r)return[];if(!x(n))return $(this,n,r);var i,a,l,u,c=[],f=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),p=0,d=new RegExp(n.source,f+"g");o+="",t||(i=new RegExp("^"+d.source+"$(?!\\s)",f));var v="undefined"==typeof r?e:L.ToUint32(r);for(a=d.exec(o);a&&(l=a.index+a[0].length,!(l>p&&(J(c,q(o,p,a.index)),!t&&a.length>1&&a[0].replace(i,function(){for(var t=1;t1&&a.index=v)));)d.lastIndex===a.index&&d.lastIndex++,a=d.exec(o);return p===o.length?(u||!d.test(""))&&J(c,""):J(c,q(o,p)),c.length>v?q(c,0,v):c}}():"0".split(void 0,0).length&&(l.split=function(t,e){return"undefined"==typeof t&&0===e?[]:$(this,t,e)});var Ft=l.replace,kt=function(){var t=[];return"x".replace(/x(.)?/g,function(e,n){J(t,n)}),1===t.length&&"undefined"==typeof t[0]}();kt||(l.replace=function(e,n){var r=t(n),o=x(e)&&/\)[*?]/.test(e.source);if(r&&o){var i=function(t){var r=arguments.length,o=e.lastIndex;e.lastIndex=0;var i=e.exec(t)||[];return e.lastIndex=o,J(i,arguments[r-2],arguments[r-1]),n.apply(this,i)};return Ft.call(this,e,i)}return Ft.call(this,e,n)});var qt=l.substr,$t="".substr&&"b"!=="0b".substr(-1);D(l,{substr:function(t,e){var n=t;return 0>t&&(n=g(this.length+t,0)),qt.call(this,n,e)}},$t);var Rt=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Jt="​",Ht="["+Rt+"]",zt=new RegExp("^"+Ht+Ht+"*"),Zt=new RegExp(Ht+Ht+"*$"),Bt=l.trim&&(Rt.trim()||!Jt.trim());D(l,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return a(this).replace(zt,"").replace(Zt,"")}},Bt);var Vt=l.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);D(l,{lastIndexOf:function(t){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var e=a(this),n=a(t),r=arguments.length>1?u(arguments[1]):NaN,o=P(r)?1/0:L.ToInteger(r),i=m(g(o,0),e.length),l=n.length,c=i+l;c>0;){c=g(0,c-l);var s=R(q(e,c,i+l),n);if(-1!==s)return c+s}return-1}},Vt);var Gt=l.lastIndexOf;if(D(l,{lastIndexOf:function(t){return Gt.apply(this,arguments)}},1!==l.lastIndexOf.length),(8!==parseInt(Rt+"08")||22!==parseInt(Rt+"0x16"))&&(parseInt=function(t){var e=/^[\-+]?0[xX]/;return function(n,r){var o=a(n).trim(),i=u(r)||(e.test(o)?16:10);return t(o,i)}}(parseInt)),"RangeError: test"!==String(new RangeError("test"))){var Wt=(Error.prototype.toString,function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var t=this.name;"undefined"==typeof t?t="Error":"string"!=typeof t&&(t=a(t));var e=this.message;return"undefined"==typeof e?e="":"string"!=typeof e&&(e=a(e)),t?e?t+": "+e:t:e});Error.prototype.toString=Wt}}),function(t,e){function n(t,e){var n=t.createElement("p"),r=t.getElementsByTagName("head")[0]||t.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var t=b.elements;return"string"==typeof t?t.split(" "):t}function o(t,e){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof t&&(t=t.join(" ")),b.elements=n+" "+t,c(e)}function i(t){var e=y[t[g]];return e||(e={},m++,t[g]=m,y[m]=e),e}function a(t,n,r){if(n||(n=e),f)return n.createElement(t);r||(r=i(n));var o;return o=r.cache[t]?r.cache[t].cloneNode():v.test(t)?(r.cache[t]=r.createElem(t)).cloneNode():r.createElem(t),!o.canHaveChildren||d.test(t)||o.tagUrn?o:r.frag.appendChild(o)}function l(t,n){if(t||(t=e),f)return t.createDocumentFragment();n=n||i(t);for(var o=n.frag.cloneNode(),a=0,l=r(),u=l.length;u>a;a++)o.createElement(l[a]);return o}function u(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(n){return b.shivMethods?a(n,t,e):e.createElem(n)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(b,e.frag)}function c(t){t||(t=e);var r=i(t);return!b.shivCSS||s||r.hasCSS||(r.hasCSS=!!n(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),f||u(t,r),t}var s,f,h="3.7.3",p=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,v=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",m=0,y={};!function(){try{var t=e.createElement("a");t.innerHTML="",s="hidden"in t,f=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return"undefined"==typeof t.cloneNode||"undefined"==typeof t.createDocumentFragment||"undefined"==typeof t.createElement}()}catch(n){s=!0,f=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:h,shivCSS:p.shivCSS!==!1,supportsUnknownElements:f,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:c,createElement:a,createDocumentFragment:l,addElements:o};t.html5=b,c(e),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof window?window:this,document),function(){function t(e,r){function i(t){if(i[t]!==g)return i[t];var e;if("bug-string-char-index"==t)e="a"!="a"[0];else if("json"==t)e=i("json-stringify")&&i("json-parse");else{var n,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var u=r.stringify,s="function"==typeof u&&b;if(s){(n=function(){return 1}).toJSON=n;try{s="0"===u(0)&&"0"===u(new a)&&'""'==u(new l)&&u(y)===g&&u(g)===g&&u()===g&&"1"===u(n)&&"[1]"==u([n])&&"[null]"==u([g])&&"null"==u(null)&&"[null,null,null]"==u([g,y,null])&&u({a:[n,!0,!1,null,"\x00\b\n\f\r "]})==o&&"1"===u(null,n)&&"[\n 1,\n 2\n]"==u([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==u(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==u(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==u(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==u(new c(-1))}catch(f){s=!1}}e=s}if("json-parse"==t){var h=r.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){n=h(o);var p=5==n.a.length&&1===n.a[0];if(p){try{p=!h('" "')}catch(f){}if(p)try{p=1!==h("01")}catch(f){}if(p)try{p=1!==h("1.")}catch(f){}}}}catch(f){p=!1}e=p}}return i[t]=!!e}e||(e=o.Object()),r||(r=o.Object());var a=e.Number||o.Number,l=e.String||o.String,u=e.Object||o.Object,c=e.Date||o.Date,s=e.SyntaxError||o.SyntaxError,f=e.TypeError||o.TypeError,h=e.Math||o.Math,p=e.JSON||o.JSON;"object"==typeof p&&p&&(r.stringify=p.stringify,r.parse=p.parse);var d,v,g,m=u.prototype,y=m.toString,b=new c(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(w){}if(!i("json")){var E="[object Function]",T="[object Date]",S="[object Number]",x="[object String]",C="[object Array]",O="[object Boolean]",j=i("bug-string-char-index");if(!b)var N=h.floor,A=[0,31,59,90,120,151,181,212,243,273,304,334],I=function(t,e){return A[e]+365*(t-1970)+N((t-1969+(e=+(e>1)))/4)-N((t-1901+e)/100)+N((t-1601+e)/400)};if((d=m.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),v=function(t,e){var r,o,i,a=0;(r=function(){this.valueOf=0}).prototype.valueOf=0,o=new r;for(i in o)d.call(o,i)&&a++;return r=o=null,a?v=2==a?function(t,e){var n,r={},o=y.call(t)==E;for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o=y.call(t)==E;for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(o=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(t,e){var r,i,a=y.call(t)==E,l=!a&&"function"!=typeof t.constructor&&n[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(r in t)a&&"prototype"==r||!l.call(t,r)||e(r);for(i=o.length;r=o[--i];l.call(t,r)&&e(r));}),v(t,e)},!i("json-stringify")){var M={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D="000000",_=function(t,e){return(D+(e||0)).slice(-t)},P="\\u00",L=function(t){for(var e='"',n=0,r=t.length,o=!j||r>10,i=o&&(j?t.split(""):t);r>n;n++){var a=t.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=M[a];break;default:if(32>a){e+=P+_(2,a.toString(16));break}e+=o?i[n]:t.charAt(n)}}return e+'"'},U=function(t,e,n,r,o,i,a){var l,u,c,s,h,p,m,b,w,E,j,A,M,D,P,F;try{l=e[t]}catch(k){}if("object"==typeof l&&l)if(u=y.call(l),u!=T||d.call(l,"toJSON"))"function"==typeof l.toJSON&&(u!=S&&u!=x&&u!=C||d.call(l,"toJSON"))&&(l=l.toJSON(t));else if(l>-1/0&&1/0>l){if(I){for(h=N(l/864e5),c=N(h/365.2425)+1970-1;I(c+1,0)<=h;c++);for(s=N((h-I(c,0))/30.42);I(c,s+1)<=h;s++);h=1+h-I(c,s),p=(l%864e5+864e5)%864e5,m=N(p/36e5)%24,b=N(p/6e4)%60,w=N(p/1e3)%60,E=p%1e3}else c=l.getUTCFullYear(),s=l.getUTCMonth(),h=l.getUTCDate(),m=l.getUTCHours(),b=l.getUTCMinutes(),w=l.getUTCSeconds(),E=l.getUTCMilliseconds();l=(0>=c||c>=1e4?(0>c?"-":"+")+_(6,0>c?-c:c):_(4,c))+"-"+_(2,s+1)+"-"+_(2,h)+"T"+_(2,m)+":"+_(2,b)+":"+_(2,w)+"."+_(3,E)+"Z"}else l=null;if(n&&(l=n.call(e,t,l)),null===l)return"null";if(u=y.call(l),u==O)return""+l;if(u==S)return l>-1/0&&1/0>l?""+l:"null";if(u==x)return L(""+l);if("object"==typeof l){for(D=a.length;D--;)if(a[D]===l)throw f();if(a.push(l),j=[], -P=i,i+=o,u==C){for(M=0,D=l.length;D>M;M++)A=U(M,l,n,r,o,i,a),j.push(A===g?"null":A);F=j.length?o?"[\n"+i+j.join(",\n"+i)+"\n"+P+"]":"["+j.join(",")+"]":"[]"}else v(r||l,function(t){var e=U(t,l,n,r,o,i,a);e!==g&&j.push(L(t)+":"+(o?" ":"")+e)}),F=j.length?o?"{\n"+i+j.join(",\n"+i)+"\n"+P+"}":"{"+j.join(",")+"}":"{}";return a.pop(),F}};r.stringify=function(t,e,r){var o,i,a,l;if(n[typeof e]&&e)if((l=y.call(e))==E)i=e;else if(l==C){a={};for(var u,c=0,s=e.length;s>c;u=e[c++],l=y.call(u),(l==x||l==S)&&(a[u]=1));}if(r)if((l=y.call(r))==S){if((r-=r%1)>0)for(o="",r>10&&(r=10);o.lengthF;)switch(o=i.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=j?i.charAt(F):i[F],F++,t;case 34:for(t="@",F++;a>F;)if(o=i.charCodeAt(F),32>o)R();else if(92==o)switch(o=i.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=$[o],F++;break;case 117:for(e=++F,n=F+4;n>F;F++)o=i.charCodeAt(F),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||R();t+=q("0x"+i.slice(e,F));break;default:R()}else{if(34==o)break;for(o=i.charCodeAt(F),e=F;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++F);t+=i.slice(e,F)}if(34==i.charCodeAt(F))return F++,t;R();default:if(e=F,45==o&&(r=!0,o=i.charCodeAt(++F)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(F+1),o>=48&&57>=o)&&R(),r=!1;a>F&&(o=i.charCodeAt(F),o>=48&&57>=o);F++);if(46==i.charCodeAt(F)){for(n=++F;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==F&&R(),F=n}if(o=i.charCodeAt(F),101==o||69==o){for(o=i.charCodeAt(++F),(43==o||45==o)&&F++,n=F;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==F&&R(),F=n}return+i.slice(e,F)}if(r&&R(),"true"==i.slice(F,F+4))return F+=4,!0;if("false"==i.slice(F,F+5))return F+=5,!1;if("null"==i.slice(F,F+4))return F+=4,null;R()}return"$"},H=function(t){var e,n;if("$"==t&&R(),"string"==typeof t){if("@"==(j?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=J(),"]"!=t;n||(n=!0))n&&(","==t?(t=J(),"]"==t&&R()):R()),","==t&&R(),e.push(H(t));return e}if("{"==t){for(e={};t=J(),"}"!=t;n||(n=!0))n&&(","==t?(t=J(),"}"==t&&R()):R()),(","==t||"string"!=typeof t||"@"!=(j?t.charAt(0):t[0])||":"!=J())&&R(),e[t.slice(1)]=H(J());return e}R()}return t},z=function(t,e,n){var r=Z(t,e,n);r===g?delete t[e]:t[e]=r},Z=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(y.call(o)==C)for(r=o.length;r--;)z(o,r,n);else v(o,function(t){z(o,t,n)});return n.call(t,e,o)};r.parse=function(t,e){var n,r;return F=0,k=""+t,n=H(J()),"$"!=J()&&R(),F=k=null,e&&y.call(e)==E?Z((r={},r[""]=n,r),"",e):n}}}return r.runInContext=t,r}var e="function"==typeof define&&define.amd,n={"function":!0,object:!0},r=n[typeof exports]&&exports&&!exports.nodeType&&exports,o=n[typeof window]&&window||this,i=r&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!i||i.global!==i&&i.window!==i&&i.self!==i||(o=i),r&&!e)t(o,r);else{var a=o.JSON,l=o.JSON3,u=!1,c=t(o,o.JSON3={noConflict:function(){return u||(u=!0,o.JSON=a,o.JSON3=l,a=l=null),c}});o.JSON={parse:c.parse,stringify:c.stringify}}e&&define(function(){return c})}.call(this);var Url=function(){"use strict";var t={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},e={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},n=function(n,r){var a,l=document,u=l.createElement("a"),r=r||l.location.href,c=r.match(/\/\/(.*?)(?::(.*?))?@/)||[];u.href=r;for(a in t)n[a]=u[t[a]]||"";if(n.protocol=n.protocol.replace(/:$/,""),n.query=n.query.replace(/^\?/,""),n.hash=o(n.hash.replace(/^#/,"")),n.user=o(c[1]||""),n.pass=o(c[2]||""),n.port=e[n.protocol]==n.port||0==n.port?"":n.port,n.protocol||/^([a-z]+:)?\/\//.test(r))n.path=n.path.replace(/^\/?/,"/");else{var s=new Url(l.location.href.match(/(.*\/)/)[0]),f=s.path.split("/"),h=n.path.split("/"),p=["protocol","user","pass","host","port"],d=p.length;for(f.pop(),a=0;d>a;a++)n[p[a]]=s[p[a]];for(;".."==h[0];)f.pop(),h.shift();n.path=("/"!=r.charAt(0)?f.join("/"):"")+"/"+h.join("/")}n.paths(("/"==n.path.charAt(0)?n.path.slice(1):n.path).split("/")),i(n)},r=function(t){return encodeURIComponent(t).replace(/'/g,"%27")},o=function(t){return t=t.replace(/\+/g," "),t=t.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(t,e,n,r){var o=parseInt(e,16)-224,i=parseInt(n,16)-128;if(0==o&&32>i)return t;var a=parseInt(r,16)-128,l=(o<<12)+(i<<6)+a;return l>65535?t:String.fromCharCode(l)}),t=t.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(t,e,n){var r=parseInt(e,16)-192;if(2>r)return t;var o=parseInt(n,16)-128;return String.fromCharCode((r<<6)+o)}),t=t.replace(/%([0-7][0-9a-f])/gi,function(t,e){return String.fromCharCode(parseInt(e,16))})},i=function(t){var e=t.query;t.query=new function(t){for(var e,n=/([^=&]+)(=([^&]*))?/g;e=n.exec(t);){var i=decodeURIComponent(e[1].replace(/\+/g," ")),a=e[3]?o(e[3]):"";null!=this[i]?(this[i]instanceof Array||(this[i]=[this[i]]),this[i].push(a)):this[i]=a}this.clear=function(){for(var t in this)this[t]instanceof Function||delete this[t]},this.count=function(){var t,e=0;for(t in this)this[t]instanceof Function||e++;return e},this.isEmpty=function(){return 0===this.count()},this.toString=function(){var t,e,n="",o=r;for(t in this)if(!(this[t]instanceof Function))if(this[t]instanceof Array){var i=this[t].length;if(i)for(e=0;i>e;e++)n+=n?"&":"",n+=o(t)+"="+o(this[t][e]);else n+=(n?"&":"")+o(t)+"="}else n+=n?"&":"",n+=o(t)+"="+o(this[t]);return n}}(e)};return function(t){this.paths=function(t){var e,n="",i=0;if(t&&t.length&&t+""!==t){for(this.isAbsolute()&&(n="/"),e=t.length;e>i;i++)t[i]=r(t[i]);this.path=n+t.join("/")}for(t=("/"===this.path.charAt(0)?this.path.slice(1):this.path).split("/"),i=0,e=t.length;e>i;i++)t[i]=o(t[i]);return t},this.encode=r,this.decode=o,this.isAbsolute=function(){return this.protocol||"/"===this.path.charAt(0)},this.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&r(this.user)+(this.pass&&":"+r(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+r(this.hash))},n(this,t)}}();!function(t){"use strict";function e(){return s.createDocumentFragment()}function n(t){return s.createElement(t)}function r(t){if(1===t.length)return o(t[0]);for(var n=e(),r=q.call(t),i=0;i-1}}([].indexOf||function(t){for($=this.length;$--&&this[$]!==t;);return $}),item:function(t){return this[t]||null},remove:function(){for(var t,e=0;ea?o[c.call(r,i)-1]=b.call(i,this):o[a]},emit:function(t){for(var e=u.call(this,p),r=e&&this[p].l,o=e&&u.call(r,t),i=o&&r[t].slice(0),a=o&&s.call(arguments,1),l=0,c=o?i.length:l;c>l;)n(this,i[l++],a);return o},expect:function(){for(var t=0;t-1&&(i.splice(n,1),i.length||delete o[t])),this},on:function(t,e,n){var r=u.call(this,p),o=(r?this[p]:T(this)).l,i=r&&u.call(o,t)?o[t]:o[t]=[];return w.call(i,e)<0&&(n?f:c).call(i,e),this},once:function(t,e,r){var o=function(a){i.off(t,o,r),n(i,e,arguments)},i=this;return i.on(t,o,r)},trigger:function(t,e){var o=u.call(this,p),i=o&&this[p].l,a="string"==typeof t,c=a?t:t.type,s=o&&u.call(i,c),f=s&&i[c].slice(0),h=a?new r(this,c,e):t,d=0,v=s?f.length:d,g=!(h instanceof r);for(g&&(h._active=!0,h.stopImmediatePropagation=l.stopImmediatePropagation),h.currentTarget=this,m[0]=h;h._active&&v>d;)n(this,f[d++],m);return g&&(delete h._active,delete h.stopImmediatePropagation),!h.defaultPrevented},when:function(t,e){var r=u.call(this,p),o=(r?this[p]:T(this)).w,i=r&&u.call(o,t);return i?(n(this,e,o[t]),this):this.once(t,function(){u.call(o,t)||(o[t]=arguments)},!0).once(t,e)}},C=function(t,e,n){u.call(t,e)||(t[e]=n)},O=!1;l.defaultPrevented=!1,l._active=l.cancelable=!0,l.preventDefault=function(){this.defaultPrevented=!0},l.stopImmediatePropagation=function(){this._active=!1};for(o in x)u.call(x,o)&&y(a,o,{enumerable:!1,configurable:!0,writable:!0,value:x[o]});!function(t){function e(e){function n(t){t[e].apply(t,this)}return function(){return t.call(this,n,arguments),this}}for(var n in x)x.hasOwnProperty(n)&&!/^listeners|boundTo$/.test(n)&&y(i,n,{enumerable:!1,configurable:!0,writable:!0,value:e(n)})}(i.forEach||function(t,e){for(var n=this,r=0;r-1&&(n.splice(r,1),n.length||(self["on"+t]=null))}),s.expect("ready","DOMContentLoaded"),/loaded|complete/.test(s.readyState)?(t.setImmediate||setTimeout)(c):s.once("DOMContentLoaded",c,!0)}(window),"$"in window||y(window,"$",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){var n=e||document,r=t.length-6,o=t.lastIndexOf(":first")===r&&r>0,i=o?n.querySelector(t.slice(0,r)):n.querySelectorAll(t);return o?i?[i]:[]:v.call(i)}})}}(Object);var Class=Class||function(t){"use strict";function e(t,e,r){for(var o,i=[],a=0;ae;)o[e++].call(this);return t.apply(this,arguments)}}(E),E[p]=x)),b.call(t,d)&&n(t[d],E,y,!0,!0),h&&(v!==y&&n(v,E,y,!0,!0),E[p]=x),x[c]!==E&&r(x,c,E,!1),n(t,x,y,!1,!0),b.call(t,f)&&a([].concat(t[f]),x),E}}(Object); \ No newline at end of file diff --git a/nano/assets/nanoui.main.js b/nano/assets/nanoui.main.js deleted file mode 100644 index 677b6bc3955..00000000000 --- a/nano/assets/nanoui.main.js +++ /dev/null @@ -1 +0,0 @@ -(function(){this.NANO={INTERACTIVE:2,UPDATE:1,DISABLED:0}}).call(this),function(){this.helpers={link:function(t,n,i,e,s,r){return null==t&&(t=""),null==n&&(n=""),null==i&&(i=""),null==e&&(e={}),null==s&&(s=""),null==r&&(r=""),e=JSON.stringify(e),n&&(n="",r+=" iconed"),s?""+n+t+"":""+n+t+""},bar:function(t,n,i,e,s){var r;return null==t&&(t=0),null==n&&(n=0),null==i&&(i=100),null==e&&(e=""),null==s&&(s=""),i>n?n>t?t=n:t>i&&(t=i):t>n?t=n:i>t&&(t=i),r=Math.round((t-n)/(i-n)*100),"
"+s+"
"},round:function(t){return Math.round(t)},fixed:function(t,n){return null==n&&(n=1),Number(Math.round(t+"e"+n)+"e-"+n)},floor:function(t){return Math.floor(t)},ceil:function(t){return Math.ceil(t)}}}.call(this),function(){document.when("ready",function(t){return function(){var n;n={},t.nanoui=new t.NanoUI(n,document),t.nanowindow=new t.Window(n,document),n.emit("memes"),t.NanoBus=n}}(this))}.call(this),function(){var t=function(t,n){return function(){return t.apply(n,arguments)}};this.NanoUI=function(){function n(n,i){this.bus=n,this.fragment=null!=i?i:document,this.winset=t(this.winset,this),this.close=t(this.close,this),this.act=t(this.act,this),this.render=t(this.render,this),this.update=t(this.update,this),this.serverUpdate=t(this.serverUpdate,this),this.bus.on("serverUpdate",this.serverUpdate),this.bus.on("update",this.update),this.bus.on("render",this.render),this.bus.on("memes",this.render),this.initialized=!1,this.data={},this.initialData=JSON.parse(this.fragment.query("#data").data("initial")),null==this.initialData&&("data"in this.initialData||"config"in this.initalData)&&this.error("Initial data did not load correctly.")}return n.prototype.serverUpdate=function(t){var n,i,e;try{n=JSON.parse(t)}catch(e){i=e,this.error(i)}this.bus.emit("update",n)},n.prototype.update=function(t){null==t.data&&(null!=this.data.data?t.data=this.data.data:t.data={}),this.data=t,this.initialized&&this.bus.emit("render",this.data),this.bus.emit("updated")},n.prototype.render=function(t){var n,i,e,s;this.initialized||(t=this.initialData);try{this.initialized||(s=this.fragment.query("#layout"),s.innerHTML=TMPL[t.config.templates.layout](t.data,t.config,helpers)),n=this.fragment.query("#content"),n.innerHTML=TMPL[t.config.templates.content](t.data,t.config,helpers)}catch(e){return i=e,void this.error(i)}return this.bus.emit("rendered",t),this.initialized?void 0:(this.initialized=!0,this.data=this.initialData,this.bus.emit("initialized",t))},n.prototype.act=function(t,n){return null==n&&(n={}),n.src=this.data.config.ref,n.nano=t,location.href=util.href(null,n)},n.prototype.error=function(t){var n;return t instanceof Error&&(t=t.fileName+":"+t.lineNumber+" "+t.message),n={nano_error:t},location.href=util.href(null,n)},n.prototype.log=function(t){var n;return n={nano_log:t},location.href=util.href(null,n)},n.prototype.close=function(){var t;return t={command:"nanoclose "+this.data.config.ref},this.winset("is-visible","false"),location.href=util.href("winset",t)},n.prototype.winset=function(t,n,i){var e,s;return null==i&&(i=this.data.config.window.ref),e={},e[i+"."+t]=n,s=e,location.href=util.href("winset",s)},n}()}.call(this),function(){this.util={extend:function(t,n){return Object.keys(n).forEach(function(i){var e;return e=n[i],e&&"[object Object]"===Object.prototype.toString.call(e)?(t[i]=t[i]||{},util.extend(t[i],e)):t[i]=e}),t},href:function(t,n){return null==t&&(t=""),null==n&&(n={}),t=new Url("byond://"+t),util.extend(t.query,n),t}}}.call(this),function(){var t=function(t,n){return function(){return t.apply(n,arguments)}};this.Window=function(){function n(n,i){this.bus=n,this.fragment=null!=i?i:document,this.attachLinks=t(this.attachLinks,this),this.updateLinks=t(this.updateLinks,this),this.updateStatus=t(this.updateStatus,this),this.resize=t(this.resize,this),this.attachResize=t(this.attachResize,this),this.drag=t(this.drag,this),this.attachDrag=t(this.attachDrag,this),this.attachButtons=t(this.attachButtons,this),this.calcOffset=t(this.calcOffset,this),this.fancyChrome=t(this.fancyChrome,this),this.dragging=!1,this.resizing=!1,this.bus.once("initialized",function(t){return function(n){return setTimeout(t.focusMap,100),n.config.user.fancy?(t.fancyChrome(),t.calcOffset(),t.attachButtons(),t.attachDrag(),t.attachResize()):void 0}}(this)),this.bus.on("rendered",this.updateStatus),this.bus.on("rendered",this.updateLinks),this.bus.on("rendered",this.attachLinks),this.fragment.on("keydown",this.focusMap)}return n.prototype.setPos=function(t,n){return nanoui.winset("pos",t+","+n)},n.prototype.setSize=function(t,n){return nanoui.winset("size",t+","+n)},n.prototype.focusMap=function(){return nanoui.winset("focus",1,"mapwindow.map")},n.prototype.fancyChrome=function(){var t;return nanoui.winset("titlebar",0),nanoui.winset("can-resize",0),t=this.fragment.queryAll(".fancy"),t.forEach(function(t){return t.style.display="inherit"})},n.prototype.calcOffset=function(){return this.xOriginal=window.screenLeft,this.yOriginal=window.screenTop,this.setPos(0,0),this.xOffset=window.screenLeft,this.yOffset=window.screenTop,this.setPos(this.xOriginal-this.xOffset,this.yOriginal-this.yOffset)},n.prototype.attachButtons=function(){var t,n,i,e;return t=function(){return nanoui.close()},i=function(){return nanoui.winset("is-minimized","true")},n=this.fragment.queryAll(".close"),n.forEach(function(n){return n.on("click",t)}),e=this.fragment.queryAll(".minimize"),e.forEach(function(t){return t.on("click",i)})},n.prototype.attachDrag=function(){var t;return t=this.fragment.query("#titlebar"),this.fragment.on("mousemove",this.drag),t.on("mousedown",function(t){return function(){return t.dragging=!0}}(this)),this.fragment.on("mouseup",function(t){return function(){return t.dragging=!1}}(this))},n.prototype.drag=function(t){var n,i;return null==t&&(t=window.event),this.dragging?(null==this.xDrag&&(this.xDrag=t.screenX),null==this.yDrag&&(this.yDrag=t.screenY),n=t.screenX-this.xDrag+(window.screenLeft-this.xOffset),i=t.screenY-this.yDrag+(window.screenTop-this.yOffset),this.setPos(n,i),this.xDrag=t.screenX,this.yDrag=t.screenY):void 0},n.prototype.attachResize=function(){var t;return t=this.fragment.query("#resize"),this.fragment.on("mousemove",this.resize),t.on("mousedown",function(t){return function(){return t.resizing=!0}}(this)),this.fragment.on("mouseup",function(t){return function(){return t.resizing=!1}}(this))},n.prototype.resize=function(t){var n,i;return null==t&&(t=window.event),this.resizing?(null==this.xResize&&(this.xResize=t.screenX),null==this.yResize&&(this.yResize=t.screenY),n=Math.max(150,t.screenX-this.xResize+window.innerWidth),i=Math.max(150,t.screenY-this.yResize+window.innerHeight),this.setSize(n,i),this.xResize=t.screenX,this.yResize=t.screenY):void 0},n.prototype.updateStatus=function(t){var n;return n=this.fragment.queryAll(".statusicon"),n.forEach(function(n){var i;switch(n.className=n.className.replace(/good|bad|average/g,""),t.config.status){case NANO.INTERACTIVE:i="good";break;case NANO.UPDATE:i="average";break;default:i="bad"}return n.classList.add(i)})},n.prototype.updateLinks=function(t){var n;return n=this.fragment.queryAll(".link"),t.config.status!==NANO.INTERACTIVE?n.forEach(function(t){return t.className="link disabled"}):void 0},n.prototype.attachLinks=function(t){var n;return n=function(){var n,i;return n=this.data("action"),i=JSON.parse(this.data("params")),null!=n&&null!=i&&t.config.status===NANO.INTERACTIVE?nanoui.act(n,i):void 0},this.fragment.queryAll(".link.active").forEach(function(t){return t.on("click",n)})},n}()}.call(this); \ No newline at end of file diff --git a/nano/assets/nanoui.nanotrasen.css b/nano/assets/nanoui.nanotrasen.css deleted file mode 100644 index 61b9b378ec8..00000000000 --- a/nano/assets/nanoui.nanotrasen.css +++ /dev/null @@ -1 +0,0 @@ -body{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1' viewBox='0 0 425 200' opacity='.25'%3E%3Cpath d='M178.004.04H106.8a6.76 6.026 0 0 0-6.76 6.024v187.872a6.76 6.026 0 0 0 6.76 6.025h53.107a6.76 6.026 0 0 0 6.762-6.024V92.392l72.215 104.7a6.76 6.026 0 0 0 5.76 2.87H318.2a6.76 6.026 0 0 0 6.76-6.026V6.064A6.76 6.026 0 0 0 318.2.04h-54.717a6.76 6.026 0 0 0-6.76 6.024v102.62L183.762 2.91a6.76 6.026 0 0 0-5.76-2.87zM4.845 22.11A13.412 12.502 0 0 1 13.478.04h66.118a5.365 5 0 0 1 5.365 5v79.88zM420.155 177.89a13.412 12.502 0 0 1-8.633 22.07h-66.118a5.365 5 0 0 1-5.365-5v-79.88z'/%3E%3C/svg%3E") no-repeat fixed center/70% 70%,linear-gradient(180deg,#2a2a2a 0,#202020) no-repeat fixed center/100% 100%;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FF2A2A2A',EndColorStr='#FF000000')} \ No newline at end of file diff --git a/nano/assets/nanoui.templates.js b/nano/assets/nanoui.templates.js deleted file mode 100644 index 6de8f22b748..00000000000 --- a/nano/assets/nanoui.templates.js +++ /dev/null @@ -1 +0,0 @@ -window.TMPL={},TMPL.airlock_electronics=function(e,s,a){var n='
';n+=e.oneAccess?""+a.link("One Required","unlock","one_access"):""+a.link("All Required","lock","one_access"),n+=""+a.link("Clear","refresh","clear")+'
';var l=e.regions;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+='";n+="";var o=e.regions;if(o)for(var t,c=-1,r=o.length-1;r>c;){t=o[c+=1],n+=""}return n+="
'+t.name+"
";var d=t.accesses;if(d)for(var p,u=-1,v=d.length-1;v>u;)p=d[u+=1],n+=""+a.link(p.name,p.req?"check-square-o":"square-o","set",{access:p.id},null,p.req?"selected":null)+"
";n+="
"},TMPL.air_alarm=function(e,s,a){var n='
';if(n+=e.siliconUser?'
Interface Lock:
'+a.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+a.link("Disengaged","unlock","toggleaccess",null,e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",n+='

Air Status

',e.environment_data){var l=e.environment_data;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+='
'+t.name+':
',n+=2==t.danger_level?'':1==t.danger_level?'':'',n+=""+a.fixed(t.value,2)+t.unit+"
";n+='
Local Status:
',n+=2==e.danger_level?'Danger (Internals Required)':1==e.danger_level?'Caution':'Optimal',n+='
Area Status:
',n+=e.atmos_alarm?'Atmosphere Alarm':e.fire_alarm?'Fire Alarm':'Nominal',n+="
"}else n+='
Warning: Cannot obtain air sample for analysis.
';if(e.dangerous&&(n+='
Warning: Safety measures offline. Device may exhibit abnormal behavior.
'),n+="
",!e.locked||e.siliconUser)if(1!=e.screen&&(n+=""+a.link("Back","arrow-left","screen",{screen:1})),1==e.screen)n+='

Air Controls

',n+=e.atmos_alarm?""+a.link("Area Atmospheric Alarm","close","reset",null,null,"caution"):""+a.link("Area Atmospheric Alarm","hand-stop-o","alarm"),n+='
',n+=3!=e.mode?""+a.link("Panic Siphon","exclamation","mode",{mode:3}):""+a.link("Panic Siphon","close","mode",{mode:1},null,"danger"),n+='
'+a.link("Vent Controls","sign-out","screen",{screen:2})+'
'+a.link("Scrubber Controls","filter","screen",{screen:3})+'
'+a.link("Set Environmental Mode","cog","screen",{screen:4})+'
'+a.link("Set Alarm Threshold","bar-chart","screen",{screen:5})+"
";else if(2==e.screen){var o=e.vents;if(o)for(var r,c=-1,d=o.length-1;d>c;)r=o[c+=1],n+='

'+r.long_name+'

Power:
',n+=r.power?""+a.link("On","power-off","adjust",{id_tag:r.id_tag,command:"power",val:0},null,null):""+a.link("Off","close","adjust",{id_tag:r.id_tag,command:"power",val:1},null,"danger"),n+='
Mode:
',n+="release"==r.direction?'Pressurizing':'Siphoning',n+='
Pressure Checks:
'+a.link("Internal","sign-in","adjust",{id_tag:r.id_tag,command:"incheck",val:r.checks},null,r.incheck?"selected":null)+a.link("External","sign-out","adjust",{id_tag:r.id_tag,command:"excheck",val:r.checks},null,r.excheck?"selected":null)+'
Set Pressure:
'+a.link(a.fixed(r.external),"pencil","adjust",{id_tag:r.id_tag,command:"set_external_pressure"})+a.link("Reset","refresh","adjust",{id_tag:r.id_tag,command:"reset_external_pressure"},r.extdefault?"disabled":null)+"
";e.vents.length||(n+='No vents connected.')}else if(3==e.screen){var p=e.scrubbers;if(p)for(var u,c=-1,v=p.length-1;v>c;)u=p[c+=1],n+='

'+u.long_name+'

Power:
',n+=u.power?""+a.link("On","power-off","adjust",{id_tag:u.id_tag,command:"power",val:0},null,null):""+a.link("Off","close","adjust",{id_tag:u.id_tag,command:"power",val:1},null,"danger"),n+='
Mode:
',n+=u.scrubbing?""+a.link("Scrubbing","filter","adjust",{id_tag:u.id_tag,command:"scrubbing",val:0},null,null):""+a.link("Siphoning","sign-in","adjust",{id_tag:u.id_tag,command:"scrubbing",val:1},null,"danger"),n+='
Range:
',n+=u.widenet?""+a.link("Extended","expand","adjust",{id_tag:u.id_tag,command:"widenet",val:0},null,"caution"):""+a.link("Normal","compress","adjust",{id_tag:u.id_tag,command:"widenet",val:1},null,null),n+='
Filters:
'+a.link("CO2",u.filter_co2?"check-square-o":"square-o","adjust",{id_tag:u.id_tag,command:"co2_scrub",val:u.filter_co2?0:1},null,u.filter_co2?"selected":null)+a.link("N2O",u.filter_n2o?"check-square-o":"square-o","adjust",{id_tag:u.id_tag,command:"n2o_scrub",val:u.filter_n2o?0:1},null,u.filter_n2o?"selected":null)+a.link("Plasma",u.filter_toxins?"check-square-o":"square-o","adjust",{id_tag:u.id_tag,command:"tox_scrub",val:u.filter_toxins?0:1},null,u.filter_toxins?"selected":null)+"
";e.scrubbers.length||(n+='No scrubbers connected.')}else if(4==e.screen){n+='

Environmental Modes

';var h=e.modes;if(h)for(var b,c=-1,k=h.length-1;k>c;)b=h[c+=1],n+='
'+a.link(b.name,b.selected?"check-square-o":"square-o","mode",{mode:b.mode},null,b.selected?b.danger?"danger":"selected":null)+"
";n+=""}else if(5==e.screen){n+='

Alarm Thresholds

';var g=e.thresholds;if(g)for(var f,c=-1,m=g.length-1;m>c;){f=g[c+=1],n+="";var w=f.settings;if(w)for(var _,P=-1,y=w.length-1;y>P;)_=w[P+=1],n+="";n+=""}n+="
min2min1max1max2
"+f.name+""+a.link(_.selected>=0?a.round(100*_.selected)/100:"Off",null,"adjust",{command:"set_threshold",env:_.env,"var":_.val})+"
"}return n},TMPL.apc=function(e,s,a){var n='
';n+=e.siliconUser?'
Interface Lock:
'+a.link("Engaged","lock","toggleaccess",null,e.locked?"selected":null)+a.link("Disengaged","unlock","toggleaccess",null,e.malfStatus>=2?"linkOff":e.locked?null:"selected")+"
":e.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",n+='

Power Status

Main Breaker:
',n+=e.locked&&!e.siliconUser?e.isOperating?'On':'Off':""+a.link("On","power-off","breaker",null,e.isOperating?"selected":null)+a.link("Off","close","breaker",null,e.isOperating?null:"selected"),n+='
External Power:
',n+=2==e.externalPower?'Good':1==e.externalPower?'Low':'None',n+='
Power Cell:
',n+=null!=e.powerCellStatus?""+a.bar(e.powerCellStatus,0,100,e.powerCellStatus>=50?"good":e.powerCellStatus>=25?"average":"bad",a.fixed(e.powerCellStatus)+"%"):'Power cell removed.',n+="
",null!=e.powerCellStatus&&(n+='
Charge Mode:
',n+=e.locked&&!e.siliconUser?e.chargeMode?'Auto':'Off':""+a.link("Auto","refresh","chargemode",null,e.chargeMode?"selected":null)+a.link("Off","close","chargemode",null,e.chargeMode?null:"selected"),n+=" ",n+=e.chargingStatus>1?'[Fully Charged]':1==e.chargingStatus?'[Charging]':'[Not Charging]',n+="
"),n+='

Power Channels

';var l=e.powerChannels;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+="";return n+='
"+t.title+":"+t.powerLoad+" W",t.status<=1?n+='Off':t.status>=2&&(n+='On'),n+="",n+=1==t.status||3==t.status?"[Auto]":"[Manual]",n+='',(!e.locked||e.siliconUser)&&(n+=""+a.link("Auto","refresh","channel",t.topicParams.auto,1==t.status||3==t.status?"selected":null)+a.link("On","power-off","channel",t.topicParams.on,2==t.status?"selected":null)+a.link("Off","close","channel",t.topicParams.off,0==t.status?"selected":null)),n+="
Total Load:'+e.totalLoad+" W
",e.siliconUser&&(n+='

System Overrides

'+a.link("Overload Lighting Circuit","lightbulb-o","overload")+"
",1==e.malfStatus?n+=""+a.link("Override Programming","terminal","hack"):2==e.malfStatus?n+=""+a.link("Shunt Core Processes","caret-square-o-down","occupy"):3==e.malfStatus?n+=""+a.link("Return to Main Core","carat-square-o-left","deoccupy"):4==e.malfStatus&&(n+=""+a.link("Shunt Core Processes","caret-square-o-down")),n+="
"),n+='
Cover Lock:
',n+=e.locked&&!e.siliconUser?e.coverLocked?"Engaged":"Disengaged":""+a.link("Engaged","lock","lock",null,e.coverLocked?"selected":null)+a.link("Disengaged","unlock","lock",null,e.coverLocked?null:"selected"),n+="
"},TMPL.atmos_filter=function(e,s,a){var n='
Power:
'+a.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+a.link("Set","pencil","pressure",{set:"custom"})+a.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Filter:
'+a.link("Nothing",null,"filter",{mode:-1},-1==e.filter_type?"selected":null)+a.link("Plasma",null,"filter",{mode:0},0==e.filter_type?"selected":null)+a.link("O2",null,"filter",{mode:1},1==e.filter_type?"selected":null)+a.link("N2",null,"filter",{mode:2},2==e.filter_type?"selected":null)+a.link("CO2",null,"filter",{mode:3},3==e.filter_type?"selected":null)+a.link("N2O",null,"filter",{mode:4},4==e.filter_type?"selected":null)+"
";return n},TMPL.atmos_mixer=function(e,s,a){var n='
Power:
'+a.link(e.on?"On":"Off",e.on?"power-off":"close","power")+'
Output Pressure:
'+a.link("Set","pencil","pressure",{set:"custom"})+a.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+' kPa
Node 1:
'+a.link("","fast-backward","node1",{concentration:"-0.1"},null)+a.link("","backward","node1",{concentration:"-0.01"},null)+a.link("","forward","node1",{concentration:"0.01"},null)+a.link("","fast-forward","node1",{concentration:"0.1"},null)+''+e.node1_concentration+'%
Node 2:
'+a.link("","fast-backward","node2",{concentration:"-0.1"},null)+a.link("","backward","node2",{concentration:"-0.01"},null)+a.link("","forward","node2",{concentration:"0.01"},null)+a.link("","fast-forward","node2",{concentration:"0.1"},null)+''+e.node2_concentration+"%
";return n},TMPL.atmos_pump=function(e,s,a){var n='
Power:
'+a.link(e.on?"On":"Off",e.on?"power-off":"close","power")+"
";return n+=e.max_rate?'
Transfer Rate:
'+a.link("Set","pencil","transfer",{set:"custom"})+a.link("Max","plus","transfer",{set:"max"},e.transfer_rate==e.max_rate?"disabled":null)+''+e.transfer_rate+" L/s
":'
Output Pressure:
'+a.link("Set","pencil","pressure",{set:"custom"})+a.link("Max","plus","pressure",{set:"max"},e.set_pressure==e.max_pressure?"disabled":null)+''+e.set_pressure+" kPa
",n+="
"},TMPL.canister=function(e,s,a){var n='
';return n+=e.hasHoldingTank?"The regulator is connected to a tank.":"The regulator is not connected to a tank.",n+='

Canister

'+a.link("Relabel","pencil","relabel",null,e.canLabel?null:"disabled")+'
Pressure:
'+e.tankPressure+' kPa
Port:
',n+=e.portConnected?'Connected':'Disconnected',n+='

Valve

Release Pressure:
'+a.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+a.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+a.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+a.link("Set","pencil","pressure",{set:"custom"},null)+a.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+a.link("Open","unlock","valve",null,e.valveOpen?"selected":null)+a.link("Close","lock","valve",null,e.valveOpen?null:"selected")+'

Holding Tank

',n+=e.hasHoldingTank?"
"+a.link("Eject","eject","eject")+'
Label:
'+e.holdingTank.name+'
Tank Pressure:
'+e.holdingTank.tankPressure+" kPa
":'
No Holding Tank
',n+="
"},TMPL.chem_dispenser=function(e,s,a){var n='

Status

Energy:
'+a.bar(e.energy,0,e.maxEnergy,null,e.energy+" Units")+'
Amount:
',l=e.beakerTransferAmounts;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+=""+a.link(t,"plus","amount",{set:t},e.amount==t?"selected":null);n+='

Dispense

';var o=e.chemicals;if(o)for(var r,c=-1,d=o.length-1;d>c;)r=o[c+=1],n+=""+a.link(r.title,"tint","dispense",r.commands,null,"gridable");n+='

Beaker

'+a.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
';var p=e.beakerTransferAmounts;if(p)for(var t,c=-1,u=p.length-1;u>c;)t=p[c+=1],n+=""+a.link(t,"minus","remove",{amount:t});if(n+='
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){n+=""+e.beakerCurrentVolume+"/"+e.beakerMaxVolume+" Units
";var v=e.beakerContents;if(v)for(var h,c=-1,b=v.length-1;b>c;)h=v[c+=1],n+=''+h.volume+" units of "+h.name+"
"}else n+='Beaker Empty';else n+='No Beaker Loaded';return n+="
"},TMPL.chem_heater=function(e,s,a){var n='

Status

Power:
'+a.link(e.isActive?"On":"Off",e.isActive?"power-off":"close","power",null,e.isBeakerLoaded?null:"disabled")+'
Target:
'+a.link(e.targetTemp+"K","pencil","temperature")+'

Beaker

'+a.link("Eject","eject","eject",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
';if(e.isBeakerLoaded)if(n+="Temperature: "+e.currentTemp+"K
",e.beakerContents.length){var l=e.beakerContents;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+=''+t.volume+" units of "+t.name+"
"}else n+='Beaker Empty';else n+='No Beaker Loaded';return n+="
"},TMPL.cryo=function(e,s,a){var n='

Occupant

Occupant:
';if(n+=e.hasOccupant?""+e.occupant.name+"":'No Occupant',n+="
",e.hasOccupant&&(n+='
State:
',n+=0==e.occupant.stat?'Conscious':1==e.occupant.stat?'Unconscious':'Dead',n+='
Temperature:
'+a.round(e.occupant.bodyTemperature)+" K
"),e.hasOccupant&&e.occupant.stat<2&&(n+='
Health:
'+a.bar(e.occupant.health,e.occupant.minHealth,e.occupant.Maxhealth,e.occupant.health>=0?"good":"average",a.round(e.occupant.health))+'
Brute:
'+a.bar(e.occupant.bruteLoss,0,e.occupant.maxHealth,"bad",a.round(e.occupant.bruteLoss))+'
Respiratory:
'+a.bar(e.occupant.oxyLoss,0,e.occupant.maxHealth,"bad",a.round(e.occupant.oxyLoss))+'
Toxin:
'+a.bar(e.occupant.toxLoss,0,e.occupant.maxHealth,"bad",a.round(e.occupant.toxLoss))+'
Burn:
'+a.bar(e.occupant.fireLoss,0,e.occupant.maxHealth,"bad",a.round(e.occupant.fireLoss))+"
"),n+='

Cell

Power:
',n+=e.isOperating?""+a.link("On","power-off","off"):""+a.link("Off","close","on"),n+='
Temperature:
'+e.cellTemperature+' K
Door:
',n+=e.isOpen?""+a.link("Open","unlock","close"):""+a.link("Closed","lock","open"),n+=e.autoEject?""+a.link("Auto","sign-out","autoeject"):""+a.link("Manual","sign-in","autoeject"),n+='

Beaker

'+a.link("Eject","eject","ejectbeaker",null,e.isBeakerLoaded?null:"disabled")+'
Contents:
',e.isBeakerLoaded)if(e.beakerContents.length){var l=e.beakerContents;if(l)for(var t,c=-1,i=l.length-1;i>c;)t=l[c+=1],n+=''+t.volume+" units of "+t.name+"
"}else n+='Beaker Empty';else n+='No Beaker Loaded';return n+="
"},TMPL.smes=function(e,s,a){var n='

Storage

Stored Energy:
'+a.bar(e.capacityPercent,0,100,e.capacityPercent>=50?"good":e.capacityPercent>=15?"average":"bad",a.round(e.capacityPercent)+"%")+'

Input

Charge Mode:
'+a.link("Auto","refresh","tryinput",null,e.inputAttempt?"selected":null)+a.link("Off","close","tryinput",null,e.inputAttempt?null:"selected")+" ";return n+=e.capacityPercent>=99?"[Fully Charged]":e.inputting?"[Charging]":"[Not Charging]",n+='
Input Setting:
'+a.bar(e.inputLevel,0,e.inputLevelMax,null,e.inputLevel+" W")+'
Adjust Input:
'+a.link("","fast-backward","input",{set:"min"},e.inputLevel?null:"selected")+a.link("","backward","input",{set:"minus"},e.inputLevel?null:"disabled")+a.link("Set","pencil","input",{set:"custom"},null)+a.link("","forward","input",{set:"plus"},e.inputLevel==e.inputLevelMax?"disabled":null)+a.link("","fast-forward","input",{set:"max"},e.inputLevel==e.inputLevelMax?"selected":null)+'
Available:
'+e.inputAvailable+' W

Output

Charge Mode:
'+a.link("On","power-off","tryoutput",null,e.outputAttempt?"selected":null)+a.link("Off","close","tryoutput",null,e.outputAttempt?null:"selected")+" ",n+=e.outputting?'[Sending]':e.charge>0?'[Not Sending]':'[No Charge]',n+='
Output Setting:
'+a.bar(e.outputLevel,0,e.outputLevelMax,null,e.outputLevel+" W")+'
Adjust Output:
'+a.link("","fast-backward","output",{set:"min"},e.outputLevel?null:"selected")+a.link("","backward","output",{set:"minus"},e.outputLevel?null:"disabled")+a.link("Set","pencil","output",{set:"custom"},null)+a.link("","forward","output",{set:"plus"},e.outputLevel==e.outputLevelMax?"disabled":null)+a.link("","fast-forward","output",{set:"max"},e.outputLevel==e.outputLevelMax?"selected":null)+'
Outputting:
'+e.outputUsed+" W
"},TMPL.solar_control=function(e,s,a){var n='

Status

Generated Power:
'+e.generated+' W
Orientation:
'+e.angle+"° ("+e.direction+')
Adjust:
'+a.link("15°","step-backward","control",{cdir:"-15"})+a.link("1°","backward","control",{cdir:"-1"})+a.link("1°","forward","control",{cdir:"1"})+a.link("15°","step-forward","control",{cdir:"15"})+'

Tracking

Tracker Mode:
'+a.link("Off","close","tracking",{mode:"0"},0==e.tracking_state?"selected":"")+a.link("Timed","clock-o","tracking",{mode:"1"},1==e.tracking_state?"selected":"");return n+=e.connected_tracker?""+a.link("Auto","refresh","tracking",{mode:"2"},2==e.tracking_state?"selected":""):""+a.link("Auto","refresh",null,null,"disabled"),n+='
Tracking Rate:
'+e.tracking_rate+" deg/h ("+e.rotating_way+')
Adjust:
'+a.link("180°","fast-backward","control",{tdir:"-180"})+a.link("30°","step-backward","control",{tdir:"-30"})+a.link("1°","backward","control",{tdir:"-1"})+a.link("1°","forward","control",{tdir:"1"})+a.link("30°","step-forward","control",{tdir:"30"})+a.link("180°","fast-forward","control",{tdir:"180"})+'

Devices

Search:
'+a.link("Refresh","refresh","refresh")+'
Solar Tracker:
',n+=e.connected_tracker?'Found':'Not Found',n+='
Solars Panels:
'+e.connected_panels+" Connected
"},TMPL.space_heater=function(e,s,a){var n='

Status

Power:
'+a.link("On","power-off","power",null,e.on?"selected":null)+a.link("Off","close","power",null,e.on?null:"selected")+'
Stored Energy:
';return n+=e.hasPowercell?""+a.bar(e.powerLevel,0,100,"good",e.powerLevel+"%"):'No power cell loaded.',n+="
",e.open&&(n+='
Cell:
',n+=e.hasPowercell?""+a.link("Eject","eject","ejectcell"):""+a.link("Install","eject","installcell"),n+="
"),n+='

Thermostat

Current Temp:
'+e.currentTemp+'°C
Target Temp:
'+e.targetTemp+"°C
",e.open&&(n+='
Adjustment:
'+a.link("","fast-backward","temp",{set:-20},e.targetTemp>e.minTemp?null:"disabled")+a.link("","backward","temp",{set:-5},e.targetTemp>e.minTemp?null:"disabled")+a.link("Set","pencil","temp",{set:"custom"},null)+a.link("","forward","temp",{set:5},e.targetTemp
"),n+='
Operational Mode:
',n+=e.open?""+a.link("Heat","long-arrow-up","mode",{mode:"heat"},"heat"!=e.mode?null:"selected")+a.link("Cool","long-arrow-down","mode",{mode:"cool"},"cool"!=e.mode?null:"selected")+a.link("Auto","arrows-v","mode",{mode:"auto"},"heat"==e.mode||"cool"==e.mode?null:"selected"):"heat"==e.mode?'Heat':"cool"==e.mode?'Cool':'Auto',n+="
"},TMPL.tanks=function(e,s,a){var n='
';return n+=e.hasHoldingTank?"The regulator is connected to a mask.":"The regulator is not connected to a mask.",n+='
Tank Pressure:
'+a.bar(e.tankPressure,0,1013,e.tankPressure>200?"good":e.tankPressure>100?"average":"bad",e.tankPressure+" kPa")+'
Release Pressure:
'+a.bar(e.releasePressure,e.minReleasePressure,e.maxReleasePressure,null,e.releasePressure+" kPa")+'
Pressure Regulator:
'+a.link("Reset","refresh","pressure",{set:"reset"},e.releasePressure!=e.defaultReleasePressure?null:"disabled")+a.link("Min","minus","pressure",{set:"min"},e.releasePressure>e.minReleasePressure?null:"disabled")+a.link("Set","pencil","pressure",{set:"custom"},null)+a.link("Max","plus","pressure",{set:"max"},e.releasePressure
Valve:
'+a.link("Open","unlock","valve",null,e.maskConnected?e.valveOpen?"selected":null:"disabled")+a.link("Close","lock","valuve",null,e.valveOpen?null:"selected")+"
"},TMPL._generic=function(e,s,a){var n="
"+s.title+"
Initiating...
";return n},TMPL._nanotrasen=function(e,s,a){var n="
"+s.title+"
Initiating...
";return n}; \ No newline at end of file diff --git a/nano/bower.json b/nano/bower.json index 70435e22731..89515a5d0d7 100644 --- a/nano/bower.json +++ b/nano/bower.json @@ -5,7 +5,6 @@ "DOM4": "dom4#~1.5.2", "eddy-js": "~0.7.0", "es5-shim": "~4.3.1", - "font-awesome": "~4.5.0", "IE8": "ie8#~2.9.10", "html5shiv": "~3.7.3", "json3": "~3.3.2", @@ -28,12 +27,6 @@ "DOM4": "*" } }, - "font-awesome": { - "main": [ - "css/font-awesome.css", - "fonts/*" - ] - }, "jsurl": { "dependencies": { "es5-shim": "*" diff --git a/nano/package.json b/nano/package.json index c3b0b311b7c..dc0212bc371 100644 --- a/nano/package.json +++ b/nano/package.json @@ -3,6 +3,7 @@ "private": true, "dependencies": { "autoprefixer": "^6.1.2", + "coffee-script": "^1.10.0", "del": "^2.2.0", "gulp": "^3.9.0", "gulp-coffee": "^2.3.1", @@ -19,11 +20,12 @@ "gulp-postcss": "^6.0.1", "gulp-rename": "^1.2.2", "gulp-replace": "^0.5.4", + "gulp-sourcemaps": "^1.6.0", "gulp-uglify": "^1.5.1", "gulp-util": "^3.0.7", "hexa-color-regex": "^1.0.0", "main-bower-files": "^2.9.0", - "merge-stream": "^1.0.0", + "merge2": "^0.3.6", "pleeease-filters": "^2.0.0", "postcss-color-rgba-fallback": "git+https://github.com/postcss/postcss-color-rgba-fallback", "postcss-colorblind": "^0.4.0", diff --git a/nano/scripts/nanoui.coffee b/nano/scripts/nanoui.coffee index 104a7c8d003..b5aaed2b1e2 100644 --- a/nano/scripts/nanoui.coffee +++ b/nano/scripts/nanoui.coffee @@ -1,88 +1,86 @@ -class @NanoUI - constructor: (@bus, @fragment = document) -> - @bus.on "serverUpdate", @serverUpdate - @bus.on "update", @update - @bus.on "render", @render - @bus.on "memes", @render - - @initialized = false - - @data = {} - @initialData = JSON.parse @fragment.query("#data").data "initial" - - unless @initialData? or - not ("data" of @initialData or "config" of @initalData) - @error "Initial data did not load correctly." - - serverUpdate: (dataString) => - try - data = JSON.parse(dataString) - catch error - @error error - - @bus.emit "update", data - return - - update: (data) => - unless data.data? - if @data.data? - data.data = @data.data - else - data.data = {} - - @data = data - - @bus.emit "render", @data if @initialized - @bus.emit "updated" - return - - render: (data) => - data = @initialData unless @initialized - - try - if not @initialized - layout = @fragment.query("#layout") - layout.innerHTML = TMPL[data.config.templates.layout]\ - (data.data, data.config, helpers) - - content = @fragment.query("#content") - content.innerHTML = TMPL[data.config.templates.content]\ - (data.data, data.config, helpers) - - catch error - @error error - return - - @bus.emit "rendered", data - if not @initialized - @initialized = true - @data = @initialData - @bus.emit "initialized", data - - act: (action, params = {}) => - params.src = @data.config.ref - params.nano = action - location.href = util.href null, params - - error: (error) -> - error = "#{error.fileName}:#{error.lineNumber} #{error.message}" if error instanceof Error - params = - nano_error: error - location.href = util.href null, params - - log: (message) -> - params = - nano_log: message - location.href = util.href null, params - - close: => - params = - command: "nanoclose #{@data.config.ref}" - @winset "is-visible", "false" - location.href = util.href "winset", params - - winset: (key, value, window) => - window = @data.config.window.ref unless window? - params = - "#{window}.#{key}": value - location.href = util.href "winset", params +class @NanoUI + constructor: (@bus, @fragment = document) -> + @bus.on "serverUpdate", @serverUpdate + @bus.on "update", @update + @bus.on "render", @render + @bus.on "memes", @render + + @initialized = false + + @data = {} + @initialData = JSON.parse @fragment.query("#data").data "initial" + + unless @initialData? or + not ("data" of @initialData or "config" of @initalData) + @error "Initial data did not load correctly." + + serverUpdate: (dataString) => + try + data = JSON.parse(dataString) + catch error + @error error + + @bus.emit "update", data + return + + update: (data) => + unless data.data? + if @data.data? + data.data = @data.data + else + data.data = {} + + @data = data + + @bus.emit "render", @data if @initialized + @bus.emit "updated" + return + + render: (data) => + data = @initialData unless @initialized + + try + if not @initialized + layout = @fragment.query("#layout") + layout.innerHTML = TMPL[data.config.templates.layout](data.data, data.config, helpers) + + content = @fragment.query("#content") + content.innerHTML = TMPL[data.config.templates.content](data.data, data.config, helpers) + + catch error + @error error + return + + @bus.emit "rendered", data + if not @initialized + @initialized = true + @data = @initialData + @bus.emit "initialized", data + + act: (action, params = {}) => + params.src = @data.config.ref + params.nano = action + location.href = util.href null, params + + error: (error) -> + error = "#{error.fileName}:#{error.lineNumber} #{error.message}" if error instanceof Error + params = + nano_error: error + location.href = util.href null, params + + log: (message) -> + params = + nano_log: message + location.href = util.href null, params + + close: => + params = + command: "nanoclose #{@data.config.ref}" + @winset "is-visible", "false" + location.href = util.href "winset", params + + winset: (key, value, window) => + window = @data.config.window.ref unless window? + params = + "#{window}.#{key}": value + location.href = util.href "winset", params diff --git a/nano/scripts/window.coffee b/nano/scripts/window.coffee index 029ef16fe2f..716b27d0153 100644 --- a/nano/scripts/window.coffee +++ b/nano/scripts/window.coffee @@ -30,8 +30,8 @@ class @Window nanoui.winset "titlebar", 0 nanoui.winset "can-resize", 0 fancy = @fragment.queryAll ".fancy" - fancy.forEach (element) -> - element.style.display = 'inherit' + fancy.forEach (chrome) -> + chrome.classList.remove "fancy" calcOffset: => @xOriginal = window.screenLeft @@ -83,8 +83,8 @@ class @Window @xResize = event.screenX unless @xResize? @yResize = event.screenY unless @yResize? - x = Math.max(150, (event.screenX - @xResize) + window.innerWidth) - y = Math.max(150, (event.screenY - @yResize) + window.innerHeight) + x = Math.max(250, (event.screenX - @xResize) + window.innerWidth) + y = Math.max(250, (event.screenY - @yResize) + window.innerHeight) @setSize x, y @xResize = event.screenX diff --git a/nano/styles/common.less b/nano/styles/_chrome.less similarity index 92% rename from nano/styles/common.less rename to nano/styles/_chrome.less index 076271f06a3..6eaf1cd9850 100644 --- a/nano/styles/common.less +++ b/nano/styles/_chrome.less @@ -1,86 +1,81 @@ -@import "_config"; -@import "_document"; -@import "_util"; -@import "_interface"; -@import "_link"; -@import "_bar"; - - -.fancy { - display: none; -} - - -div.loading { - .noticeStripes; - - padding: 8px; -} - -div.content { - margin: 32px 4px 0 4px; - &.titlebared { - padding-top: 3px; - } -} - -header.titlebar { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 32px; - - background-color: @titlebar; - box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1); - - .statusicon { - position: absolute; - top: 4px; - left: 12px; - } - - .title { - position: absolute; - top: 6px; - left: 46px; - - color: @title; - font-size: 16px; - white-space: nowrap; - } - - .titlebutton() { - color: @title; - - &:hover { - color: lighten(@title, @hover); - } - } - .minimize { - .titlebutton; - position: absolute; - top: 6px; - right: 46px; - } - .close { - .titlebutton; - position: absolute; - top: 4px; - right: 12px; - } -} - -div.resize { - position: fixed; - bottom: 0; - right: 0; - width: 0; - height: 0; - - border-style: solid; - border-width: 0 0 30px 30px; - border-color: transparent transparent @resize transparent; - - transform: rotate(360deg); -} +@import "_config"; +@import "_util"; + + +div.loading { + .noticeStripes; + + padding: 8px; +} + +div.content { + margin: 32px 4px 0 4px; + &.titlebared { + padding-top: 3px; + } +} + +header.titlebar { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 32px; + + background-color: @titlebar; + box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1); + + .statusicon { + position: absolute; + top: 4px; + left: 12px; + } + + .title { + position: absolute; + top: 6px; + left: 46px; + + color: @title; + font-size: 16px; + white-space: nowrap; + } + + .titlebutton() { + color: @title; + + &:hover { + color: lighten(@title, @hover); + } + } + .minimize { + .titlebutton; + position: absolute; + top: 6px; + right: 46px; + } + .close { + .titlebutton; + position: absolute; + top: 4px; + right: 12px; + } +} + +div.resize { + position: fixed; + bottom: 0; + right: 0; + width: 0; + height: 0; + + border-style: solid; + border-width: 0 0 30px 30px; + border-color: transparent transparent @resize transparent; + + transform: rotate(360deg); +} + +.fancy { + .hidden; +} diff --git a/nano/styles/_document.less b/nano/styles/_document.less index c291b73fef7..f66ca1f4366 100644 --- a/nano/styles/_document.less +++ b/nano/styles/_document.less @@ -1,36 +1,39 @@ -@import "_config"; -@import "_util"; - - -html { - min-height: 100%; - - cursor: default; // Reset the cursor. -} - -body { - min-height: 100%; - - font-family: @font; - font-size: @fontsize; - color: @text; -} - -h1 { - font-size: @fontsize + 6px; - margin: 0; - padding: 6px 0; -} -h2 { - &:extend(h1); - font-size: @fontsize + 4px; -} -h3 { - &:extend(h1); - font-size: @fontsize + 2px; -} - -hr { - background-color: @rule; - border: none; -} +@import "_config"; +@import "_util"; + + +html { + min-height: 100%; + + cursor: default; // Reset the cursor. +} + +body { + min-height: 100%; + height: 100%; + + background-color: @background-end; // Fallback for old browsers. + + font-family: @font; + font-size: @fontsize; + color: @text; +} + +h1 { + font-size: @fontsize + 6px; + margin: 0; + padding: 6px 0; +} +h2 { + &:extend(h1); + font-size: @fontsize + 4px; +} +h3 { + &:extend(h1); + font-size: @fontsize + 2px; +} + +hr { + background-color: @rule; + border: none; +} diff --git a/nano/styles/generic.less b/nano/styles/_generic.less similarity index 84% rename from nano/styles/generic.less rename to nano/styles/_generic.less index 1f8edf7ce30..ffdc3cd4ff9 100644 --- a/nano/styles/generic.less +++ b/nano/styles/_generic.less @@ -1,8 +1,8 @@ -@import "_config"; - - -body { - background: linear-gradient(to bottom, - @background-start 0%, - @background-end 100%); -} +@import "_config"; + + +body.generic { + background: linear-gradient(to bottom, + @background-start 0%, + @background-end 100%); +} diff --git a/nano/styles/nanotrasen.less b/nano/styles/_nanotrasen.less similarity index 89% rename from nano/styles/nanotrasen.less rename to nano/styles/_nanotrasen.less index 6bf13910d9a..ad091952492 100644 --- a/nano/styles/nanotrasen.less +++ b/nano/styles/_nanotrasen.less @@ -1,9 +1,9 @@ -@import "_config"; - - -body { - background: data-uri('nanotrasen.svg') no-repeat fixed center/70% 70%, - linear-gradient(to bottom, - @background-start 0%, - @background-end 100%) no-repeat fixed center/100% 100%; -} +@import "_config"; + + +body.nanotrasen { + background: data-uri('nanotrasen.svg') no-repeat fixed center/70% 70%, + linear-gradient(to bottom, + @background-start 0%, + @background-end 100%) no-repeat fixed center/100% 100%; +} diff --git a/nano/styles/_interface.less b/nano/styles/_section.less similarity index 100% rename from nano/styles/_interface.less rename to nano/styles/_section.less diff --git a/nano/styles/_util.less b/nano/styles/_util.less index b51538414cb..b10d5a7469e 100644 --- a/nano/styles/_util.less +++ b/nano/styles/_util.less @@ -1,57 +1,57 @@ -@import "_config"; - - -// Colors -.color(@color) { // Explort a given color as a class. - &.@{color} { - color: @@color; - } -} - -.color(normal); -.color(good); -.color(average); -.color(bad); -.color(label); -.color(highlight); -.color(dark); - -// Text Styles -.bold { font-weight: bold; } -.italic { font-style: italic; } -.fontReset { - color: @text; - font-size: @fontsize; - font-weight: normal; - font-style: normal; - text-decoration: none; -} - -// Fancy "Notice Me" Stripes -.noticeStripes { - background-color: @notice1; // Fallback for old browers. - background-image: repeating-linear-gradient( - -45deg, - @notice1, - @notice1 10px, - @notice2 10px, - @notice2 20px - ); -} - -// General Helpers -.hidden { display: none; } - -.clearBoth { clear: both; } -.clearLeft { clear: left; } -.clearRight { clear: right; } - -.floatNone { float: none; } -.floatLeft { float: left; } -.floatRight { float: right; } - -.alignTop { vertical-align: top; } -.alignBottom { vertical-align: bottom; } -.alignLeft { text-align: left; } -.alignCenter { text-align: center; } -.alignRight { text-align: right; } +@import "_config"; + + +// Colors +.color(@color) { // Explort a given color as a class. + &.@{color} { + color: @@color; + } +} + +.color(normal); +.color(good); +.color(average); +.color(bad); +.color(label); +.color(highlight); +.color(dark); + +// Text Styles +.bold { font-weight: bold; } +.italic { font-style: italic; } +.fontReset { + color: @text; + font-size: @fontsize; + font-weight: normal; + font-style: normal; + text-decoration: none; +} + +// Fancy "Notice Me" Stripes +.noticeStripes { + background-color: @notice1; // Fallback for old browers. + background-image: repeating-linear-gradient( + -45deg, + @notice1, + @notice1 10px, + @notice2 10px, + @notice2 20px + ); +} + +// General Helpers +.hidden { display: none !important; } + +.clearBoth { clear: both; } +.clearLeft { clear: left; } +.clearRight { clear: right; } + +.floatNone { float: none; } +.floatLeft { float: left; } +.floatRight { float: right; } + +.alignTop { vertical-align: top; } +.alignBottom { vertical-align: bottom; } +.alignLeft { text-align: left; } +.alignCenter { text-align: center; } +.alignRight { text-align: right; } diff --git a/nano/styles/nanoui.less b/nano/styles/nanoui.less new file mode 100644 index 00000000000..3b023c7a058 --- /dev/null +++ b/nano/styles/nanoui.less @@ -0,0 +1,12 @@ +@import "_config"; + +@import "_document"; +@import "_util"; + +@import "_chrome"; +@import "_section"; +@import "_link"; +@import "_bar"; + +@import "_generic"; +@import "_nanotrasen"; diff --git a/nano/templates/_nanotrasen.dot b/nano/templates/_nanotrasen.dot index 25d34906376..dc264f0d581 100644 --- a/nano/templates/_nanotrasen.dot +++ b/nano/templates/_nanotrasen.dot @@ -1,14 +1,14 @@ -
-
- - {{=config.title}} - - -
- -
-
Initiating...
-
- -
-
+
+
+ + {{=config.title}} + + +
+ +
+
Initiating...
+
+ +
+
diff --git a/nano/templates/air_alarm.dot b/nano/templates/air_alarm.dot index a80208384c3..8b67c9716c1 100644 --- a/nano/templates/air_alarm.dot +++ b/nano/templates/air_alarm.dot @@ -1,233 +1,233 @@ -
- {{? data.siliconUser}} -
- Interface Lock: -
- {{=helper.link('Engaged', 'lock', 'toggleaccess', null, data.locked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', 'toggleaccess', null, data.locked ? null : 'selected')}} -
-
- {{??}} - {{? data.locked}} - Swipe an ID card to unlock this interface. - {{??}} - Swipe an ID card to lock this interface. - {{?}} - {{?}} -
-
-

Air Status

- {{? data.environment_data}} - {{~ data.environment_data:info:i}} -
- {{=info.name}}: -
- {{? info.danger_level == 2}} - - {{?? info.danger_level == 1}} - - {{??}} - - {{?}} - {{=helper.fixed(info.value, 2)}}{{=info.unit}} -
-
- {{~}} -
- Local Status: -
- {{? data.danger_level == 2}} - Danger (Internals Required) - {{?? data.danger_level == 1}} - Caution - {{??}} - Optimal - {{?}} -
-
-
- Area Status: -
- {{? data.atmos_alarm}} - Atmosphere Alarm - {{?? data.fire_alarm}} - Fire Alarm - {{??}} - Nominal - {{?}} -
-
- {{??}} -
- Warning: Cannot obtain air sample for analysis. -
- {{?}} - {{? data.dangerous}} -
-
- Warning: Safety measures offline. Device may exhibit abnormal behavior. -
- {{?}} -
-{{? (!data.locked || data.siliconUser)}} - {{? data.screen != 1}} - {{=helper.link('Back', 'arrow-left', 'screen', {'screen': 1})}} - {{?}} - {{? data.screen == 1}} -
-

Air Controls

-
- {{? !data.atmos_alarm}} - {{=helper.link('Area Atmospheric Alarm', 'hand-stop-o', 'alarm')}} - {{??}} - {{=helper.link('Area Atmospheric Alarm', 'close', 'reset', null, null, 'caution')}} - {{?}} -
-
- {{? data.mode != 3}} - {{=helper.link('Panic Siphon', 'exclamation', 'mode', {'mode': 3})}} - {{??}} - {{=helper.link('Panic Siphon', 'close', 'mode', {'mode': 1}, null, 'danger')}} - {{?}} -
-
- {{=helper.link('Vent Controls', 'sign-out', 'screen', {'screen': 2})}} -
-
- {{=helper.link('Scrubber Controls', 'filter', 'screen', {'screen': 3})}} -
-
- {{=helper.link('Set Environmental Mode', 'cog', 'screen', {'screen': 4})}} -
-
- {{=helper.link('Set Alarm Threshold', 'bar-chart', 'screen', {'screen': 5})}} -
-
- {{?? data.screen == 2}} - {{~ data.vents:vent:i}} -
-

{{=vent.long_name}}

-
- Power: -
- {{? vent.power}} - {{=helper.link('On', 'power-off', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Off', 'close', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Mode: -
- {{? vent.direction == "release"}} - Pressurizing - {{??}} - Siphoning - {{?}} -
-
-
- Pressure Checks: -
- {{=helper.link('Internal', 'sign-in', 'adjust', {'id_tag': vent.id_tag, 'command': 'incheck', 'val': vent.checks}, null, vent.incheck ? 'selected' : null)}} - {{=helper.link('External', 'sign-out', 'adjust', {'id_tag': vent.id_tag, 'command': 'excheck', 'val': vent.checks}, null, vent.excheck ? 'selected' : null)}} -
-
-
- Set Pressure: -
- {{=helper.link(helper.fixed(vent.external), 'pencil', 'adjust', {'id_tag': vent.id_tag, 'command': 'set_external_pressure'})}} - {{=helper.link('Reset', 'refresh', 'adjust', {'id_tag': vent.id_tag, 'command': 'reset_external_pressure'}, vent.extdefault ? 'disabled' : null)}} -
-
-
- {{~}} - {{? !data.vents.length}} - No vents connected. - {{?}} - {{?? data.screen == 3}} - {{~ data.scrubbers:scrubber:i}} -
-

{{=scrubber.long_name}}

-
- Power: -
- {{? scrubber.power}} - {{=helper.link('On', 'power-off', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Off', 'close', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Mode: -
- {{? scrubber.scrubbing}} - {{=helper.link('Scrubbing', 'filter', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Siphoning', 'sign-in', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
- Range: -
- {{? scrubber.widenet}} - {{=helper.link('Extended', 'expand', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution')}} - {{??}} - {{=helper.link('Normal', 'compress', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null)}} - {{?}} -
-
-
- Filters: -
- {{=helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "co2_scrub", 'val': scrubber.filter_co2 ? 0 : 1}, null, scrubber.filter_co2 ? 'selected' : null)}} - {{=helper.link("N2O", scrubber.filter_n2o ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "n2o_scrub", 'val': scrubber.filter_n2o ? 0 : 1}, null, scrubber.filter_n2o ? 'selected' : null)}} - {{=helper.link("Plasma", scrubber.filter_toxins ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "tox_scrub", 'val': scrubber.filter_toxins ? 0 : 1}, null, scrubber.filter_toxins ? 'selected' : null)}} -
-
-
- {{~}} - {{? !data.scrubbers.length}} - No scrubbers connected. - {{?}} - {{?? data.screen == 4}} -
-

Environmental Modes

- {{~ data.modes:mode:i}} -
- {{=helper.link(mode.name, mode.selected ? 'check-square-o' : 'square-o', 'mode', {'mode': mode.mode}, null, mode.selected ? (mode.danger ? 'danger' : 'selected') : null)}} -
- {{~}} - - {{?? data.screen == 5}} -
-

Alarm Thresholds

- - - - - - - - - - - - {{~ data.thresholds:threshold:i}} - - - {{~ threshold.settings:setting:j}} - - {{~}} - - {{~}} - -
min2min1max1max2
{{=threshold.name}} - {{=helper.link(setting.selected >= 0 ? helper.round(setting.selected*100)/100 : "Off", null, 'adjust', {'command': 'set_threshold', 'env': setting.env, 'var': setting.val})}} -
- - {{?}} -{{?}} +
+ {{? data.siliconUser}} +
+ Interface Lock: +
+ {{=helper.link('Engaged', 'lock', 'toggleaccess', null, data.locked ? 'selected' : null)}} + {{=helper.link('Disengaged', 'unlock', 'toggleaccess', null, data.locked ? null : 'selected')}} +
+
+ {{??}} + {{? data.locked}} + Swipe an ID card to unlock this interface. + {{??}} + Swipe an ID card to lock this interface. + {{?}} + {{?}} +
+
+

Air Status

+ {{? data.environment_data}} + {{~ data.environment_data:info:i}} +
+ {{=info.name}}: +
+ {{? info.danger_level == 2}} + + {{?? info.danger_level == 1}} + + {{??}} + + {{?}} + {{=helper.fixed(info.value, 2)}}{{=info.unit}} +
+
+ {{~}} +
+ Local Status: +
+ {{? data.danger_level == 2}} + Danger (Internals Required) + {{?? data.danger_level == 1}} + Caution + {{??}} + Optimal + {{?}} +
+
+
+ Area Status: +
+ {{? data.atmos_alarm}} + Atmosphere Alarm + {{?? data.fire_alarm}} + Fire Alarm + {{??}} + Nominal + {{?}} +
+
+ {{??}} +
+ Warning: Cannot obtain air sample for analysis. +
+ {{?}} + {{? data.dangerous}} +
+
+ Warning: Safety measures offline. Device may exhibit abnormal behavior. +
+ {{?}} +
+{{? (!data.locked || data.siliconUser)}} + {{? data.screen != 1}} + {{=helper.link('Back', 'arrow-left', 'screen', {'screen': 1})}} + {{?}} + {{? data.screen == 1}} +
+

Air Controls

+
+ {{? !data.atmos_alarm}} + {{=helper.link('Area Atmospheric Alarm', 'hand-stop-o', 'alarm')}} + {{??}} + {{=helper.link('Area Atmospheric Alarm', 'close', 'reset', null, null, 'caution')}} + {{?}} +
+
+ {{? data.mode != 3}} + {{=helper.link('Panic Siphon', 'exclamation', 'mode', {'mode': 3})}} + {{??}} + {{=helper.link('Panic Siphon', 'close', 'mode', {'mode': 1}, null, 'danger')}} + {{?}} +
+
+ {{=helper.link('Vent Controls', 'sign-out', 'screen', {'screen': 2})}} +
+
+ {{=helper.link('Scrubber Controls', 'filter', 'screen', {'screen': 3})}} +
+
+ {{=helper.link('Set Environmental Mode', 'cog', 'screen', {'screen': 4})}} +
+
+ {{=helper.link('Set Alarm Threshold', 'bar-chart', 'screen', {'screen': 5})}} +
+
+ {{?? data.screen == 2}} + {{~ data.vents:vent:i}} +
+

{{=vent.long_name}}

+
+ Power: +
+ {{? vent.power}} + {{=helper.link('On', 'power-off', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Off', 'close', 'adjust', {'id_tag': vent.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ Mode: +
+ {{? vent.direction == "release"}} + Pressurizing + {{??}} + Siphoning + {{?}} +
+
+
+ Pressure Checks: +
+ {{=helper.link('Internal', 'sign-in', 'adjust', {'id_tag': vent.id_tag, 'command': 'incheck', 'val': vent.checks}, null, vent.incheck ? 'selected' : null)}} + {{=helper.link('External', 'sign-out', 'adjust', {'id_tag': vent.id_tag, 'command': 'excheck', 'val': vent.checks}, null, vent.excheck ? 'selected' : null)}} +
+
+
+ Set Pressure: +
+ {{=helper.link(helper.fixed(vent.external), 'pencil', 'adjust', {'id_tag': vent.id_tag, 'command': 'set_external_pressure'})}} + {{=helper.link('Reset', 'refresh', 'adjust', {'id_tag': vent.id_tag, 'command': 'reset_external_pressure'}, vent.extdefault ? 'disabled' : null)}} +
+
+
+ {{~}} + {{? !data.vents.length}} + No vents connected. + {{?}} + {{?? data.screen == 3}} + {{~ data.scrubbers:scrubber:i}} +
+

{{=scrubber.long_name}}

+
+ Power: +
+ {{? scrubber.power}} + {{=helper.link('On', 'power-off', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Off', 'close', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ Mode: +
+ {{? scrubber.scrubbing}} + {{=helper.link('Scrubbing', 'filter', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Siphoning', 'sign-in', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ Range: +
+ {{? scrubber.widenet}} + {{=helper.link('Extended', 'expand', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution')}} + {{??}} + {{=helper.link('Normal', 'compress', 'adjust', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null)}} + {{?}} +
+
+
+ Filters: +
+ {{=helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "co2_scrub", 'val': scrubber.filter_co2 ? 0 : 1}, null, scrubber.filter_co2 ? 'selected' : null)}} + {{=helper.link("N2O", scrubber.filter_n2o ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "n2o_scrub", 'val': scrubber.filter_n2o ? 0 : 1}, null, scrubber.filter_n2o ? 'selected' : null)}} + {{=helper.link("Plasma", scrubber.filter_toxins ? 'check-square-o' : 'square-o', 'adjust', {'id_tag': scrubber.id_tag, 'command': "tox_scrub", 'val': scrubber.filter_toxins ? 0 : 1}, null, scrubber.filter_toxins ? 'selected' : null)}} +
+
+
+ {{~}} + {{? !data.scrubbers.length}} + No scrubbers connected. + {{?}} + {{?? data.screen == 4}} +
+

Environmental Modes

+ {{~ data.modes:mode:i}} +
+ {{=helper.link(mode.name, mode.selected ? 'check-square-o' : 'square-o', 'mode', {'mode': mode.mode}, null, mode.selected ? (mode.danger ? 'danger' : 'selected') : null)}} +
+ {{~}} +
+ {{?? data.screen == 5}} +
+

Alarm Thresholds

+
+ + + + + + + + + + + {{~ data.thresholds:threshold:i}} + + + {{~ threshold.settings:setting:j}} + + {{~}} + + {{~}} + +
min2min1max1max2
{{=threshold.name}} + {{=helper.link(setting.selected >= 0 ? helper.round(setting.selected*100)/100 : "Off", null, 'adjust', {'command': 'set_threshold', 'env': setting.env, 'var': setting.val})}} +
+ + {{?}} +{{?}}