diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index bd128dc08a8..c53b22f078a 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -80,12 +80,13 @@ // breathable air according to human/Life() var/list/TLV = list( - "oxygen" = new/datum/tlv( 16, 19, 135, 140), // Partial pressure, kpa - "carbon dioxide" = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa - "plasma" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - "other" = new/datum/tlv(-1, -1, 0.5, 1), // Partial pressure, kpa - "pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20), /* kpa */ - "temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), // K + "oxygen" = new/datum/tlv(16,19,135,140), // Partial pressure, kpa + "nitrogen" = new/datum/tlv(-1,-1,1000,1000), // Partial pressure, kpa + "carbon dioxide" = new/datum/tlv(-1,-1,5,10), // Partial pressure, kpa + "plasma" = new/datum/tlv(-1,-1,0.2,0.5), // Partial pressure, kpa + "other" = new/datum/tlv(-1,-1,0.5,1), // Partial pressure, kpa + "pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20), // kPa + "temperature" = new/datum/tlv(T0C,T0C+10,T0C+40,T0C+66), // K ) /* @@ -96,22 +97,24 @@ /obj/machinery/alarm/server //req_access = list(access_rd) //no, let departaments to work together TLV = list( - "oxygen" = new/datum/tlv(-1, -1,-1,-1), // Partial pressure, kpa - "carbon dioxide" = new/datum/tlv(-1, -1,-1,-1), // Partial pressure, kpa - "plasma" = new/datum/tlv(-1, -1,-1,-1), // Partial pressure, kpa - "other" = new/datum/tlv(-1, -1,-1,-1), // Partial pressure, kpa - "pressure" = new/datum/tlv(-1, -1,-1,-1), /* kpa */ - "temperature" = new/datum/tlv(-1, -1,-1,-1), // K + "oxygen" = new/datum/tlv(-1,-1,-1,-1), // Partial pressure, kpa + "nitrogen" = new/datum/tlv(-1,-1,-1,-1), // Partial pressure, kpa + "carbon dioxide" = new/datum/tlv(-1,-1,-1,-1), // Partial pressure, kpa + "plasma" = new/datum/tlv(-1,-1,-1,-1), // Partial pressure, kpa + "other" = new/datum/tlv(-1,-1,-1,-1), // Partial pressure, kpa + "pressure" = new/datum/tlv(-1,-1,-1,-1), /* kpa */ + "temperature" = new/datum/tlv(-1,-1,-1,-1), // K ) /obj/machinery/alarm/kitchen_cold_room TLV = list( - "oxygen" = new/datum/tlv( 16, 19, 135, 140), // Partial pressure, kpa - "carbon dioxide" = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa - "plasma" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa - "other" = new/datum/tlv(-1, -1, 0.5, 1), // Partial pressure, kpa - "pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.50,ONE_ATMOSPHERE*1.60), /* kpa */ - "temperature" = new/datum/tlv(200, 210, 273.15, 283.15), // K + "oxygen" = new/datum/tlv(16,19,135,140), // Partial pressure, kpa + "nitrogen" = new/datum/tlv(-1,-1,1000,1000), // Partial pressure, kpa + "carbon dioxide" = new/datum/tlv(-1,-1,5,10), // Partial pressure, kpa + "plasma" = new/datum/tlv(-1,-1,0.2,0.5), // Partial pressure, kpa + "other" = new/datum/tlv(-1,-1,0.5,1), // Partial pressure, kpa + "pressure" = new/datum/tlv(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20), // kPa + "temperature" = new/datum/tlv(200,210,273.15,283.15), // K ) //all air alarms in area are connected via magic @@ -253,7 +256,7 @@ if(!location) return var/datum/gas_mixture/environment = location.return_air() - var/total = environment.oxygen + environment.carbon_dioxide + environment.toxins + environment.nitrogen + var/total = environment.oxygen + environment.nitrogen + environment.carbon_dioxide + environment.toxins var/list/environment_data = list() data["atmos_alarm"] = alarm_area.atmosalm @@ -272,9 +275,13 @@ var/oxygen_danger = cur_tlv.get_danger_level(environment.oxygen*partial_pressure) environment_data += list(list("name" = "Oxygen", "value" = environment.oxygen / total * 100, "unit" = "%", "danger_level" = oxygen_danger)) + cur_tlv = TLV["nitrogen"] + var/nitrogen_danger = cur_tlv.get_danger_level(environment.nitrogen*partial_pressure) + environment_data += list(list("name" = "Nitrogen", "value" = environment.nitrogen / total * 100, "unit" = "%", "danger_level" = nitrogen_danger)) + cur_tlv = TLV["carbon dioxide"] var/carbon_dioxide_danger = cur_tlv.get_danger_level(environment.carbon_dioxide*partial_pressure) - environment_data += list(list("name" = "Carbon dioxide", "value" = environment.carbon_dioxide / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger)) + environment_data += list(list("name" = "Carbon Dioxide", "value" = environment.carbon_dioxide / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger)) cur_tlv = TLV["plasma"] var/plasma_danger = cur_tlv.get_danger_level(environment.toxins*partial_pressure) @@ -290,6 +297,7 @@ cur_tlv = TLV["temperature"] var/temperature_danger = cur_tlv.get_danger_level(environment.temperature) environment_data += list(list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_danger)) + data["environment_data"] = environment_data /obj/machinery/alarm/proc/populate_controls(list/data) @@ -312,7 +320,7 @@ "incheck" = info["checks"]&2, "direction" = info["direction"], "external" = info["external"], - "default" = (info["external"] == ONE_ATMOSPHERE) + "extdefault"= (info["external"] == ONE_ATMOSPHERE) )) if(AALARM_SCREEN_SCRUB) data["scrubbers"] = list() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 07881623118..bfb2d195477 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -272,8 +272,7 @@ var/list/admin_verbs_hideable = list( /client/proc/fps, /client/proc/cmd_admin_grantfullaccess, /client/proc/cmd_admin_areatest, - /client/proc/readmin, - /client/proc/reload_nanoui_resources + /client/proc/readmin ) if(holder) verbs.Remove(holder.rank.adds) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 1c5fe8a5c16..58595a5bfd5 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -776,21 +776,3 @@ var/global/list/g_fancy_list_of_types = null if(!holder) return debug_variables(huds[i]) - -/client/proc/reload_nanoui_resources() - set category = "Debug" - set name = "Reload NanoUI Resources" - set desc = "Force the client to redownload NanoUI Resources" - - // Close open NanoUIs. - SSnano.close_user_uis(usr) - - // Re-load the assets. - var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) - assets.register() - - // Clear the user's cache so they get resent. - usr.client.cache = list() - - // Send the assets. - assets.send(usr.client) diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index ad7d2574683..122e85d711f 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -159,7 +159,6 @@ var/intercom_range_display_status = 0 src.verbs += /client/proc/cmd_show_at_list src.verbs += /client/proc/cmd_show_at_list src.verbs += /client/proc/manipulate_organs - src.verbs += /client/proc/reload_nanoui_resources feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 2131121ca42..ce7534536d1 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -1,246 +1,239 @@ -/* -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/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() - -/datum/asset/nanoui - var/list/assets = list() - - var/list/asset_dirs = list( - "nano/compiled/" - ) - -/datum/asset/nanoui/register() - // Crawl the directories to find files. - for (var/path in asset_dirs) - var/list/filenames = flist(path) - for(var/filename in filenames) - if(copytext(filename, length(filename)) != "/") // Ignore directories. - if(fexists(path + filename)) - assets[filename] = fcopy_rsc(path + filename) - register_asset(filename, assets[filename]) - -/datum/asset/nanoui/send(client) - send_asset_list(client, assets) +/* +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/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' + ) + +/datum/asset/simple/nanoui + assets = list( + "app.js" = 'nano/assets/app.js', + "lib.js" = 'nano/assets/lib.js', + "templates.js" = 'nano/assets/templates.js', + "generic.css" = 'nano/assets/generic.css', + "lib.css" = 'nano/assets/lib.css', + "nanotrasen.css" = 'nano/assets/nanotrasen.css', + "fontawesome-webfont.eot" = 'nano/assets/fontawesome-webfont.eot', + "fontawesome-webfont.woff" = 'nano/assets/fontawesome-webfont.woff', + "fontawesome-webfont.woff2" = 'nano/assets/fontawesome-webfont.woff2' + ) + +//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/nano/nanoui.dm b/code/modules/nano/nanoui.dm index aadf0ac0d0e..c325db0c50e 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -80,7 +80,7 @@ master_ui.children += src src.state = state - var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nanoui) assets.send(user) /** @@ -253,30 +253,15 @@ /datum/nanoui/proc/get_html() // Generate - - - - - - - + + + "} var/stylesheet_html = {" - - - + + "} - // Generate template JSON. - var/template_data_json = "{}" -// if (templates.len > 0) -// template_data_json = list2json(templates) - // Generate data JSON. var/list/send_data = get_send_data(initial_data) var/initial_data_json = replacetext(replacetext(list2json_usecache(send_data), """, "&#34;"), "'", "'") @@ -292,24 +277,21 @@ [stylesheet_html] [script_html] - + +
diff --git a/nano/.gitignore b/nano/.gitignore index c2658d7d1b3..68b9e27759d 100644 --- a/nano/.gitignore +++ b/nano/.gitignore @@ -1 +1,2 @@ node_modules/ +bower_components/ diff --git a/nano/Gruntfile.js b/nano/Gruntfile.js deleted file mode 100644 index 08ae8b34654..00000000000 --- a/nano/Gruntfile.js +++ /dev/null @@ -1,111 +0,0 @@ -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - concurrent: { - compile: { - tasks: ['concat', 'less', 'dot'] - }, - minify: { - tasks: ['newer:uglify', 'newer:imagemin'] - }, - }, - concat: { - options: { - separator: '\n' - }, - compile: { - src: ['scripts/nanoui.js', 'scripts/*.js'], - dest: 'compiled/nanoui.js' - } - }, - dot: { - compile: { - options: { - templateSettings: { - varname: 'data, config, helper', - selfcontained: true - } - }, - files: { - 'compiled/templates.js': ['templates/*.dot'] - } - } - }, - imagemin: { - assets: { - options: { - optimizationLevel: 7 - }, - files: [{ - expand: true, - cwd: 'images/', - src: ['*.{png,jpg,gif}'], - dest: 'compiled/' - }] - } - }, - jshint: { - scripts: ['Gruntfile.js', 'scripts/*.js'] - }, - less: { - options: { - plugins: [ - new (require('less-plugin-autoprefix'))({browsers: ["last 2 versions"]}), - new (require('less-plugin-clean-css'))({advanced: true}) - ] - }, - compile: { - files: { - "compiled/_generic.css": "styles/_generic.less", - "compiled/_nanotrasen.css": "styles/_nanotrasen.less" - } - } - }, - lesslint: { - options: { - csslint: { - 'adjoining-classes': false, - 'box-model': false, - 'box-sizing': false, - 'floats': false, - 'ids': false, - 'important': false, - 'unqualified-attributes': false - } - }, - styles: ['styles/*.less'] - }, - uglify: { - options: { - banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' - }, - main: { - files: { 'compiled/nanoui.min.js': ['compiled/nanoui.js'] } - }, - templates: { - files: { 'compiled/templates.min.js': ['compiled/templates.js'] } - } - }, - watch: { - files: ['scripts/*.js', 'styles/*.less', 'templates/*.dot'], - tasks: ['lint', 'compile', 'minify'] - } - }); - - grunt.loadNpmTasks('grunt-concurrent'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-imagemin'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-dot'); - grunt.loadNpmTasks('grunt-lesslint'); - grunt.loadNpmTasks('grunt-newer'); - - grunt.registerTask('lint', ['jshint', 'lesslint']); - grunt.registerTask('compile', 'concurrent:compile'); - grunt.registerTask('minify', 'concurrent:minify'); - grunt.registerTask('default', ['lint', 'compile', 'minify']); - -}; diff --git a/nano/Gulpfile.coffee b/nano/Gulpfile.coffee new file mode 100644 index 00000000000..dffd076cf63 --- /dev/null +++ b/nano/Gulpfile.coffee @@ -0,0 +1,112 @@ +### Settings ### +min = require("gulp-util").env.min + +# Project Paths +paths = + scripts: ["scripts/*.coffee"] + styles: ["styles/*.less"] + templates: ["templates/*.dot"] + build: "assets" + +# doT Settings +dotSettings = + 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 + +# CSSNano Settings +nanoOpts = + discardComments: + removeAll: true + + +### Gulp ### +gulp = require "gulp" +gulpif = require "gulp-if" +jsbeautify = require "gulp-jsbeautifier" +bower = require "main-bower-files" +coffee = require "gulp-coffee" +concat = require "gulp-concat" +csscomb = require "gulp-csscomb" +del = require "del" +dot = require "gulp-dot-precompiler" +header = require "gulp-header" +filter = require "gulp-filter" +gutil = require "gulp-util" +less = require "gulp-less" +merge = require "merge-stream" +postcss = require "gulp-postcss" +replace = require "gulp-replace" +uglify = require "gulp-uglify" + +### PostCSS ### + +autoprefixer = require "autoprefixer" +clearfix = require "postcss-clearfix" +cssnano = require "cssnano" +url = require "postcss-url" + + +### Tasks ### +gulp.task "default", ["fonts", "scripts", "styles", "templates"] + +gulp.task "clean", -> + del "#{paths.build}/*" + +gulp.task "watch", -> + gulp.watch paths.scripts, ["scripts"] + gulp.watch paths.styles, ["styles"] + gulp.watch paths.templates, ["templates"] + +gulp.task "fonts", -> + gulp.src bower "**/*.{eot,woff{,2}}" + .pipe gulp.dest paths.build + +gulp.task "scripts", -> + lib = gulp.src bower "**/*.js" + .pipe concat("lib.js") + .pipe gulpif(min, uglify(), jsbeautify()) + .pipe gulp.dest paths.build + + nanoui = gulp.src paths.scripts + .pipe coffee() + .pipe concat("app.js") + .pipe gulpif(min, uglify(), jsbeautify()) + .pipe gulp.dest paths.build + + merge lib, nanoui + +gulp.task "styles", -> + lib = gulp.src bower "**/*.css" + .pipe replace("../fonts/", "") + .pipe concat("lib.css") + .pipe gulpif(min, postcss([cssnano(nanoOpts)]), csscomb()) + .pipe gulp.dest paths.build + + nanoui = gulp.src paths.styles + .pipe filter(["*.less", "!_*.less"]) + .pipe less() + .pipe postcss([ + url({url: "inline" }), + autoprefixer({ browsers: ["last 2 versions", "> 5%", "ie <= 8"] }), + clearfix + ]) + .pipe gulpif(min, postcss([cssnano(nanoOpts)]), csscomb()) + .pipe gulp.dest paths.build + + merge lib, nanoui + +gulp.task "templates", -> + gulp.src paths.templates + .pipe dot({dictionary: "TMPL", templateSettings: dotSettings}) + .pipe concat("templates.js") + .pipe header("window.TMPL = {};\n") + .pipe gulp.dest paths.build diff --git a/nano/Gulpfile.js b/nano/Gulpfile.js new file mode 100644 index 00000000000..203c68bf5c2 --- /dev/null +++ b/nano/Gulpfile.js @@ -0,0 +1,2 @@ +require('coffee-script/register'); +require('./Gulpfile.coffee'); diff --git a/nano/assets/app.js b/nano/assets/app.js new file mode 100644 index 00000000000..5b28e8c849e --- /dev/null +++ b/nano/assets/app.js @@ -0,0 +1 @@ +(function(){this.Handlers=function(){function t(t){this.bus=t,this.bus.on("rendered",this.updateStatus),this.bus.on("rendered",this.updateLinks),this.bus.on("rendered",this.attachHandlers),this.bus.on("error",this.error)}return t.prototype.updateStatus=function(t){var e;e=document.queryAll(".statusicon"),e.forEach(function(e){switch(t.config.status){case 2:e.className="statusicon good";break;case 1:e.className="statusicon average";break;default:e.className="statusicon bad"}})},t.prototype.updateLinks=function(t){var e;e=document.queryAll(".link"),2!==t.config.status&&e.forEach(function(t){t.className="link disabled"})},t.prototype.attachHandlers=function(t){var e;e=function(e){var n;n=this.data("href"),null!=n&&2===t.config.status&&(this.classList.add("pending"),location.href=n)},document.queryAll(".link").forEach(function(t){t.on("click",e)})},t.prototype.error=function(t){var e;e=Util.href({nanoui_error:t}),location.href=e},t}()}).call(this),function(){this.Helpers={link:function(t,e,n,i,a){return null==t&&(t=""),null==e&&(e=""),null==n&&(n={}),null==i&&(i=""),null==a&&(a=""),n=window.Util.href(n),e&&(e="",a+=" iconed"),i?"":""},bar:function(t,e,n,i,a){var s;return null==t&&(t=0),null==e&&(e=0),null==n&&(n=100),null==i&&(i=""),null==a&&(a=""),n>e?e>t?t=e:t>n&&(t=n):t>e?t=e:n>t&&(t=n),s=Math.round((t-e)/(n-e)*100),"
"+a+"
"},round:function(t){return Math.round(t)},fixed:function(t,e){return null==e&&(e=1),Number(Math.round(t+"e"+e)+"e-"+e)},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 e,n,i;e={},i=new t.NanoUI(e),n=new t.Handlers(e),e.emit("memes"),t.NanoBus=e}}(this))}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.NanoUI=function(){function e(e){return this.bus=e,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.layoutRendered=!1,this.contentRendered=!1,this.data={},this.initialData=JSON.parse(document.query("#data").data("initial")),null==this.initialData&&("data"in this.initialData||"config"in this.initalData)?void this.bus.emit("error","Initial data did not load correctly."):void 0}return e.prototype.serverUpdate=function(t){var e,n,i;try{e=JSON.parse(t)}catch(i){return n=i,void NanoBus.emit("error",n.fileName+":"+n.lineNumber+" "+n.message)}this.bus.emit("update",e)},e.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")},e.prototype.render=function(t){var e,n,i,a;this.initialized||(t=this.initialData);try{(!this.layoutRendered||t.config.autoUpdateLayout)&&(a=document.query("#layout"),a.innerHTML=TMPL[t.config.templates.layout](t.data,t.config,Helpers),this.layoutRendered=!0,this.bus.emit("layoutRendered")),(!this.contentRendered||t.config.autoUpdateContent)&&(e=document.query("#content"),e.innerHTML=TMPL[t.config.templates.content](t.data,t.config,Helpers),this.contentRendered=!0,this.bus.emit("contentRendered"))}catch(i){return n=i,void this.bus.emit("error",n.fileName+":"+n.lineNumber+" "+n.message)}this.bus.emit("rendered",t),this.initialized||(this.initialized=!0)},e}()}.call(this),function(){this.Util={extend:function(t,e){return Object.keys(e).forEach(function(n){var i;i=e[n],i&&"[object Object]"===Object.prototype.toString.call(i)?(t[n]=t[n]||{},this.extend(t[n],i)):t[n]=i}),t},href:function(t){var e,n;return e=JSON.parse(document.query("#data").data("url-parameters")),n=new Url("byond://"),this.extend(n.query,this.extend(t,e)),n}}}.call(this); \ No newline at end of file diff --git a/nano/assets/fontawesome-webfont.eot b/nano/assets/fontawesome-webfont.eot new file mode 100644 index 00000000000..9b6afaedc0f Binary files /dev/null and b/nano/assets/fontawesome-webfont.eot differ diff --git a/nano/assets/fontawesome-webfont.woff b/nano/assets/fontawesome-webfont.woff new file mode 100644 index 00000000000..dc35ce3c2cf Binary files /dev/null and b/nano/assets/fontawesome-webfont.woff differ diff --git a/nano/assets/fontawesome-webfont.woff2 b/nano/assets/fontawesome-webfont.woff2 new file mode 100644 index 00000000000..500e5172534 Binary files /dev/null and b/nano/assets/fontawesome-webfont.woff2 differ diff --git a/nano/assets/generic.css b/nano/assets/generic.css new file mode 100644 index 00000000000..4fbb50cbb19 --- /dev/null +++ b/nano/assets/generic.css @@ -0,0 +1 @@ +.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.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:-webkit-repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);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}body{padding:0;margin:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff;background:#272727}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}.content{margin:3px}.loading{background-color:#bb9b68;background-image:-webkit-repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);background-image:repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}.link{display:inline-block;box-sizing:border-box;height:22px;margin:1px;padding:2px 3px;white-space:nowrap;border:1px solid #272727;cursor:default;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;background-color:#40628a}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.main{display:inline-block}.link.pending i.main,.link i.pending{display:none}.link.pending i.pending{display:inline-block}.link.active{background-color:#40628a}.link.active:hover{background-color:#486e9b}.link.active.selected{background-color:#2f943c}.link.active.selected:hover{background-color:#35a744}.link.active.caution{background-color:#bbbe00}.link.active.caution:hover{background-color:#d4d800}.link.active.danger{background-color:#ea0000}.link.active.danger:hover{background-color:#ff0404}.link.inactive{background-color:#999}.link.inactive.selected{background-color:#2f943c}.link.inactive.caution{background-color:#bbbe00}.link.inactive.danger{background-color:#ea0000}.link.disabled{background-color:#999}.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:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#e00}.bar .barFill.highlight{background:#8ba5c4}body{background:#272727 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAGQCAIAAADZR5NjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gcPAAMlboqcPQAAFohJREFUeNrt3V124zYSBlCKpMdZQRaV/e8lOW1Smgd0VxCQVMsywR/53oc5jtsRSYxifV0ACpe//vqrAQBgPa0hAABYV3+73YwCAMCKVLAAAAQsAAABCwBAwAIAQMACADgMuwgBAFamggUAIGABAAhYAAACFgAAAhYAgIAFACBgAQDwkP56vRoFAIA1A9blcjEKAAArMkUIACBgAQAIWAAAAhYAAM/rb7ebUQAAWJEKFgCAgAUAIGABAAhYAAAIWAAAAhYAgIAFAMBD9MECAFiZChYAgIAFACBgAQAIWAAACFgAAIdhFyEAwMpUsAAABCwAAAELAEDAAgBAwAIAELAAAAQsAAAELACAPWg0CgCwMhUsAAABCwBAwAIAELAAAHieRe4AACtTwQIAELAAAAQsAAABCwAAAQsAQMACABCwAAB4iD5YAAArU8ECABCwAAAELAAAAQsAgOf1l8vFKAAArBmw7CIEAFiXKUIAgJWpYAEArEwFCwBAwAIAELAAAAQsAAAELACAw7CLEABgZSpYAAACFgCAgAUAIGABACBgAQAchl2EAAArU8ECAFiZChYAwNoB63K5GAUAgBWZIgQAELAAAAQsAAABCwCA59lFCACwMhUsAAABCwBAwAIAELAAABCwAAAELAAAAQsAgIfogwUAsDIVLAAAAQte1OVyqV1Rvlwul8tl+nXTNLdf0h+l72z24HED9V6/xhPdMtfrNR894JvrDQEcJFTdbrfis3n1ZHC9XvNAk7/+NGxt8PjpuvVySTxXusrql5iG1C2DKSBgAfMfz/HZf/9Ted3P7IgaxctOK0kbVNQiXdUrm1V9ijzDxegpYgECFuymyFVFOaQIPZUuXVwxjzvbTFlOpyYrBaBKz1KMmHc18DNgqWbD9vJgkT6Y27a9XC593xfRqkauul6v4zgWpaMmm0Bsf6mdGPKbyWs/q1fsiiRUKSDG/5t+rwIqWLCb+Bhu27brupRpis/vShfNV2cXc1txMxuUZPLZtKqLxOOV0yB3XbduRkwscgcELNg/WqVP4vjIb9s21ZAiXa1eCIlqWex6y6sv6Qe6ruu67pGVYauIOlm6pRoBpXi0aZD9YkC83W7DMGy2MwAQsIDfx538U7/2J/TsgqHr9RqBIyYHt1msXcyQ1rtcXCWN9jAMq79y3v9C0gIELNhBnl3i43kcx82CXcpV6dLpuikoDMPw/v6e/miDqa58F2Gatktzbc2kjvX02qy2bYdhSJHx7e3tdruN47juo91ut67r/vnnnwim3uGARqOwg/wDvmqHgqcTw8YXitVRSw2rjpxaJCpAwIIjfjBvtuBpGgiWemNufDP52q+lJPrELW3wFDsOHSBgATt89t+/bhHpdgkK0ziVrwArWp5+5X6KV5OuAAELXjxmTcPEvjez5RWja1Tegis1AysO+FsrA9V7RquvgJxGo7BzpknLujduUFnUrqYHEW6zLCy/biy6T2vt4ztLUenpjNVUaGQ6jXHe2/DNqWDBPrkqDxaplflmDSqPswarKFDl67FW6SNvDRYgYMF3DFj7zg8eYVJy+s0IWGu1AwUQsOBbyJtgXa/Xj4+PYRhiRqx25Mqvnr5eOmR6s3EoUld+EuJXVmJt08prl6EDDk6jUdgzZsUMXRySk9YhRdSofQ9LU4S7j0x0SM9H5rmn25gpQkDAgt0CRPGdVKS5Xq+pF1QKFpUOD84nKOPFp0vddxyfdDOpt/uKxbwaDzVd3q6CBQhYsGeAyINO89+ZwShi1UhXSzsED5UVikOpv/7UxZnW6w7mEVIpcKyA5TcC7BKwijARkSvtKEzHEq8+V5jXq+4HkYMkhpgrfLqONfsv1ug4WpQDvcnhm7PIHY6SsZpfhavrL9t0Hj9gG6fijMKnm3Jt8yCaYAFTpghhB3emqCJMjOP4869Ba3crOP4arHyf44orsazBAgQsePGAtTRvVfQmuN1u6RTkFQPBgwWhI2SFKOx98U7qHY8jTgGzTBHCDpYabOaVm1S4Gsfxx48f0eo9X4303Ed73vuq+HrpZnb4xZRNC6Y7SSmzWB/229iUj2dTYcfA0cYNELCAT0idSIsTdZaWTz1Smip++GjLsIpHi55YzX+XZ/128ft0n2btrOzIZyCxixBOYBzHNGOYH9IXO9ce3yWXb1f87YL3I2Ssf/8u2LZx/3kBL7XCf+R1KmWs2eb7fq8CKlhwDtfrdRiGdKJOsVrrU6mleeAkxOOUYfI7idYV0/rW/efdMghKV4CABef5D7Vto0vWx8dHKmgV8eLB1T9LVZYNmkV91rStVBTwHgxYS8lyxXR1tEEDBCzgEwErb5GV6lgpY83203oktUxXZy/95I7pqqjSpYD1RGeseovcDzVowHFo0wAnkLJUzI6ljJWmzPJlVZ+NBfkuwvxfj/Xjez3vndSYnnp2ZvORAFQpCBbfUccCen/fguMbhiFlqchbcTL0bLq605t02uJhWsr61OxbpUC5dOm0nbDrurSnMvo4LD3s7J+ueBbh0hh608J3D1j+pgXHlxqNxrqryE9///133/dvb2/R7jwCyvSTPo9i0wYNs70b9nrepYAyjmMcAh2d7pvfHa1YWPE+lwYTwBosOLHUpODj4yOakS6FpAc/+E+RD9JNfuWMwnp3BZCoYMG5A9btdhuGIX3R930zKf/M/jf+SHPOA4aGotN9qmPdv8nPPv4q6crvVUAFC84dsOIT/Xq9Li1Lul/HOmMaiJVYj6woF3eA7dlFCCeWLwaPrg15t/cmWyf0+Mrr459hHPscUx1r35tx5DMgYMFLiS2BqXAVFazoF5UnkjuvcNKGmfmR2HeeboP/C043dICABdxLGM1/Oy9EzEr7Cot2DNOV7yctveTn51wul6WABSBgAZ8WrUebX70bopTV/CrwPBihThq2HjwgqIhlVZOf6UKgsYsQTi2v3ORfp6LOOI5d16UuWWkVfFq01GQ9sfLzdvJmUedqR/729jYMwziOcaBQ0zRd16VHzjtgrf5QMT97hP5hwIECliGA15N3HE0HF6ZSViqupHMM708UnislRKEurfpPhb3otrrNUAP85/eSIYBXDVipuPLx8fHx8RGThvEDr5QMUsuG2FG4+1mKAAIWvHLMisOhU5esVNSJzXcxG9icfzdc13V5W6zZbqu1+4s2ClqAgAUvrNg8mE7UGYZhGIa0DCvNqRVZ5LzhIM0M9n0fhzZO5z13adkAfFvWYMHLylu6Rx0ralfNJ7fgneDvi23b932svpqdJZytbwGsH7D8lQteT54t8lpOOrgwP1GnuXv44Il+P6THyXcO3nmEGs9VjLM3IXz3gGUI4FUzVjO39iitdk9pIHbb5T3fT3o0YZSmuq6L1WabPZFEBZQBy+8FeD2P/Hcd/UibbFPh9H9XD0A1Qkl+3uLlcnl7e2uaZhiGaFKVfiylrrZt1+3gEG3DtMIC/g1Y1iIAeRK684+1L7dipoz63G9z3loXLTYWeC/Bdw9YhgBo5npHrZsS8hdfvUnVdNdk2k5Y+4zCjfMocCLaNAAzyaBGVtisxpPKV6ktVlzo8ssZhw4QsIDz2aBhZr7ovmoEiUvkpwM1k3VmJxo6QMACTpyxNujRUByDWC/lNL92FBZTn1XT1YsdQAR8hV2EQBkR7pyf88V0NY5jTNVt8MsnX+d+p93XkQcNOCkVLGAmc6xbjClORcw7GlS9+ejvVe8swvO2ZgUELKCu6ervddeDp0pSOhIx9ZG/Xq/FIvSvZJSlm7/dbl3Xvb+/p++k+tm6/b2qjhsgYAEnVrvukh99mNLVnSXnNTb6VdpCuMtgAqegDxbwMxZUarOep5zm17HTaZff7I+tfvW4Vo2ANZ0iVMECGhUs4E5WWPeV8wpWMv2ZGsvPm6Zp2zZlrNprv7yLgMQuQqCZNouqlBgiRaWTEIvCUqVmCtMKVqXV7vVeHzgdFSxgi0rMNLrFgvfiZ2q3qjrj6AECFiBjzb9+3mI0/eMwDEXGqvpo0hUgYAHHilwryle7R8lqy41+xx8iQMACTq9INjWyTqxw77puHMfUBCufKMy3GZ5r3KZDl+fIIlY2il4gYAHUMF13FbOHr9SoM1JjeqLUnCKSlpakIGAB3yjxNBvWVO50bXiN0UsbGKNDRP597zp4bRqNAj9jQdVGo82k01VcMUWrM67BahYajaZDgX7+LbZtZ/tQLM0kAgIW8GoZ607k+vorp3pV8Zrpj9JKrKX27idNpdEcK2Wsy+UyDENj0RV8k4DlP3Vgs0ajs1dpsrZYza+ToU+XTWfzaLFBMj1mozEpfAPWYAG7rcHKL5SWYZ0xaswWrvLZwPi67/u+76NKJ1fBCzNFCPw+NNS7RJR2ik6kpx6o+GY8Wvpm13XNr+2ENc5eBI5DBQuY6di0wcrrWHGV56pxHH/8+HG73fLNd0de/D69t2j3lZa65ychpuMX39/f39/fu67Li1v5NOLq5wUB21PBAkorLm//bMjLT4POlygdeavd47eXF7RSAktNVqOY19hUCAIW8EqJ6rffqXfRYq337XaLHYV5IjnX0M3uFYjHuVwufd+nL9LWwiabM93s/wKgHlOEwEYZ65HJr+g7WhwCfcy0cX/QiqXu07B1uVy6rkvL3ovJQbOEcHYqWMBMIKgRRKYto5b6SKWlS+nIwubwU4SPj14es6K9aqx8j2X+ZgnhFQKWvyQBRcqJz/iqeWv6df6d1BOraO9+2DrWnT4Xs7WrCFixlj/2FeYZy+9nOC9ThMDOa7Bm0970gMJzzRL+dn4zIlR0e+/7vuu6tPi9sdodTs4UIXCUdFIU0k7adzR/hKWQFBEqPWaq0mlACgIW8FJifurOd2pc9M6fprSRdti9vb3lxyc/nmN2HLp8ZrP4mdlYmc8Ytm378fERBwdFP7D8SEdvWhCwgKPb5QP7kWAUmwrzpqOnGMxPDWkexZqmST1II1MWyVK6glOwBguY+diu8Sn++GsWu+3GcUzzaM1+xyY+MW7T5e2/zWRRo0rtG/q+TzHL7kI4HRUsYDErrPWJ/pW5rXw74eo39vXnmm0zMZux7tzzbIuHfElWNHGQseA0AUu1GcizywbtPfN2mo9kl1TEWlrS1ByjjrUUoT41nsXrpIzV9/04jqmMFy1JvWnh6AHLEAD1alf3L3r/KtOJwtST84CjN20k9qnOF3HM8/SPUqJKX6diHnAK1mAB8xmr9iUe+eGYGYx1SM3BVnmvsgYrYtZs8CqWZClfgYAFvE7k2uVlI2BF6/NzDdGDGWt6CmHxL0bGErBAwAJOI19CvvSdVa7STFoS3P/h2D2XgsWPHz/GcUytoR58nb3GLT/k51ODmf+L045Z//vf//744484GbrJGmUdMIDCd2YNFjCzRrveFOGDG+tmpYnClLGaY8wVLk0Rrn6kY/4i6TidlD5j+b8NhnCsgKXaDOTn4n125dCnrpIyxyO7CJdCxjRP7Nu8YHboiuQaafKJIZ19tL7vr9frMAzRIezOMnlgn4BlCIBduh48t1cxZaymabqua9v2Tn+EzYZuaRdhUcF6blSXDopu2zb2VM5mO2Bf1mAB8x/kq39mf30PYJyOnGbHYgH4YQetajkwthYeZ8IUCCpYQNMs9AiocYkvvmy+qTBfD37MQau0Ej/fWphGIM0VehuDgAUcK13l9Y9tFvQ8nTmiZUOaKUsThYfKWLHzcXZ4P/Wk9w/YSSMQV9GJFA4UsGw8AZbC1rpnERYB7onXL/bopaNjmv1mCZcGKv/HrxSxllaYtW0bbVcjY6V9hd7AcJSAZdoemGaXZtU1PcVSpKU9d5+KgFHEinrb9kuy8seZfvH1h519lghS+Qr6mC4chmEYhihu7b4JAL4ti9yBmSR0/NuLItY4jkV3iS8GuPMOXcyZ5m1avathFypYQLPUYrTe74en+2AV/5hqObEOaa/Qc+dC24znv39pbtu+78dxTLmz+cIKMOBL/zEaAmBjq3ze59sJj1aqmb2Zbe4wilhNNnvoLQcCFvAiAahSemj+e7RfEbB26dpwnOGKpVfPHYMICFhA3YiwQWh4+hLTLJW6QE33Ku44dPumrt07hAH6YAFnTYR5wMoj10H2za172PPT92ABFuxCBQtommOXrKaJIa8SpVnCYvPgXsFi98LV9GvNsWAX3Z9//mkUQLr6+Ruh65o6h+SkfgpNzRm02FEYTQo2qGPFSTVxCnUe79KfplvaLMJG94oYEEUs2J4pQuDfz+CiXedaH8z55F3e/XzF108vlRa8p0ATSWuDQJM/VP6wxRhuM3F5/cUbGwQsYE/RCT1VPvIT7tYKIrHXr17vgFRDiojTtu0wDFXHLRX8Hrmx9Ly1zwpMHbCKbZXe3iBgAfvIVy9dr9dhGNbdhhYBK33wV5ovi/uPNe8PBqBVnq5YFpZX7GJsa99PGuGUsfJOFt7hIGAB+wSsorNUpc/mqr0D4lDCiHEbBJomm5Kb7l4sDvOpfT+pgXt+UqGABQIWsLOYFqyxDj36Xubho3ZA/Pj4qDpiRYjJy355o/kUfW632wb343RnOErA8pcbYJoVqq7gyQ9mrpGxImDVzhnFQvJ8DPNLpx+73W7rrmy7cz/TQxu9w2HrgGUIgKWS1Yq7/JpNelMV6bD25YqCXN4lIf/TXWbrLHIHAQvY2TbtDLaJFFumiqXnys9abvbu5O7tDbvQyR0AQMACABCwAAAELAAABCwAAAELAEDAAgDgITq5AwCsTAULAEDAAgAQsAAAvhVrsAAAVqaCBQAgYAEACFgAAAIWAAACFgCAgAUAIGABACBgAQDsQaNRAICVqWABAAhYAAACFgCAgAUAgIAFAHAYdhECAKxMBQsAQMACABCwAAAELAAABCwAAAELAEDAAgBAwAIA2INGowAAK1PBAgAQsAAABCwAAAELAAABCwBAwAIAELAAABCwAAAELAAAAQsAAAELAEDAAgAQsAAABCwAAAQsAAABCwBAwAIAQMACABCwAAAELAAABCwAAAELAEDAAgBAwAIAELAAAAQsAAABCwAAAQsAQMACABCwAAAQsAAABCwAAAELAAABCwBAwAIAELAAABCwAAAELAAAAQsAQMACAEDAAgAQsAAABCwAAAQsAAABCwBAwAIAQMACABCwAAAELAAABCwAAAELAEDAAgAQsAAAELAAAAQsAAABCwAAAQsAQMACABCwAAAQsAAABCwAAAELAEDAAgBAwAIAELAAAAQsAAAELAAAAQsAQMACAEDAAgAQsAAABCwAAAQsAAABCwBAwAIAELAAABCwAAAELAAAAQsAAAELAEDAAgAQsAAAELAAAAQsAAABCwAAAQsAQMACABCwAAAELAAABCwAAAELAEDAAgBAwAIAELAAAAQsAAAELAAAAQsAQMACAEDAAgAQsAAABCwAAAELAAABCwBAwAIAELAAABCwAAAELAAAAQsAAAELAEDAAgAQsAAABCwAAAQsAAABCwBAwAIAQMACABCwAAAELAAABCwAAAELAEDAAgBAwAIAELAAAAQsAAABCwAAAQsAQMACABCwAAAQsAAABCwAAAELAAABCwBAwAIAELAAABCwAAAELAAAAQsAQMACAEDAAgAQsAAABCwAAAQsAAABCwBAwAIAQMACABCwAAAELAAABCwAAAELAEDAAgAQsAAAELAAAAQsAAABCwAAAQsAYCf/B8AeECg++Cy6AAAAAElFTkSuQmCC') 50% 0 repeat-x} \ No newline at end of file diff --git a/nano/assets/lib.css b/nano/assets/lib.css new file mode 100644 index 00000000000..034c7f33676 --- /dev/null +++ b/nano/assets/lib.css @@ -0,0 +1 @@ +@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/lib.js b/nano/assets/lib.js new file mode 100644 index 00000000000..0c13cdd523f --- /dev/null +++ b/nano/assets/lib.js @@ -0,0 +1,2 @@ +!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/nanotrasen.css b/nano/assets/nanotrasen.css new file mode 100644 index 00000000000..fd8fbe415f6 --- /dev/null +++ b/nano/assets/nanotrasen.css @@ -0,0 +1 @@ +.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.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:-webkit-repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);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}body{padding:0;margin:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;color:#fff;background:#272727}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}.content{margin:3px}.loading{background-color:#bb9b68;background-image:-webkit-repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);background-image:repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}article.display,article.notice{display:-webkit-box;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;border:2px solid #272727;box-shadow:inset 0 0 5px rgba(0,0,0,.5);background-color:rgba(0,0,0,.4)}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:2px 0}article.display section.text,article.notice section.text{padding:5px 0}article.display section.button,article.notice section.button{padding-bottom:0}article.display .cell,article.notice .cell{display:inline-block;margin: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 table,article.notice table{border-collapse:collapse}article.display th,article.notice th{padding:2px 12px 4px 0;text-align:left}article.display td,article.notice td{padding:2px 2px 0 0}article.notice{margin:8px 2px;border:none;box-shadow:none;background-color:#bb9b68;background-image:-webkit-repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px);background-image:repeating-linear-gradient(45deg,#bb9b68,#bb9b68 10px,#b1905d 0,#b1905d 20px)}article.notice .label,article.notice span{color:#000;font-weight:bolder;font-style:italic}.link{display:inline-block;box-sizing:border-box;height:22px;margin:1px;padding:2px 3px;white-space:nowrap;border:1px solid #272727;cursor:default;color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none;background-color:#40628a}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.main{display:inline-block}.link.pending i.main,.link i.pending{display:none}.link.pending i.pending{display:inline-block}.link.active{background-color:#40628a}.link.active:hover{background-color:#486e9b}.link.active.selected{background-color:#2f943c}.link.active.selected:hover{background-color:#35a744}.link.active.caution{background-color:#bbbe00}.link.active.caution:hover{background-color:#d4d800}.link.active.danger{background-color:#ea0000}.link.active.danger:hover{background-color:#ff0404}.link.inactive{background-color:#999}.link.inactive.selected{background-color:#2f943c}.link.inactive.caution{background-color:#bbbe00}.link.inactive.danger{background-color:#ea0000}.link.disabled{background-color:#999}.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:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#e00}.bar .barFill.highlight{background:#8ba5c4}.statusicon{width:24px;height:24px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAABICAYAAADs+TUPAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QgOFTEusr3yRQAAA6JJREFUWMPt1k9sFUUcwPEvr9giaoxpOfgnwVs38eRhTCgauHDAkL3KHLV7VEvMJkJaIYZAwQxJURIukxovrMrBZALn+q+gWc9muEnQkz3amgcCHvrbum+zy+57bxEO73faP7M7k5n5/eYDo6iJbU0bhnGwE5iS2zVn/MbQHYRx8DTwNnAIeAmYkFdd4HfgKrDsjP+r7w7CODgJvA/sBLZXNPsH2ADOO+OPN+ogjIM3gC+BF3KP7wO3gbtyPwaMF77/AzjsjP+xtIMwDnbIiBeBTq5NF1gBloGf5Nke4B1gf27akAEcAz51xnezkWQLuAgsFEbVBYwzfvbGtbVfp2emngPGnfE/TM9MXQJ2AK/lprADHACemZ6Z+v7GtbU72UjPAnOF2boPrDjjF8I4mAzjYAn4RkaPM/4e8BHwnbTNxxxwBqATxkEEvFuyPrdlWpAfzQGvAl9lDaSTZeBOyffvhXEQdWTOyuIucD2Mg5eBvbnnrxTa/Sy7qSyObR8gOVfCOLgIrANfAPce1Lgji1sWY8AeZ/xvwGru+bPAUeB5Z/wtWZOqgS52nPEWuFDychyYleuTwHngFyAFlmRdkO36RMn3nznjbdbzhzLnc4Uc2R/GwSln/DxwJIyD3bK4N2V7nwb2lSTsEjBfTLSJXKKNFXLhW9kt13OJNiuJNl7YGEdl9N2qUvG6lIoXBygVbznjV5sWu49lyp6qKXbrUuxOtF2ubwFXgM+d8ettHDhPArvk9k9n/N+j83oUj5mL0ogeFynL8C5KIxq5SFn6d1Ea0ZeLlKWZi9KIoVykLOUuSiNadZGydLMjM1vAM8KX4s+NshxUlsvybkJZvgbeBM5Jm/wx+wlwVv5JrYuUZSGNmEwjelykLM1clEYM7CLppNJFaUS9i9KI/99FaUR7LlKWShcpS72LlOWhuUhZ6l2URpxSlnngSBqxWxb3pmzv5i5KI1p1UZZoZaViKBcpy2rTYteXi5TlRNvlestFyrLexoHT4yJlGbloFI+bixJ6XaRpwUUJzVykGcBFCf25SNPQRQnDuUhT4aKEdl2kyblIFrDSRRoOav5zkabeRfLPehdpWEhgMqHXRZqGLkoY3EXSSaWLEhq4KOERuCihRRdpql2kaeAizcNzkQa7LbdNT5fspC5wTotxEjZdpNl0UbL5zQeFXNhykYaNfKK16qIs0cpKxVAu0jR0UUJ/LtIM4KKacr3lIk0LLkrodZFm5KKW4l9LJLRjggaS5QAAAABJRU5ErkJggg==')}.statusicon.good{background-position:0 0}.statusicon.average{background-position:0 -24px}.statusicon.bad{background-position:0 -48px}body{background:#272727 url(background_nanotrasen.png) 50% 0 repeat-x}header[role=titlebar]{position:relative;height:30px}header[role=titlebar] .statusicon{position:absolute;top:4px;left:12px}header[role=titlebar] .title{position:absolute;top:6px;left:44px;height:24px;width:66%;color:#98b0c3;font-size:16px}header[role=titlebar] .logo{position:absolute;top:4px;right:12px;width:42px;height:24px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAYCAYAAACMcW/9AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QgQFygGr0oHZQAAAitJREFUSMftlr+L4lAQx+cFEUvLlIIGlG0igoiNBxaCjaSQKw+r/Zu2kqtkrQwispVso9e5jSgEIdttmUYMZGbeNRvIhqfGVbfyCwP5MZn3yczkTQDuuq5E9GS9XmfT6XRDCJGNOxLRq2EY7na7bQkh9Ph9KaWXz+dt1SKO4+Q0TcvF/D8KhcImKWjqC7UQRWY2VY7M/A4ALjPXDgVzHMc3DONFcavBzLnYNRcAEoNqsbfcEJFPRBA3Zg4ze8xqq9VKV1RDaefoC2ipVPL2+/0TEX3EgyJiElAAgE58EUSEQ/G+BQoAUC6XvYeHh6cgCFxEhKiFi54wfblc/oqDquwi0FCmaf5FxLczSw9EBFLKxmKxyEb6+2ArXQwKAFCpVGxEtM8pfWipVKpzsx5VqVqtvgVB8ExEfsLSh5abz+e1a5U+lcSpXq9votlJKillYzabbc7N3rdB41uNAsgVQuQU7hkhRAsRQQgRf+a2oKqSMfO7pmkeAKiGRREAfMXLXbdHk2zezAzNZtM+NCyIKHPoq59MJvqPgUb2WDvprhC2kKZprel02vmxjAIAtNvtDSJuzgH9PDbH4/Hvm/dotN8Q8eXzw8qcGa84Go0epZTPlmV5Ny09AIBlWV4QBK+nshkdyZHrOjM/DodD/aalD9Xtdv8RkXsMNHxGMV4zAPBnMBiYF4EmnTK73c4+Nb2OxMtIKTv9fj97Caif5Jet1+udagH/1L/DXXcBwH9LWKWf323oMQAAAABJRU5ErkJggg==') 50% 50% no-repeat} \ No newline at end of file diff --git a/nano/compiled/templates.js b/nano/assets/templates.js similarity index 61% rename from nano/compiled/templates.js rename to nano/assets/templates.js index 8f4b751bfa8..f245933354e 100644 --- a/nano/compiled/templates.js +++ b/nano/assets/templates.js @@ -1,64 +1,65 @@ -var TMPL = (function(){return { _generic:function anonymous(data, config, helper -/**/) { -var out='
Initiating...
';return out; -}, - _nanotrasen:function anonymous(data, config, helper -/**/) { -var out='
'+(config.title)+'
Initiating...
';return out; -}, - air_alarm:function anonymous(data, config, helper -/**/) { -var out='
';if(data.siliconUser){out+='
Interface Lock:
'+(helper.link('Engaged', 'locked', {'toggleaccess': 1}, data.locked ? 'selected' : null))+(helper.link('Disengaged', 'unlocked', {'toggleaccess': 1}, data.locked ? null : 'selected'))+'
';}else{if(data.locked){out+='Swipe an ID card to unlock this interface.';}else{out+='Swipe an ID card to lock this interface.';}}out+='

Air Status

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

Air Controls

';if(!data.atmos_alarm){out+=''+(helper.link('Area Atmospheric Alarm', 'hand-stop-o', {'atmos_alarm': 1}));}else{out+=''+(helper.link('Area Atmospheric Alarm', 'close', {'atmos_reset': 1}, null, 'caution'));}out+='
';if(data.mode != 3){out+=''+(helper.link('Panic Siphon', 'exclamation', {'mode': 3}));}else{out+=''+(helper.link('Panic Siphon', 'close', {'mode': 1}, null, 'danger'));}out+='

'+(helper.link('Vent Controls', 'sign-out', {'screen': 2}))+'
'+(helper.link('Scrubber Controls', 'filter', {'screen': 3}))+'

'+(helper.link('Set Environmental Mode', 'cog', {'screen': 4}))+'
'+(helper.link('Set Alarm Threshold', 'bar-chart', {'screen': 5}))+'
';}else if(data.screen == 2){out+='

Vent Controls

';var arr2=data.vents;if(arr2){var vent,i=-1,l2=arr2.length-1;while(i'+(vent.long_name)+'
Power:
';if(vent.power){out+=''+(helper.link('On', 'power-off', {'id_tag': vent.id_tag, 'command': 'power', 'val': 0}, null, null));}else{out+=''+(helper.link('Off', 'close', {'id_tag': vent.id_tag, 'command': 'power', 'val': 1}, null, 'danger'));}out+='
Mode:
';if(vent.direction == "sipho"){out+='Siphoning';}else{out+='Pressurizing';}out+='
Pressure Checks:
'+(helper.link('Internal', 'sign-in', {'id_tag': vent.id_tag, 'command': 'incheck', 'val': vent.checks}, null, vent.incheck ? 'selected' : null))+(helper.link('External', 'sign-out', {'id_tag': vent.id_tag, 'command': 'excheck', 'val': vent.checks}, null, vent.excheck ? 'selected' : null))+'
Set Pressure:
'+(helper.link(helper.fixed(vent.external), 'pencil', {'id_tag': vent.id_tag, 'command': 'set_external_pressure'}))+(helper.link('Reset', 'refresh', { 'id_tag': vent.id_tag, 'command': 'reset_external_pressure'}, vent.default ? 'disabled' : null))+'
';} } if(!data.vents.length){out+='No vents connected.';}}else if(data.screen == 3){out+='

Scrubber Controls

';var arr3=data.scrubbers;if(arr3){var scrubber,i=-1,l3=arr3.length-1;while(i'+(scrubber.long_name)+'
Power:
';if(scrubber.power){out+=''+(helper.link('On', 'power-off', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null));}else{out+=''+(helper.link('Off', 'close', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger'));}out+='
Mode:
';if(scrubber.scrubbing){out+=''+(helper.link('Scrubbing', 'filter', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null));}else{out+=''+(helper.link('Siphoning', 'sign-in', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger'));}out+='
Range:
';if(scrubber.widenet){out+=''+(helper.link('Extended', 'expand', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution'));}else{out+=''+(helper.link('Normal', 'compress', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null));}out+='
Filters:
'+(helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', {'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', {'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', {'id_tag': scrubber.id_tag, 'command': "tox_scrub", 'val': scrubber.filter_toxins ? 0 : 1}, null, scrubber.filter_toxins ? 'selected' : null))+'
';} } if(!data.scrubbers.length){out+='No scrubbers connected.';}}else if(data.screen == 4){out+='

Environmental Modes

';var arr4=data.modes;if(arr4){var mode,i=-1,l4=arr4.length-1;while(i'+(helper.link(mode.name, mode.selected ? 'check-square-o' : 'square-o', {'mode': mode.mode}, null, mode.selected ? (mode.danger ? 'danger' : 'selected') : null))+'
';} } out+='';}else if(data.screen == 5){out+='

Alarm Thresholds

';var arr5=data.thresholds;if(arr5){var threshold,i=-1,l5=arr5.length-1;while(i';var arr6=threshold.settings;if(arr6){var setting,j=-1,l6=arr6.length-1;while(j'+(helper.link(setting.selected >= 0 ? helper.round(setting.selected*100)/100 : "Off", null, {'command': 'set_threshold', 'env': setting.env, 'var': setting.val}))+'';} } out+='';} } out+='
min2min1max1max2
'+(threshold.name)+'
';}}return out; -}, - airlock_electronics:function anonymous(data, config, helper +window.TMPL = {}; +TMPL["airlock_electronics"] = function anonymous(data, config, helper /**/) { var out='
'+(helper.link(data.oneAccess ? 'One Required' : 'All Required', data.oneAccess ? 'unlock' : 'lock', {'access': 'one'}))+(helper.link('Reset', 'refresh', {'access': 'clear'}))+'
';var arr1=data.regions;if(arr1){var region,i=-1,l1=arr1.length-1;while(i'+(region.name)+'';} } out+='';var arr2=data.regions;if(arr2){var region,i=-1,l2=arr2.length-1;while(i';var arr3=region.accesses;if(arr3){var access,j=-1,l3=arr3.length-1;while(j';} } out+='';} } out+='
';return out; -}, - apc:function anonymous(data, config, helper +}; +TMPL["air_alarm"] = function anonymous(data, config, helper /**/) { -var out='
';if(data.siliconUser){out+='
Interface Lock:
'+(helper.link('Engaged', 'lock', {'toggleaccess' : 1}, data.locked ? 'selected' : null))+(helper.link('Disengaged', 'unlock', {'toggleaccess' : 1}, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected')))+'
';}else{if(data.locked){out+='Swipe an ID card to unlock this interface.';}else{out+='Swipe an ID card to lock this interface.';}}out+='

Power Status

Main Breaker:
';if(data.locked && !data.siliconUser){if(data.isOperating){out+='On';}else{out+='Off';}}else{out+=''+(helper.link('On', 'power-off', {'breaker' : 1}, data.isOperating ? 'selected' : null))+(helper.link('Off', 'close', {'breaker' : 1}, data.isOperating ? null : 'selected'));}out+='
External Power:
';if(data.externalPower == 2){out+='Good';}else if(data.externalPower == 1){out+='Low';}else{out+='None';}out+='
Power Cell:
';if(data.powerCellStatus != null){out+=''+(helper.bar(data.powerCellStatus, 0, 100, data.powerCellStatus >= 50 ? 'good' : data.powerCellStatus >= 25 ? 'average' : 'bad'))+'
'+(helper.round(data.powerCellStatus*10)/10)+'%
';}else{out+='
Power cell removed.
';}out+='
';if(data.powerCellStatus != null){out+='
Charge Mode:
';if(data.locked && !data.siliconUser){if(data.chargeMode){out+='Auto';}else{out+='Off';}}else{out+=''+(helper.link('Auto', 'refresh', {'cmode' : 1}, data.chargeMode ? 'selected' : null))+(helper.link('Off', 'close', {'cmode' : 1}, data.chargeMode ? null : 'selected'));}out+=' ';if(data.chargingStatus > 1){out+='[Fully Charged]';}else if(data.chargingStatus == 1){out+='[Charging]';}else{out+='[Not Charging]';}out+='
';}out+='

Power Channels

';var arr1=data.powerChannels;if(arr1){var channel,i=-1,l1=arr1.length-1;while(i
'+(channel.title)+':
'+(channel.powerLoad)+' W
';if(channel.status <= 1){out+='Off';}else if(channel.status >= 2){out+='On';}out+=' ';if(channel.status == 1 || channel.status == 3){out+='[Auto]';}else{out+='[Manual]';}out+='
';if(!data.locked || data.siliconUser){out+='
'+(helper.link('Auto', 'refresh', channel.topicParams.auto, (channel.status == 1 || channel.status == 3) ? 'selected' : null))+(helper.link('On', 'power-off', channel.topicParams.on, (channel.status == 2) ? 'selected' : null))+(helper.link('Off', 'close', channel.topicParams.off, (channel.status == 0) ? 'selected' : null))+'
';}out+='
';} } out+='
Total Load:
'+(data.totalLoad)+' W
';if(data.siliconUser){out+='

System Overrides

'+(helper.link('Overload Lighting Circuit', 'lightbulb', {'overload' : 1}))+'
';if(data.malfStatus == 1){out+=''+(helper.link('Override Programming', 'script', {'malfhack' : 1}));}else if(data.malfStatus == 2){out+=''+(helper.link('Shunt Core Processes', 'arrowreturn-1-s', {'occupyapc' : 1}));}else if(data.malfStatus == 3){out+=''+(helper.link('Return to Main Core', 'arrowreturn-1-w', {'deoccupyapc' : 1}));}else if(data.malfStatus == 4){out+=''+(helper.link('Shunt Core Processes', 'arrowreturn-1-s', {'occupyapc' : 1}, 'linkOff'));}out+='
';}out+='
Cover Lock:
';if(data.locked && !data.siliconUser){if(data.coverLocked){out+='Engaged';}else{out+='Disengaged';}}else{out+=''+(helper.link('Engaged', 'lock', {'lock' : 1}, data.coverLocked ? 'selected' : null))+(helper.link('Disengaged', 'unlock', {'lock' : 1}, data.coverLocked ? null : 'selected'));}out+='
';return out; -}, - atmos_filter:function anonymous(data, config, helper +var out='
';if(data.siliconUser){out+='
Interface Lock:
'+(helper.link('Engaged', 'lock', {'toggleaccess': 1}, data.locked ? 'selected' : null))+(helper.link('Disengaged', 'unlock', {'toggleaccess': 1}, data.locked ? null : 'selected'))+'
';}else{if(data.locked){out+='Swipe an ID card to unlock this interface.';}else{out+='Swipe an ID card to lock this interface.';}}out+='

Air Status

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

Air Controls

';if(!data.atmos_alarm){out+=''+(helper.link('Area Atmospheric Alarm', 'hand-stop-o', {'atmos_alarm': 1}));}else{out+=''+(helper.link('Area Atmospheric Alarm', 'close', {'atmos_reset': 1}, null, 'caution'));}out+='
';if(data.mode != 3){out+=''+(helper.link('Panic Siphon', 'exclamation', {'mode': 3}));}else{out+=''+(helper.link('Panic Siphon', 'close', {'mode': 1}, null, 'danger'));}out+='

'+(helper.link('Vent Controls', 'sign-out', {'screen': 2}))+'
'+(helper.link('Scrubber Controls', 'filter', {'screen': 3}))+'

'+(helper.link('Set Environmental Mode', 'cog', {'screen': 4}))+'
'+(helper.link('Set Alarm Threshold', 'bar-chart', {'screen': 5}))+'
';}else if(data.screen == 2){var arr2=data.vents;if(arr2){var vent,i=-1,l2=arr2.length-1;while(i

'+(vent.long_name)+'

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

'+(scrubber.long_name)+'

Power:
';if(scrubber.power){out+=''+(helper.link('On', 'power-off', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null));}else{out+=''+(helper.link('Off', 'close', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger'));}out+='
Mode:
';if(scrubber.scrubbing){out+=''+(helper.link('Scrubbing', 'filter', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null));}else{out+=''+(helper.link('Siphoning', 'sign-in', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger'));}out+='
Range:
';if(scrubber.widenet){out+=''+(helper.link('Extended', 'expand', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution'));}else{out+=''+(helper.link('Normal', 'compress', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null));}out+='
Filters:
'+(helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', {'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', {'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', {'id_tag': scrubber.id_tag, 'command': "tox_scrub", 'val': scrubber.filter_toxins ? 0 : 1}, null, scrubber.filter_toxins ? 'selected' : null))+'
';} } if(!data.scrubbers.length){out+='No scrubbers connected.';}}else if(data.screen == 4){out+='

Environmental Modes

';var arr4=data.modes;if(arr4){var mode,i=-1,l4=arr4.length-1;while(i'+(helper.link(mode.name, mode.selected ? 'check-square-o' : 'square-o', {'mode': mode.mode}, null, mode.selected ? (mode.danger ? 'danger' : 'selected') : null))+'';} } out+='';}else if(data.screen == 5){out+='

Alarm Thresholds

';var arr5=data.thresholds;if(arr5){var threshold,i=-1,l5=arr5.length-1;while(i';var arr6=threshold.settings;if(arr6){var setting,j=-1,l6=arr6.length-1;while(j'+(helper.link(setting.selected >= 0 ? helper.round(setting.selected*100)/100 : "Off", null, {'command': 'set_threshold', 'env': setting.env, 'var': setting.val}))+'';} } out+='';} } out+='
min2min1max1max2
'+(threshold.name)+'
';}}return out; +}; +TMPL["apc"] = function anonymous(data, config, helper +/**/) { +var out='
';if(data.siliconUser){out+='
Interface Lock:
'+(helper.link('Engaged', 'lock', {'toggleaccess': 1}, data.locked ? 'selected' : null))+(helper.link('Disengaged', 'unlock', {'toggleaccess' : 1}, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected')))+'
';}else{if(data.locked){out+='Swipe an ID card to unlock this interface.';}else{out+='Swipe an ID card to lock this interface.';}}out+='

Power Status

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

Power Channels

';var arr1=data.powerChannels;if(arr1){var channel,i=-1,l1=arr1.length-1;while(i'+(channel.title)+':
'+(channel.powerLoad)+' W
';if(channel.status <= 1){out+='Off';}else if(channel.status >= 2){out+='On';}out+=' ';if(channel.status == 1 || channel.status == 3){out+='[Auto]';}else{out+='[Manual]';}out+='
';if(!data.locked || data.siliconUser){out+='
'+(helper.link('Auto', 'refresh', channel.topicParams.auto, (channel.status == 1 || channel.status == 3) ? 'selected' : null))+(helper.link('On', 'power-off', channel.topicParams.on, (channel.status == 2) ? 'selected' : null))+(helper.link('Off', 'close', channel.topicParams.off, (channel.status == 0) ? 'selected' : null))+'
';}out+='';} } out+='
Total Load:
'+(data.totalLoad)+' W
';if(data.siliconUser){out+='

System Overrides

'+(helper.link('Overload Lighting Circuit', 'lightbulb-o', {'overload' : 1}))+'
';if(data.malfStatus == 1){out+=''+(helper.link('Override Programming', 'terminal', {'malfhack' : 1}));}else if(data.malfStatus == 2){out+=''+(helper.link('Shunt Core Processes', 'caret-square-o-down', {'occupyapc' : 1}));}else if(data.malfStatus == 3){out+=''+(helper.link('Return to Main Core', 'carat-square-o-left', {'deoccupyapc' : 1}));}else if(data.malfStatus == 4){out+=''+(helper.link('Shunt Core Processes', 'caret-square-o-down', {'occupyapc' : 1}, 'linkOff'));}out+='
';}out+='
Cover Lock:
';if(data.locked && !data.siliconUser){if(data.coverLocked){out+='Engaged';}else{out+='Disengaged';}}else{out+=''+(helper.link('Engaged', 'lock', {'lock' : 1}, data.coverLocked ? 'selected' : null))+(helper.link('Disengaged', 'unlock', {'lock' : 1}, data.coverLocked ? null : 'selected'));}out+='
';return out; +}; +TMPL["atmos_filter"] = function anonymous(data, config, helper /**/) { var out='
Power:
'+(helper.link(data.on? 'On' : 'Off', data.on? 'power' : 'close', {'power' : 1}))+'
Output Pressure:
'+(helper.link('Set', 'pencil', {'set_press' : 'set'}))+(helper.link('Max', 'plus', {'set_press' : 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null))+(data.set_pressure)+' kPa
Filter:
'+(helper.link('Plasma', null, {'filterset' : 0}, (data.filter_type == 0)? 'selected' : null))+(helper.link('O2', null, {'filterset' : 1}, (data.filter_type == 1)? 'selected' : null))+(helper.link('N2', null, {'filterset' : 2}, (data.filter_type == 2)? 'selected' : null))+(helper.link('CO2', null, {'filterset' : 3}, (data.filter_type == 3)? 'selected' : null))+(helper.link('N2O', null, {'filterset' : 4}, (data.filter_type == 4)? 'selected' : null))+(helper.link('Nothing', null, {'filterset' : -1}, (data.filter_type == -1)? 'selected' : null))+'
';return out; -}, - atmos_mixer:function anonymous(data, config, helper +}; +TMPL["atmos_mixer"] = function anonymous(data, config, helper /**/) { var out='
Power:
'+(helper.link(data.on? 'On' : 'Off', data.on? 'power' : 'close', {'power' : 1}))+'
Output Pressure:
'+(helper.link('Set', 'pencil', {'set_press' : 'set'}))+(helper.link('Max', 'plus', {'set_press' : 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null))+(data.set_pressure)+' kPa
Node 1:
'+(helper.link('', 'seek-start', {'node1_c' : '-0.1'}, null))+(helper.link('', 'triangle-1-w', {'node1_c' : '-0.01'}, null))+(helper.link('', 'triangle-1-e', {'node1_c' : '0.01'}, null))+(helper.link('', 'seek-end', {'node1_c' : '0.1'}, null))+(data.node1_concentration)+'%
Node 2:
'+(helper.link('', 'seek-start', {'node2_c' : '-0.1'}, null))+(helper.link('', 'triangle-1-w', {'node2_c' : '-0.01'}, null))+(helper.link('', 'triangle-1-e', {'node2_c' : '0.01'}, null))+(helper.link('', 'seek-end', {'node2_c' : '0.1'}, null))+(data.node2_concentration)+'%
';return out; -}, - atmos_pump:function anonymous(data, config, helper +}; +TMPL["atmos_pump"] = function anonymous(data, config, helper /**/) { var out='
Power:
'+(helper.link(data.on? 'On' : 'Off', data.on? 'power' : 'close', {'power' : 1}))+'
';if(data.max_rate){out+='
Transfer Rate:
'+(helper.link('Set', 'pencil', {'set_transfer_rate' : 'set'}))+(helper.link('Max', 'plus', {'set_transfer_rate' : 'max'}, data.transfer_rate == data.max_rate ? 'disabled' : null))+(data.transfer_rate)+' L/s
';}else{out+='
Output Pressure:
'+(helper.link('Set', 'pencil', {'set_press' : 'set'}))+(helper.link('Max', 'plus', {'set_press' : 'max'}, data.set_pressure == data.max_pressure ? 'disabled' : null))+(data.set_pressure)+' kPa
';}return out; -}, - canister:function anonymous(data, config, helper +}; +TMPL["canister"] = function anonymous(data, config, helper /**/) { var out='';if(data.hasHoldingTank){out+='
The regulator is connected to a tank.
';}else{out+='
The regulator is not connected to a tank.
';}out+='

Canister

'+(helper.link('Relabel', 'pencil', {'relabel' : 1}, data.canLabel ? null : 'disabled'))+'
Pressure:
'+(data.tankPressure)+' kPa
Port:
';if(data.portConnected){out+='Connected';}else{out+='Disconnected';}out+='

Valve

Release Pressure:
'+(helper.bar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure))+(data.releasePressure)+' kPa
Pressure Regulator:
'+(helper.link('Reset', 'refresh', {'release_p': 'reset'}, (data.releasePressure != data.defaultReleasePressure) ? null : 'disabled'))+(helper.link('Min', 'minus', {'release_p': 'min'}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled'))+(helper.link('Set', 'pencil', {'release_p': 'custom'}, null))+(helper.link('Max', 'plus', {'release_p': 'max'}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled'))+'
'+(helper.link('Open', 'unlock', {'toggle' : 1}, data.valveOpen ? 'selected' : null))+(helper.link('Close', 'lock', {'toggle' : 1}, data.valveOpen ? null : 'selected'))+'

Holding Tank

';if(data.hasHoldingTank){out+=''+(helper.link('Eject', 'eject', {'remove_tank' : 1}))+'
Label:
'+(data.holdingTank.name)+'
Tank Pressure:
'+(data.holdingTank.tankPressure)+' kPa
';}else{out+='
No Holding Tank
';}return out; -}, - chem_dispenser:function anonymous(data, config, helper +}; +TMPL["chem_dispenser"] = function anonymous(data, config, helper /**/) { var out='

Status

Energy:
'+(helper.bar(data.energy, 0, data.maxEnergy, 'good'))+(data.energy)+' Units
Amount:
';var arr1=data.beakerTransferAmounts;if(arr1){var amount,i=-1,l1=arr1.length-1;while(i
';var arr3=data.beakerTransferAmounts;if(arr3){var amount,i=-1,l3=arr3.length-1;while(i
';if(data.beakerContents.length){var arr4=data.beakerContents;if(arr4){var reagent,i=-1,l4=arr4.length-1;while(i'+(reagent.volume)+' units of '+(reagent.name)+'
';} } }else{out+='Beaker Empty';}}else{out+='No Beaker Loaded';}out+='
';return out; -}, - chem_heater:function anonymous(data, config, helper +}; +TMPL["chem_heater"] = function anonymous(data, config, helper /**/) { var out='

Status

Power:
'+(helper.link(data.isActive ? 'On' : 'Off', data.isActive ? 'power' : 'close', {'toggle_on' : 1}, data.isBeakerLoaded ? null : 'disabled'))+'
Target:
'+(helper.link(data.targetTemp + 'K', 'pencil', {'adjust_temperature' : 'input'}))+'

Beaker

'+(helper.link('Eject', 'eject', {'eject_beaker' : 1}, data.isBeakerLoaded ? null : 'disabled'))+'
Contents:
';if(data.isBeakerLoaded){out+='Temperature: '+(data.currentTemp)+'K
';if(data.beakerContents.length){var arr1=data.beakerContents;if(arr1){var reagent,i=-1,l1=arr1.length-1;while(i'+(reagent.volume)+' units of '+(reagent.name)+'
';} } }else{out+='Beaker Empty';}}else{out+='No Beaker Loaded';}out+='
';return out; -}, - cryo:function anonymous(data, config, helper +}; +TMPL["cryo"] = function anonymous(data, config, helper /**/) { var out='

Occupant

Occupant:
';if(data.hasOccupant){out+=''+(data.occupant.name);}else{out+='No Occupant';}out+='
';if(data.hasOccupant){out+='
State:
';if(data.occupant.stat == 0){out+='Conscious';}else if(data.occupant.stat == 1){out+='Unconscious';}else{out+='Dead';}out+='
Temperature:
'+(helper.round(data.occupant.bodyTemperature))+' K
';}if(data.occupant.stat < 2){out+='
Health:
';if(data.occupant.health >= 0){out+=''+(helper.bar(data.occupant.health, 0, data.occupant.maxHealth, 'good'));}else{out+=''+(helper.bar(data.occupant.health, 0, data.occupant.minHealth, 'average'));}out+=''+(helper.round(data.occupant.health))+'
Brute:
'+(helper.bar(data.occupant.bruteLoss, 0, data.occupant.maxHealth, 'bad'))+(helper.round(data.occupant.bruteLoss))+'
Respiratory:
'+(helper.bar(data.occupant.oxyLoss, 0, data.occupant.maxHealth, 'bad'))+(helper.round(data.occupant.oxyLoss))+'
Toxin:
'+(helper.bar(data.occupant.toxLoss, 0, data.occupant.maxHealth, 'bad'))+(helper.round(data.occupant.toxLoss))+'
Burn:
'+(helper.bar(data.occupant.fireLoss, 0, data.occupant.maxHealth, 'bad'))+(helper.round(data.occupant.fireLoss))+'
';}out+='

Cell

Power:
'+(helper.link('On', 'power', {'switchOn': 1}, data.isOperating ? 'selected' : null))+(helper.link('Off', 'close', {'switchOff': 1}, data.isOperating ? null : 'selected'))+'
Temperature:
'+(data.cellTemperature)+' K
Door:
'+(helper.link('Open', 'unlocked', {'openCell' : 1}, data.isOpen ? 'disabled' : null))+(helper.link('Close', 'locked', {'closeCell' : 1}, data.isOpen ? null : 'disabled'))+'
Eject:
'+(helper.link('Auto', 'eject', {'autoEject' : 1}, data.autoEject ? 'selected' : null))+(helper.link('Manual', 'pin-s', {'autoEject' : 0}, data.autoEject ? null : 'selected'))+'

Beaker

'+(helper.link('Eject', 'eject', {'ejectBeaker' : 1}, data.isBeakerLoaded ? null : 'disabled'))+'
Contents:
';if(data.isBeakerLoaded){if(data.beakerContents.length){var arr1=data.beakerContents;if(arr1){var reagent,i=-1,l1=arr1.length-1;while(i'+(reagent.volume)+' units of '+(reagent.name)+'
';} } }else{out+='Beaker Empty';}}else{out+='No Beaker Loaded';}out+='
';return out; -}, - smes:function anonymous(data, config, helper +}; +TMPL["smes"] = function anonymous(data, config, helper /**/) { var out='

Storage

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

Input

Charge Mode:
'+(helper.link('Auto', 'refresh', {'input_attempt': 1}, data.inputAttempt ? 'selected' : null))+(helper.link('Off', 'close', {'input_attempt': 0}, data.inputAttempt ? null : 'selected'))+' ';if(data.capacityPercent >= 99){out+='[Fully Charged]';}else if(data.inputting){out+='[Charging]';}else{out+='[Not Charging]';}out+='
Input Setting:
'+(helper.bar(data.inputLevel, 0, data.inputLevelMax))+' '+(data.inputLevel)+' W
'+(helper.link('', 'fast-backward', {'set_input_level': '0'}, data.inputLevel ? null : 'selected'))+(helper.link('', 'backward', {'set_input_level': 'minus'}, data.inputLevel ? null : 'disabled'))+(helper.link('Set', 'pencil', {'set_input_level': 'custom'}, null))+(helper.link('', 'forward', {'set_input_level': 'plus'}, data.inputLevel == data.inputLevelMax ? 'disabled' : null))+(helper.link('', 'fast-forward', {'set_input_level': 'max'}, data.inputLevel == data.inputLevelMax ? 'selected' : null))+'
Available:
'+(data.inputAvailable)+' W

Output

Charge Mode:
'+(helper.link('On', 'power-off', {'output_attempt': 1}, data.outputAttempt ? 'selected' : null))+(helper.link('Off', 'close', {'output_attempt': 0}, data.outputAttempt ? null : 'selected'))+' ';if(data.outputting){out+='[Sending]';}else if(data.charge > 0){out+='[Not Sending]';}else{out+='[No Charge]';}out+='
Output Setting:
'+(helper.bar(data.outputLevel, 0, data.outputLevelMax))+' '+(data.outputLevel)+' W
'+(helper.link('', 'fast-backward', {'set_output_level': '0'}, data.outputLevel ? null : 'selected'))+(helper.link('', 'backward', {'set_output_level': 'minus'}, data.outputLevel ? null : 'disabled'))+(helper.link('Set', 'pencil', {'set_output_level': 'custom'}, null))+(helper.link('', 'forward', {'set_output_level': 'plus'}, data.outputLevel == data.outputLevelMax ? 'disabled' : null))+(helper.link('', 'fast-forward', {'set_output_level': 'max'}, data.outputLevel == data.outputLevelMax ? 'selected' : null))+'
Outputting:
'+(data.outputUsed)+' W
';return out; -}, - solar_control:function anonymous(data, config, helper +}; +TMPL["solar_control"] = function anonymous(data, config, helper /**/) { var out='

Status

Generated Power:
'+(data.generated)+' W
Orientation:
'+(data.angle)+'° ('+(data.direction)+')'+(helper.link('15°', 'minus', {'rate_control': '1', 'cdir': '-15'}))+(helper.link('1°', 'minus', {'rate_control': '1', 'cdir': '-1'}))+(helper.link('1°', 'plus', {'rate_control': '1', 'cdir': '1'}))+(helper.link('15°', 'plus', {'rate_control': '1', 'cdir': '15'}))+'

Tracking

Tracker Mode:
'+(helper.link('Off', 'close', {'track': '0'}, (data.tracking_state == 0) ? 'selected' : ''))+(helper.link('Timed', 'clock', {'track': '1'}, (data.tracking_state == 1) ? 'selected' : ''));if(data.connected_tracker){out+=''+(helper.link('Auto', 'signal-diag', {'track': '2'}, (data.tracking_state == 2) ? 'selected' : ''));}else{out+=''+(helper.link('Auto', 'signal-diag', null, 'disabled'));}out+='
Tracking Rate:
'+(data.tracking_rate)+' deg/h ('+(data.rotating_way)+')'+(helper.link('180°', 'minus', {'rate_control': '1', 'tdir': '-180'}))+(helper.link('30°', 'minus', {'rate_control': '1', 'tdir': '-30'}))+(helper.link('1°', 'minus', { 'rate_control': '1', 'tdir': '-1'}))+(helper.link('1°', 'plus', { 'rate_control': '1', 'tdir': '1'}))+(helper.link('30°', 'plus', { 'rate_control': '1', 'tdir': '30'}))+(helper.link('180°', 'plus', { 'rate_control': '1', 'tdir': '180'}))+'

Devices

Solar Tracker:
';if(data.connected_tracker){out+='Found';}else{out+='Not Found';}out+='
Solars Panels:
'+(data.connected_panels)+' Connected
'+(helper.link('', 'refresh', {'search_connected': '1'}))+'
';return out; -}, - space_heater:function anonymous(data, config, helper +}; +TMPL["space_heater"] = function anonymous(data, config, helper /**/) { var out='

Status

Power:
'+(helper.link('On', 'power', {'power': 1}, !data.on ? null : 'selected'))+(helper.link('Off', 'close', {'power': 0}, data.on ? null : 'selected'))+'
Stored Energy:
';if(data.hasPowercell){out+=''+(helper.bar(data.powerLevel, 0, 100, 'good'))+' '+(data.powerLevel)+'%';if(data.open){out+='
'+(helper.link('Eject', 'eject', {'cellremove' : 1}, null));}}else{out+='No power cell loaded.';if(data.open){out+=''+(helper.link('Install', 'eject', {'cellinstall' : 1}, null ));}}out+='

Thermostat

Current Temp:
'+(data.currentTemp)+'°C
Target Temp:
'+(data.targetTemp)+'°C';if(data.open){out+='
'+(helper.link('','seek-prev',{'temp': -20}, data.targetTemp > data.minTemp ? null : 'disabled'))+(helper.link('','triangle-1-w', {'temp': -5}, data.targetTemp > data.minTemp ? null : 'disabled'))+(helper.link('Set', 'pencil', {'temp': 'custom'}, null))+(helper.link('','triangle-1-e', {'temp': 5}, data.targetTemp < data.maxTemp ? null : 'disabled'))+(helper.link('','seek-next',{'temp': 20}, data.targetTemp < data.maxTemp ? null : 'disabled'));}out+='
Operational Mode:
';if(data.open){out+=''+(helper.link('Heat', 'arrowthick-1-n', {'mode' : 'heat'}, data.mode != "heat" ? null : 'selected'))+(helper.link('Cool', 'arrowthick-1-s', {'mode' : 'cool'}, data.mode != "cool" ? null : 'selected'))+(helper.link('Auto', 'arrowthick-2-n-s', {'mode' : 'auto'}, (data.mode == "heat" || data.mode == "cool") ? null : 'selected'));}else{if(data.mode == "heat"){out+='Heat';}else if(data.mode == "cool"){out+='Cool';}else{out+='Auto';}}out+='
';return out; -}, - tanks:function anonymous(data, config, helper +}; +TMPL["tanks"] = function anonymous(data, config, helper /**/) { var out='';if(data.maskConnected){out+='
The regulator is connected to a mask.
';}else{out+='
The regulator is not connected to a mask.
';}out+='
Tank Pressure:
'+(helper.bar(data.tankPressure, 0, 1013, (data.tankPressure > 200) ? 'good' : ((data.tankPressure > 100) ? 'average' : 'bad')))+(data.tankPressure)+' kPa
Release Pressure:
'+(helper.bar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure))+(data.releasePressure)+' kPa
Pressure Regulator:
'+(helper.link('Reset', 'refresh', {'dist_p': 'reset'}, (data.releasePressure != data.defaultReleasePressure) ? null : 'disabled'))+(helper.link('Min', 'minus', {'dist_p': 'min'}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled'))+(helper.link('Set', 'pencil', {'dist_p': 'custom'}, null))+(helper.link('Max', 'plus', {'dist_p': 'max'}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled'))+'
'+(helper.link('Open', 'unlock', {'stat': 1}, data.maskConnected ? (data.valveOpen ? 'selected' : null) : 'disabled'))+(helper.link('Close', 'lock', {'stat': 1}, data.valveOpen ? null : 'selected'))+'
';return out; -} };}()); \ No newline at end of file +}; +TMPL["_generic"] = function anonymous(data, config, helper +/**/) { +var out='
Initiating...
';return out; +}; +TMPL["_nanotrasen"] = function anonymous(data, config, helper +/**/) { +var out='
'+(config.title)+'
Initiating...
';return out; +}; \ No newline at end of file diff --git a/nano/bower.json b/nano/bower.json new file mode 100644 index 00000000000..a49aeb17192 --- /dev/null +++ b/nano/bower.json @@ -0,0 +1,40 @@ +{ + "name": "nanoui", + "private": true, + "dependencies": { + "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", + "jsurl": "*", + "normalize-css": "normalize.css#~3.0.3" + }, + "overrides": { + "IE8": { + "main": "build/ie8.max.js" + }, + "DOM4": { + "dependencies": { + "IE8": "*" + } + }, + "eddy-js": { + "main": "build/eddy.dom.max.js", + "dependencies": { + "IE8": "*", + "DOM4": "*" + } + }, + "font-awesome": { + "main": ["css/font-awesome.css", "fonts/*"] + }, + "jsurl": { + "dependencies": { + "es5-shim": "*" + } + } + } +} diff --git a/nano/coffeelint.json b/nano/coffeelint.json new file mode 100644 index 00000000000..8b80bb6c787 --- /dev/null +++ b/nano/coffeelint.json @@ -0,0 +1,6 @@ +{ + "max_line_length": { + "name": "max_line_length", + "level": "ignore" + } +} diff --git a/nano/compiled/_generic.css b/nano/compiled/_generic.css deleted file mode 100644 index 158dcb0b32a..00000000000 --- a/nano/compiled/_generic.css +++ /dev/null @@ -1 +0,0 @@ -h1,h2,h3{padding:6px 0;margin:0;clear:both}body,h1,h2,h3,ul{margin:0}.clearBoth,h1,h2,h3{clear:both}body{padding:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;line-height:170%;color:#fff}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;height:1px;border:none}ul{padding:4px 0 0 10px;list-style-type:none}ul li{padding:0 0 2px}noscript{margin:33% auto;width:50%;height:33%;background:#fff;border:2px solid red;z-index:9999;padding:0 10px;text-align:center}#statusicon{width:24px;height:24px;background:url(statusicon.png) no-repeat}.bar,.link,.notice img{height:16px}.link,.link.active{background-color:#40628a}#statusicon.good{background-position:0 0}#statusicon.average{background-position:0 -24px}#statusicon.bad{background-position:0 -48px}.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.label{color:#e9C183}.highlight{color:#8ba5c4}.dark{color:#272727}#loading,.bold,.notice,.noticePlaceholder{font-weight:700}#loading,.italic,.notice,.noticePlaceholder{font-style:italic}.fontReset,.link{color:#fff;font-size:12px;font-style:normal;text-decoration:none;font-weight:400}.hidden{display:none}.link,.link i.main{display:inline-block}.clearLeft{clear:left}.clearRight{clear:right}#content,.item,.itemGroup,.line,div.notice{clear:both}.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}.link{margin:2px;padding:0 4px 4px;border:1px solid #111010;box-sizing:content-box;white-space:nowrap;cursor:default}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.pending,.link.pending i.main{display:none}.item,.link.pending i.pending{display:inline-block}.link.active:hover{background-color:#486e9b}.link.active.selected{background-color:#2f943c}.link.active.selected:hover{background-color:#35a744}.link.active.caution{background-color:#adaf00}.link.active.caution:hover{background-color:#c6c900}.link.active.danger{background-color:#ea0000}.link.active.danger:hover{background-color:#ff0404}.link.inactive{background-color:#999}.link.inactive.selected{background-color:#2f943c}.link.inactive.caution{background-color:#adaf00}.link.inactive.danger{background-color:#ea0000}.link.disabled{background-color:#999}#loading,.notice,.noticePlaceholder{padding:2px 4px;margin:4px 0;color:#000;background:url(background_notice.jpg) 50% 50%}.noticePlaceholder{color:#fff;background:0 0}.notice img{position:absolute;top:0;left:0;width:16px}.itemGroup{border:1px solid #e9c183;background:#2c2c2c;padding:4px}.block,.statusDisplay{border:1px solid #40628a}.item{width:100%}.itemContent,.itemContentNarrow{float:left}.itemContentNarrow{width:30%}.itemContent{width:69%}.itemLabel,.itemLabelNarrow,.itemLabelWide,.itemLabelWider,.itemLabelWidest{float:left;color:#e9c183}.itemLabelNarrow{width:20%}.itemLabel{width:30%}.itemLabelWide{width:45%}.itemLabelWider{width:69%}.itemLabelWidest{width:100%}.itemContentWide{float:left;width:79%}.itemContentSmall{float:left;width:33%}.itemContentMedium{float:left;width:55%}.statusDisplay{display:block;position:relative;background:#000;color:#fff;padding:4px;margin:2px}.statusDisplay .itemLabel,.statusDisplay .itemLabelNarrow,.statusDisplay .itemLabelWide,.statusDisplay .itemLabelWider,.statusDisplay .itemLabelWidest{color:#98B0C3}.block{padding:8px;margin:10px 4px 4px;background-color:#202020}.line{width:100%}.fixedLeft{width:110px;float:left}.fixedLeftWide{width:165px;float:left}.fixedLeftWider{width:220px;float:left}.fixedLeftWidest{width:250px;float:left}.fixedLeftWiderRed{width:220px;float:left;background:#e00}.bar{position:relative;width:236px;border:1px solid #666;float:left;margin:0 5px 0 0;overflow:hidden;background:#000;box-sizing:border-box}.bar .barText{position:absolute;top:-2px;left:5px;width:100%;height:100%;color:#fff;font-weight:400}.bar .barFill{width:0;height:100%;background:#40628a;overflow:hidden;float:left}.bar .barFill.good{background:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#ea0000}.bar .barFill.highlight{background:#8BA5C4}body{background:url(background.png) 50% 0 repeat-x #272727}#content{padding:8px} \ No newline at end of file diff --git a/nano/compiled/_nanotrasen.css b/nano/compiled/_nanotrasen.css deleted file mode 100644 index dbc3992c6cb..00000000000 --- a/nano/compiled/_nanotrasen.css +++ /dev/null @@ -1 +0,0 @@ -h1,h2,h3{padding:6px 0;margin:0;clear:both}body,h1,h2,h3,ul{margin:0}#content,.clearBoth,h1,h2,h3{clear:both}#titletext,.bar,.bar .barFill{overflow:hidden}body{padding:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;line-height:170%;color:#fff}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;height:1px;border:none}ul{padding:4px 0 0 10px;list-style-type:none}ul li{padding:0 0 2px}noscript{margin:33% auto;width:50%;height:33%;background:#fff;border:2px solid red;z-index:9999;padding:0 10px;text-align:center}#statusicon{width:24px;height:24px;background:url(statusicon.png) no-repeat}.bar,.link,.notice img{height:16px}.link,.link.active{background-color:#40628a}#statusicon.good{background-position:0 0}#statusicon.average{background-position:0 -24px}#statusicon.bad{background-position:0 -48px}.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.label{color:#e9C183}.highlight{color:#8ba5c4}.dark{color:#272727}#loading,.bold,.notice,.noticePlaceholder{font-weight:700}#loading,.italic,.notice,.noticePlaceholder{font-style:italic}.fontReset,.link{color:#fff;font-size:12px;font-style:normal;text-decoration:none;font-weight:400}.hidden{display:none}.link,.link i.main{display:inline-block}.clearLeft{clear:left}.clearRight{clear:right}.item,.itemGroup,.line,div.notice{clear:both}.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}.link{margin:2px;padding:0 4px 4px;border:1px solid #111010;box-sizing:content-box;white-space:nowrap;cursor:default}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.pending,.link.pending i.main{display:none}.item,.link.pending i.pending{display:inline-block}.link.active:hover{background-color:#486e9b}.link.active.selected{background-color:#2f943c}.link.active.selected:hover{background-color:#35a744}.link.active.caution{background-color:#adaf00}.link.active.caution:hover{background-color:#c6c900}.link.active.danger{background-color:#ea0000}.link.active.danger:hover{background-color:#ff0404}.link.inactive{background-color:#999}.link.inactive.selected{background-color:#2f943c}.link.inactive.caution{background-color:#adaf00}.link.inactive.danger{background-color:#ea0000}.link.disabled{background-color:#999}#loading,.notice,.noticePlaceholder{padding:2px 4px;margin:4px 0;color:#000;background:url(background_notice.jpg) 50% 50%}.noticePlaceholder{color:#fff;background:0 0}.notice img{position:absolute;top:0;left:0;width:16px}.itemGroup{border:1px solid #e9c183;background:#2c2c2c;padding:4px}.block,.statusDisplay{border:1px solid #40628a}.item{width:100%}.itemContent,.itemContentNarrow{float:left}.itemContentNarrow{width:30%}.itemContent{width:69%}.itemLabel,.itemLabelNarrow,.itemLabelWide,.itemLabelWider,.itemLabelWidest{float:left;color:#e9c183}.itemLabelNarrow{width:20%}.itemLabel{width:30%}.itemLabelWide{width:45%}.itemLabelWider{width:69%}.itemLabelWidest{width:100%}.itemContentWide{float:left;width:79%}.itemContentSmall{float:left;width:33%}.itemContentMedium{float:left;width:55%}.statusDisplay{display:block;position:relative;background:#000;color:#fff;padding:4px;margin:2px}#content,.block{padding:8px}.statusDisplay .itemLabel,.statusDisplay .itemLabelNarrow,.statusDisplay .itemLabelWide,.statusDisplay .itemLabelWider,.statusDisplay .itemLabelWidest{color:#98B0C3}.block{margin:10px 4px 4px;background-color:#202020}.line{width:100%}.fixedLeft{width:110px;float:left}.fixedLeftWide{width:165px;float:left}.fixedLeftWider{width:220px;float:left}.fixedLeftWidest{width:250px;float:left}.fixedLeftWiderRed{width:220px;float:left;background:#e00}.bar{position:relative;width:236px;border:1px solid #666;float:left;margin:0 5px 0 0;background:#000;box-sizing:border-box}.bar .barText{position:absolute;top:-2px;left:5px;width:100%;height:100%;color:#fff;font-weight:400}#statusicon,#titlelogo{position:absolute;top:4px}.bar .barFill{width:0;height:100%;background:#40628a;float:left}.bar .barFill.good{background:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#ea0000}.bar .barFill.highlight{background:#8BA5C4}body{background:url(background_nanotrasen.png) 50% 0 repeat-x #272727}#title{position:relative;height:30px}#statusicon{left:12px}#titletext{position:absolute;top:6px;left:44px;width:66%;color:#E9C183;font-size:16px}#titlelogo{right:12px;width:42px;height:24px;background:url(logo_nanotrasen.png) 50% 50% no-repeat} \ No newline at end of file diff --git a/nano/compiled/background.png b/nano/compiled/background.png deleted file mode 100644 index 424b59cb76a..00000000000 Binary files a/nano/compiled/background.png and /dev/null differ diff --git a/nano/compiled/background_nanotrasen.png b/nano/compiled/background_nanotrasen.png deleted file mode 100644 index 5ff6e7e453b..00000000000 Binary files a/nano/compiled/background_nanotrasen.png and /dev/null differ diff --git a/nano/compiled/background_notice.jpg b/nano/compiled/background_notice.jpg deleted file mode 100644 index cd7b89fa9f0..00000000000 Binary files a/nano/compiled/background_notice.jpg and /dev/null differ diff --git a/nano/compiled/background_syndicate.png b/nano/compiled/background_syndicate.png deleted file mode 100644 index ee434c2d652..00000000000 Binary files a/nano/compiled/background_syndicate.png and /dev/null differ diff --git a/nano/compiled/generic.css b/nano/compiled/generic.css deleted file mode 100644 index e573873fdd5..00000000000 --- a/nano/compiled/generic.css +++ /dev/null @@ -1 +0,0 @@ -h1,h2,h3{padding:6px 0;margin:0;clear:both}body,h1,h2,h3,ul{margin:0}.clearBoth,h1,h2,h3{clear:both}body{padding:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;line-height:170%;color:#fff}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;height:1px;border:none}ul{padding:4px 0 0 10px;list-style-type:none}ul li{padding:0 0 2px}noscript{margin:33% auto;width:50%;height:33%;background:#fff;border:2px solid red;z-index:9999;padding:0 10px;text-align:center}#statusicon{width:24px;height:24px;background:url(statusicon.png) no-repeat}.bar,.link,.notice img{height:16px}#statusicon.good{background-position:0 0}#statusicon.average{background-position:0 -24px}#statusicon.bad{background-position:0 -48px}.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.label{color:#e9C183}.highlight{color:#8ba5c4}.dark{color:#272727}#loading,.bold,.notice,.noticePlaceholder{font-weight:700}#loading,.italic,.notice,.noticePlaceholder{font-style:italic}.fontReset,.link{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.hidden{display:none}.link,.link i.main{display:inline-block}.clearLeft{clear:left}.clearRight{clear:right}#content,.item,.itemGroup,.line,div.notice{clear:both}.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}.link{margin:2px;padding:0 4px 4px;border:1px solid #111010;box-sizing:content-box;cursor:default}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.pending,.link.pending i.main{display:none}.item,.link.pending i.pending{display:inline-block}.link.normal.active{background:#40628a}.link.normal.active:hover{background:#507bad}.link.normal.inactive{background:#40628a}.link.normal.pending{background:#304967}.link.selected.active{background:#2f943c}.link.selected.active:hover{background:#3bbb4c}.link.selected.inactive{background:#2f943c}.link.selected.pending{background:#236d2c}.link.caution.active{background:#adaf00}.link.caution.active:hover{background:#dfe200}.link.caution.inactive{background:#adaf00}.link.caution.pending{background:#7b7c00}.link.danger.active{background:#ea0000}.link.danger.active:hover{background:#ff1e1e}.link.danger.inactive{background:#ea0000}.link.danger.pending{background:#b70000}.link.disabled.active{background:#999}.link.disabled.active:hover{background:#b3b3b3}.link.disabled.inactive{background:#999}.link.disabled.pending{background:grey}.link[disabled]{pointer-events:none;border-color:#000}.link[disabled].active{background:#999}.link[disabled].active:hover{background:#b3b3b3}.link[disabled].inactive{background:#999}.link[disabled].pending{background:grey}#loading,.notice,.noticePlaceholder{padding:2px 4px;margin:4px 0;color:#000;background:url(background_notice.jpg) 50% 50%}.noticePlaceholder{color:#fff;background:0 0}.notice img{position:absolute;top:0;left:0;width:16px}.itemGroup{border:1px solid #e9c183;background:#2c2c2c;padding:4px}.block,.statusDisplay{border:1px solid #40628a}.item{width:100%}.itemContent,.itemContentNarrow{float:left}.itemContentNarrow{width:30%}.itemContent{width:69%}.itemLabel,.itemLabelNarrow,.itemLabelWide,.itemLabelWider,.itemLabelWidest{float:left;color:#e9c183}.itemLabelNarrow{width:20%}.itemLabel{width:30%}.itemLabelWide{width:45%}.itemLabelWider{width:69%}.itemLabelWidest{width:100%}.itemContentWide{float:left;width:79%}.itemContentSmall{float:left;width:33%}.itemContentMedium{float:left;width:55%}.statusDisplay{display:block;position:relative;background:#000;color:#fff;padding:4px;margin:4px 0}.statusDisplay .itemLabel,.statusDisplay .itemLabelNarrow,.statusDisplay .itemLabelWide,.statusDisplay .itemLabelWider,.statusDisplay .itemLabelWidest{color:#98B0C3}.block{padding:8px;margin:10px 4px 4px;background-color:#202020}.line{width:100%}.fixedLeft{width:110px;float:left}.fixedLeftWide{width:165px;float:left}.fixedLeftWider{width:220px;float:left}.fixedLeftWidest{width:250px;float:left}.fixedLeftWiderRed{width:220px;float:left;background:#e00}.bar{position:relative;width:236px;border:1px solid #666;float:left;margin:0 5px 0 0;overflow:hidden;background:#000;box-sizing:border-box}.bar .barText{position:absolute;top:-2px;left:5px;width:100%;height:100%;color:#fff;font-weight:400}.bar .barFill{width:0;height:100%;background:#40628a;overflow:hidden;float:left}.bar .barFill.good{background:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#ea0000}.bar .barFill.highlight{background:#8BA5C4}body{background:url(background.png) 50% 0 repeat-x #272727}#content{padding:8px} \ No newline at end of file diff --git a/nano/compiled/logo_syndicate.png b/nano/compiled/logo_syndicate.png deleted file mode 100644 index 05807dacc19..00000000000 Binary files a/nano/compiled/logo_syndicate.png and /dev/null differ diff --git a/nano/compiled/nanotrasen.css b/nano/compiled/nanotrasen.css deleted file mode 100644 index 35f76c74888..00000000000 --- a/nano/compiled/nanotrasen.css +++ /dev/null @@ -1 +0,0 @@ -h1,h2,h3{padding:6px 0;margin:0;clear:both}body,h1,h2,h3,ul{margin:0}#content,.clearBoth,h1,h2,h3{clear:both}#titletext,.bar,.bar .barFill{overflow:hidden}body{padding:0;font-family:Verdana,Geneva,sans-serif;font-size:12px;line-height:170%;color:#fff}h1{font-size:18px}h2{font-size:16px}h3{font-size:14px}hr{background-color:#40628a;height:1px;border:none}ul{padding:4px 0 0 10px;list-style-type:none}ul li{padding:0 0 2px}noscript{margin:33% auto;width:50%;height:33%;background:#fff;border:2px solid red;z-index:9999;padding:0 10px;text-align:center}#statusicon{width:24px;height:24px;background:url(statusicon.png) no-repeat}.bar,.link,.notice img{height:16px}#statusicon.good{background-position:0 0}#statusicon.average{background-position:0 -24px}#statusicon.bad{background-position:0 -48px}.normal{color:#40628a}.good{color:#4f7529}.average{color:#cd6500}.bad{color:#e00}.label{color:#e9C183}.highlight{color:#8ba5c4}.dark{color:#272727}#loading,.bold,.notice,.noticePlaceholder{font-weight:700}#loading,.italic,.notice,.noticePlaceholder{font-style:italic}.fontReset,.link{color:#fff;font-size:12px;font-weight:400;font-style:normal;text-decoration:none}.hidden{display:none}.link,.link i.main{display:inline-block}.clearLeft{clear:left}.clearRight{clear:right}.item,.itemGroup,.line,div.notice{clear:both}.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}.link{margin:2px;padding:0 4px 4px;border:1px solid #111010;box-sizing:content-box;cursor:default}.link .iconed{padding-left:3px}.link i{margin-right:3px}.link i.pending,.link.pending i.main{display:none}.item,.link.pending i.pending{display:inline-block}.link.normal.active{background:#40628a}.link.normal.active:hover{background:#507bad}.link.normal.inactive{background:#40628a}.link.normal.pending{background:#304967}.link.selected.active{background:#2f943c}.link.selected.active:hover{background:#3bbb4c}.link.selected.inactive{background:#2f943c}.link.selected.pending{background:#236d2c}.link.caution.active{background:#adaf00}.link.caution.active:hover{background:#dfe200}.link.caution.inactive{background:#adaf00}.link.caution.pending{background:#7b7c00}.link.danger.active{background:#ea0000}.link.danger.active:hover{background:#ff1e1e}.link.danger.inactive{background:#ea0000}.link.danger.pending{background:#b70000}.link.disabled.active{background:#999}.link.disabled.active:hover{background:#b3b3b3}.link.disabled.inactive{background:#999}.link.disabled.pending{background:grey}.link[disabled]{pointer-events:none;border-color:#000}.link[disabled].active{background:#999}.link[disabled].active:hover{background:#b3b3b3}.link[disabled].inactive{background:#999}.link[disabled].pending{background:grey}#loading,.notice,.noticePlaceholder{padding:2px 4px;margin:4px 0;color:#000;background:url(background_notice.jpg) 50% 50%}.noticePlaceholder{color:#fff;background:0 0}.notice img{position:absolute;top:0;left:0;width:16px}.itemGroup{border:1px solid #e9c183;background:#2c2c2c;padding:4px}.block,.statusDisplay{border:1px solid #40628a}.item{width:100%}.itemContent,.itemContentNarrow{float:left}.itemContentNarrow{width:30%}.itemContent{width:69%}.itemLabel,.itemLabelNarrow,.itemLabelWide,.itemLabelWider,.itemLabelWidest{float:left;color:#e9c183}.itemLabelNarrow{width:20%}.itemLabel{width:30%}.itemLabelWide{width:45%}.itemLabelWider{width:69%}.itemLabelWidest{width:100%}.itemContentWide{float:left;width:79%}.itemContentSmall{float:left;width:33%}.itemContentMedium{float:left;width:55%}.statusDisplay{display:block;position:relative;background:#000;color:#fff;padding:4px;margin:4px 0}#content,.block{padding:8px}.statusDisplay .itemLabel,.statusDisplay .itemLabelNarrow,.statusDisplay .itemLabelWide,.statusDisplay .itemLabelWider,.statusDisplay .itemLabelWidest{color:#98B0C3}.block{margin:10px 4px 4px;background-color:#202020}.line{width:100%}.fixedLeft{width:110px;float:left}.fixedLeftWide{width:165px;float:left}.fixedLeftWider{width:220px;float:left}.fixedLeftWidest{width:250px;float:left}.fixedLeftWiderRed{width:220px;float:left;background:#e00}.bar{position:relative;width:236px;border:1px solid #666;float:left;margin:0 5px 0 0;background:#000;box-sizing:border-box}.bar .barText{position:absolute;top:-2px;left:5px;width:100%;height:100%;color:#fff;font-weight:400}#statusicon,#titlelogo{position:absolute;top:4px}.bar .barFill{width:0;height:100%;background:#40628a;float:left}.bar .barFill.good{background:#4f7529}.bar .barFill.average{background:#cd6500}.bar .barFill.bad{background:#ea0000}.bar .barFill.highlight{background:#8BA5C4}body{background:url(background_nanotrasen.png) 50% 0 repeat-x #272727}#title{position:relative;height:30px}#statusicon{left:12px}#titletext{position:absolute;top:6px;left:44px;width:66%;color:#E9C183;font-size:16px}#titlelogo{right:12px;width:42px;height:24px;background:url(logo_nanotrasen.png) 50% 50% no-repeat} \ No newline at end of file diff --git a/nano/compiled/nanoui.js b/nano/compiled/nanoui.js deleted file mode 100644 index 9d28f927c1b..00000000000 --- a/nano/compiled/nanoui.js +++ /dev/null @@ -1,324 +0,0 @@ -var nanoui = (function (templates) { - "use strict"; - var nanoui = {}; - - - var _initialized = false; - var _layoutRendered = false; - var _contentRendered = false; - - var _initialData = {}; - var _data = {}; - - - var render = function (data) { - if (!_initialized) { - data = _initialData; - } - - nanoui.emit('beforeRender', data); - try { - if (!_layoutRendered || data.config.autoUpdateLayout) { - document.query('#layout').innerHTML = templates[data.config.templates.layout](data.data, data.config, nanoui.helpers); - _layoutRendered = true; - nanoui.emit('layoutRendered'); - } - if (!_contentRendered || data.config.autoUpdateContent) { - document.query('#content').innerHTML = templates[data.config.templates.content](data.data, data.config, nanoui.helpers); - _contentRendered = true; - nanoui.emit('contentRendered'); - } - } catch (error) { - nanoui.emit('error', error.fileName + ":" + error.lineNumber + ": " + error.message); - return; - } - nanoui.emit('afterRender', data); - - if (!_initialized) { - _initialized = true; - } - }; - - var update = function (data) { - if (!nanoui.util.hasKey(data, 'data')) { - if (nanoui.util.hasKey(_data, 'data')) { - data.data = _data.data; - } else { - data.data = {}; - } - } - - _data = data; - - if (_initialized) { - nanoui.emit('render', _data); - } - - nanoui.emit('updateReceived'); - }; - - var serverUpdate = function (dataString) { - var data; - try { - data = JSON.parse(dataString); - } catch (error) { - nanoui.emit('error', error.fileName + ":" + error.lineNumber + ": " + error.message); - return; - } - - nanoui.emit('serverUpdateReceived'); - nanoui.emit('update', data); - }; - - var init = function () { - nanoui.emit('earlyInit'); - - _initialData = JSON.parse(document.query('body').data('initial-data')); - if (_initialData === null || !nanoui.util.hasKey(_initialData, 'config') || !nanoui.util.hasKey(_initialData, 'data')) { - nanoui.emit('error', "Initial data did not load correctly."); - return; - } - - nanoui.emit('lateInit'); - }; - - - document.when('ready', init); - nanoui.on('lateInit', render); - nanoui.on('serverUpdate', serverUpdate); - - nanoui.on('render', render); - nanoui.on('update', update); - - return nanoui; -}(TMPL)); - -nanoui.handlers = (function (nanoui) { - "use strict"; - - - var updateStatus = function (data) { - var statusicon = document.query('#statusicon'); - if (!statusicon) { - return; - } - - switch (data.config.status) { - case 2: - statusicon.className = 'good'; - break; - case 1: - statusicon.className = 'average'; - break; - default: - statusicon.className = 'bad'; - } - }; - - var updateLinks = function (data) { - var links = document.queryAll('.link'); - var pendingLinks = document.queryAll('.link.pending'); - - if (data.config.status === 2) { - links.forEach(function (element) { - element.classList.remove('disabled'); - }); - pendingLinks.forEach(function (element) { - element.classList.remove('pending'); - }); - } else { - links.forEach(function (element) { - element.classList.remove('active'); - element.classList.remove('pending'); - element.classList.add('disabled'); - }); - } - }; - - var attachHandlers = function (data) { - var onClick = function (event) { - event.preventDefault(); - - var href = this.data('href'); - if (href !== null) { - if (data.config.status === 2) { - this.classList.add('pending'); - } - - location.href = href; - } - }; - - document.queryAll('.link.active').forEach(function (element) { - element.on('click', onClick); - }); - }; - - var error = function (message) { - var url = nanoui.util.href({nanoui_error: message}); - - location.href = url; - }; - - - nanoui.on('beforeRender', updateStatus); - nanoui.on('afterRender', updateLinks); - nanoui.on('afterRender', attachHandlers); - - nanoui.on('error', error); - - return {}; -}(nanoui)); - -nanoui.helpers = (function (nanoui) { - "use strict"; - var helpers = {}; - - - helpers.link = function (text, icon, parameters, status, elementClass) { - var context = {}; - - context.text = text || ""; - context.icon = ""; - context.parameters = nanoui.util.href(parameters); - context.status = status; - context.elementClass = elementClass || ""; - - if (nanoui.util.yes(icon)) { - context.icon = nanoui.util.format("", {icon: icon}); - context.elementClass += ' iconed'; - } - - if (nanoui.util.yes(status)) { - return nanoui.util.format("", context); - } - return nanoui.util.format("", context); - }; - - helpers.bar = function (value, rangeMin, rangeMax, styleClass, barText) { - var context = {}; - - if (rangeMin < rangeMax) { - if (value < rangeMin) { - value = rangeMin; - } else if (value > rangeMax) { - value = rangeMax; - } - } else { - if (value > rangeMin) { - value = rangeMin; - } else if (value < rangeMax) { - value = rangeMax; - } - } - - context.styleClass = styleClass || ""; - context.barText = barText || ""; - context.percentage = Math.round((value - rangeMin) / (rangeMax - rangeMin) * 100); - - return nanoui.util.format("
#{barText}
", context); - }; - - helpers.round = function (number) { - return Math.round(number); - }; - - helpers.fixed = function (number, decimals) { - if (nanoui.util.no(decimals)) { decimals = 1; } - return Number(Math.round(number + 'e'+decimals) + 'e-'+decimals); - }; - - helpers.floor = function (number) { - return Math.floor(number); - }; - - helpers.ceil = function (number) { - return Math.ceil(number); - }; - - - return helpers; -}(nanoui)); - -nanoui.util = (function (nanoui) { - "use strict"; - var util = {}; - - - var _urlParameters = {}; - - - var init = function () { - _urlParameters = JSON.parse(document.query('body').data('url-parameters')); - if (_urlParameters === null) { - nanoui.emit('error', "URL parameters did not load correctly."); - return; - } - }; - - util.extend = function (first, second) { - Object.keys(second).forEach(function (key) { - var secondVal = second[key]; - if (secondVal && Object.prototype.toString.call(secondVal) === '[object Object]') { - first[key] = first[key] || {}; - util.extend(first[key], secondVal); - } else { - first[key] = secondVal; - } - }); - - return first; - }; - - util.format = function (str, obj) { - if (!obj) { - return str; - } - function getValue(str, context) { - var ix = str.lastIndexOf('()'); - if (ix > 0 && ix + '()'.length === str.length) { - return context[str.substring(0, ix)](); - } - return context[str]; - } - return str.replace(/#\{(.+?)\}/g, function (ignore, $1) { - var split = $1.split('.'), - tmp = getValue(split[0], obj), - i, - l; - for (i = 1, l = split.length; i < l; i++) { - tmp = getValue(split[i], tmp); - } - return tmp; - }); - }; - - util.href = function (parameters) { - var url = new Url("byond://"); - - nanoui.util.extend(url.query, nanoui.util.extend(parameters, _urlParameters)); - - return url; - }; - - util.isFunction = function (func) { - return !!(func && func.call && func.apply); - }; - - util.hasKey = function (obj, key) { - return obj.hasOwnProperty(key); - }; - - util.yes = function (arg) { - return !(arg === 'undefined' || !arg); - }; - - util.no = function (arg) { - return arg === 'undefined' || !arg; - }; - - - nanoui.on('earlyInit', init); - - return util; -}(nanoui)); diff --git a/nano/compiled/nanoui.min.js b/nano/compiled/nanoui.min.js deleted file mode 100644 index 37aefb3af81..00000000000 --- a/nano/compiled/nanoui.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! nanoui 09-12-2015 */ -var nanoui=function(a){"use strict";var b={},c=!1,d=!1,e=!1,f={},g={},h=function(g){c||(g=f),b.emit("beforeRender",g);try{(!d||g.config.autoUpdateLayout)&&(document.query("#layout").innerHTML=a[g.config.templates.layout](g.data,g.config,b.helpers),d=!0,b.emit("layoutRendered")),(!e||g.config.autoUpdateContent)&&(document.query("#content").innerHTML=a[g.config.templates.content](g.data,g.config,b.helpers),e=!0,b.emit("contentRendered"))}catch(h){return void b.emit("error",h.fileName+":"+h.lineNumber+": "+h.message)}b.emit("afterRender",g),c||(c=!0)},i=function(a){b.util.hasKey(a,"data")||(b.util.hasKey(g,"data")?a.data=g.data:a.data={}),g=a,c&&b.emit("render",g),b.emit("updateReceived")},j=function(a){var c;try{c=JSON.parse(a)}catch(d){return void b.emit("error",d.fileName+":"+d.lineNumber+": "+d.message)}b.emit("serverUpdateReceived"),b.emit("update",c)},k=function(){return b.emit("earlyInit"),f=JSON.parse(document.query("body").data("initial-data")),null!==f&&b.util.hasKey(f,"config")&&b.util.hasKey(f,"data")?void b.emit("lateInit"):void b.emit("error","Initial data did not load correctly.")};return document.when("ready",k),b.on("lateInit",h),b.on("serverUpdate",j),b.on("render",h),b.on("update",i),b}(TMPL);nanoui.handlers=function(a){"use strict";var b=function(a){var b=document.query("#statusicon");if(b)switch(a.config.status){case 2:b.className="good";break;case 1:b.className="average";break;default:b.className="bad"}},c=function(a){var b=document.queryAll(".link"),c=document.queryAll(".link.pending");2===a.config.status?(b.forEach(function(a){a.classList.remove("disabled")}),c.forEach(function(a){a.classList.remove("pending")})):b.forEach(function(a){a.classList.remove("active"),a.classList.remove("pending"),a.classList.add("disabled")})},d=function(a){var b=function(b){b.preventDefault();var c=this.data("href");null!==c&&(2===a.config.status&&this.classList.add("pending"),location.href=c)};document.queryAll(".link.active").forEach(function(a){a.on("click",b)})},e=function(b){var c=a.util.href({nanoui_error:b});location.href=c};return a.on("beforeRender",b),a.on("afterRender",c),a.on("afterRender",d),a.on("error",e),{}}(nanoui),nanoui.helpers=function(a){"use strict";var b={};return b.link=function(b,c,d,e,f){var g={};return g.text=b||"",g.icon="",g.parameters=a.util.href(d),g.status=e,g.elementClass=f||"",a.util.yes(c)&&(g.icon=a.util.format("",{icon:c}),g.elementClass+=" iconed"),a.util.yes(e)?a.util.format("",g):a.util.format("",g)},b.bar=function(b,c,d,e,f){var g={};return d>c?c>b?b=c:b>d&&(b=d):b>c?b=c:d>b&&(b=d),g.styleClass=e||"",g.barText=f||"",g.percentage=Math.round((b-c)/(d-c)*100),a.util.format("
#{barText}
",g)},b.round=function(a){return Math.round(a)},b.fixed=function(b,c){return a.util.no(c)&&(c=1),Number(Math.round(b+"e"+c)+"e-"+c)},b.floor=function(a){return Math.floor(a)},b.ceil=function(a){return Math.ceil(a)},b}(nanoui),nanoui.util=function(a){"use strict";var b={},c={},d=function(){return c=JSON.parse(document.query("body").data("url-parameters")),null===c?void a.emit("error","URL parameters did not load correctly."):void 0};return b.extend=function(a,c){return Object.keys(c).forEach(function(d){var e=c[d];e&&"[object Object]"===Object.prototype.toString.call(e)?(a[d]=a[d]||{},b.extend(a[d],e)):a[d]=e}),a},b.format=function(a,b){function c(a,b){var c=a.lastIndexOf("()");return c>0&&c+"()".length===a.length?b[a.substring(0,c)]():b[a]}return b?a.replace(/#\{(.+?)\}/g,function(a,d){var e,f,g=d.split("."),h=c(g[0],b);for(e=1,f=g.length;f>e;e++)h=c(g[e],h);return h}):a},b.href=function(b){var d=new Url("byond://");return a.util.extend(d.query,a.util.extend(b,c)),d},b.isFunction=function(a){return!!(a&&a.call&&a.apply)},b.hasKey=function(a,b){return a.hasOwnProperty(b)},b.yes=function(a){return!("undefined"===a||!a)},b.no=function(a){return"undefined"===a||!a},a.on("earlyInit",d),b}(nanoui); \ No newline at end of file diff --git a/nano/compiled/templates.min.js b/nano/compiled/templates.min.js deleted file mode 100644 index 3c129d1dc2e..00000000000 --- a/nano/compiled/templates.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! nanoui 09-12-2015 */ -var TMPL=function(){return{_generic:function(a,b,c){var d="
Initiating...
";return d},_nanotrasen:function(a,b,c){var d="
"+b.title+"
Initiating...
";return d},air_alarm:function(a,b,c){var d='
';if(d+=a.siliconUser?'
Interface Lock:
'+c.link("Engaged","locked",{toggleaccess:1},a.locked?"selected":null)+c.link("Disengaged","unlocked",{toggleaccess:1},a.locked?null:"selected")+'
':a.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",d+='

Air Status

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

Air Controls

',d+=a.atmos_alarm?""+c.link("Area Atmospheric Alarm","close",{atmos_reset:1},null,"caution"):""+c.link("Area Atmospheric Alarm","hand-stop-o",{atmos_alarm:1}),d+='
',d+=3!=a.mode?""+c.link("Panic Siphon","exclamation",{mode:3}):""+c.link("Panic Siphon","close",{mode:1},null,"danger"),d+='

'+c.link("Vent Controls","sign-out",{screen:2})+'
'+c.link("Scrubber Controls","filter",{screen:3})+'

'+c.link("Set Environmental Mode","cog",{screen:4})+'
'+c.link("Set Alarm Threshold","bar-chart",{screen:5})+"
";else if(2==a.screen){d+="

Vent Controls

";var i=a.vents;if(i)for(var j,g=-1,k=i.length-1;k>g;)j=i[g+=1],d+="

"+j.long_name+'

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

Scrubber Controls

";var l=a.scrubbers;if(l)for(var m,g=-1,n=l.length-1;n>g;)m=l[g+=1],d+="

"+m.long_name+'

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

Environmental Modes

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

Alarm Thresholds

";var r=a.thresholds;if(r)for(var s,g=-1,t=r.length-1;t>g;){s=r[g+=1],d+="";var u=s.settings;if(u)for(var v,w=-1,x=u.length-1;x>w;)v=u[w+=1],d+="";d+=""}d+="
min2min1max1max2
"+s.name+""+c.link(v.selected>=0?c.round(100*v.selected)/100:"Off",null,{command:"set_threshold",env:v.env,"var":v.val})+"
"}return d},airlock_electronics:function(a,b,c){var d='
'+c.link(a.oneAccess?"One Required":"All Required",a.oneAccess?"unlock":"lock",{access:"one"})+c.link("Reset","refresh",{access:"clear"})+'
',e=a.regions;if(e)for(var f,g=-1,h=e.length-1;h>g;)f=e[g+=1],d+='";d+="";var i=a.regions;if(i)for(var f,g=-1,j=i.length-1;j>g;){f=i[g+=1],d+='"}return d+="
'+f.name+"
';var k=f.accesses;if(k)for(var l,m=-1,n=k.length-1;n>m;)l=k[m+=1],d+=""+c.link(l.name,l.req?"check-square-o":"square-o",{access:l.id},null,l.req?"selected":null)+'
';d+="
"},apc:function(a,b,c){var d='
';d+=a.siliconUser?'
Interface Lock:
'+c.link("Engaged","lock",{toggleaccess:1},a.locked?"selected":null)+c.link("Disengaged","unlock",{toggleaccess:1},a.malfStatus>=2?"linkOff":a.locked?null:"selected")+'
':a.locked?"Swipe an ID card to unlock this interface.":"Swipe an ID card to lock this interface.",d+='

Power Status

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

Power Channels

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

System Overrides

'+c.link("Overload Lighting Circuit","lightbulb",{overload:1})+'
',1==a.malfStatus?d+=""+c.link("Override Programming","script",{malfhack:1}):2==a.malfStatus?d+=""+c.link("Shunt Core Processes","arrowreturn-1-s",{occupyapc:1}):3==a.malfStatus?d+=""+c.link("Return to Main Core","arrowreturn-1-w",{deoccupyapc:1}):4==a.malfStatus&&(d+=""+c.link("Shunt Core Processes","arrowreturn-1-s",{occupyapc:1},"linkOff")),d+="
"),d+='
Cover Lock:
',d+=a.locked&&!a.siliconUser?a.coverLocked?"Engaged":"Disengaged":""+c.link("Engaged","lock",{lock:1},a.coverLocked?"selected":null)+c.link("Disengaged","unlock",{lock:1},a.coverLocked?null:"selected"),d+='
'},atmos_filter:function(a,b,c){var d='
Power:
'+c.link(a.on?"On":"Off",a.on?"power":"close",{power:1})+'
Output Pressure:
'+c.link("Set","pencil",{set_press:"set"})+c.link("Max","plus",{set_press:"max"},a.set_pressure==a.max_pressure?"disabled":null)+a.set_pressure+' kPa
Filter:
'+c.link("Plasma",null,{filterset:0},0==a.filter_type?"selected":null)+c.link("O2",null,{filterset:1},1==a.filter_type?"selected":null)+c.link("N2",null,{filterset:2},2==a.filter_type?"selected":null)+c.link("CO2",null,{filterset:3},3==a.filter_type?"selected":null)+c.link("N2O",null,{filterset:4},4==a.filter_type?"selected":null)+c.link("Nothing",null,{filterset:-1},-1==a.filter_type?"selected":null)+"
";return d},atmos_mixer:function(a,b,c){var d='
Power:
'+c.link(a.on?"On":"Off",a.on?"power":"close",{power:1})+'
Output Pressure:
'+c.link("Set","pencil",{set_press:"set"})+c.link("Max","plus",{set_press:"max"},a.set_pressure==a.max_pressure?"disabled":null)+a.set_pressure+' kPa
Node 1:
'+c.link("","seek-start",{node1_c:"-0.1"},null)+c.link("","triangle-1-w",{node1_c:"-0.01"},null)+c.link("","triangle-1-e",{node1_c:"0.01"},null)+c.link("","seek-end",{node1_c:"0.1"},null)+a.node1_concentration+'%
Node 2:
'+c.link("","seek-start",{node2_c:"-0.1"},null)+c.link("","triangle-1-w",{node2_c:"-0.01"},null)+c.link("","triangle-1-e",{node2_c:"0.01"},null)+c.link("","seek-end",{node2_c:"0.1"},null)+a.node2_concentration+"%
";return d},atmos_pump:function(a,b,c){var d='
Power:
'+c.link(a.on?"On":"Off",a.on?"power":"close",{power:1})+"
";return d+=a.max_rate?'
Transfer Rate:
'+c.link("Set","pencil",{set_transfer_rate:"set"})+c.link("Max","plus",{set_transfer_rate:"max"},a.transfer_rate==a.max_rate?"disabled":null)+a.transfer_rate+" L/s
":'
Output Pressure:
'+c.link("Set","pencil",{set_press:"set"})+c.link("Max","plus",{set_press:"max"},a.set_pressure==a.max_pressure?"disabled":null)+a.set_pressure+" kPa
"},canister:function(a,b,c){var d="";return d+=a.hasHoldingTank?'
The regulator is connected to a tank.
':'
The regulator is not connected to a tank.
',d+='

Canister

'+c.link("Relabel","pencil",{relabel:1},a.canLabel?null:"disabled")+'
Pressure:
'+a.tankPressure+' kPa
Port:
',d+=a.portConnected?'Connected':'Disconnected',d+='

Valve

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

Holding Tank

",d+=a.hasHoldingTank?""+c.link("Eject","eject",{remove_tank:1})+'
Label:
'+a.holdingTank.name+'
Tank Pressure:
'+a.holdingTank.tankPressure+" kPa
":'
No Holding Tank
'},chem_dispenser:function(a,b,c){var d='

Status

Energy:
'+c.bar(a.energy,0,a.maxEnergy,"good")+a.energy+' Units
Amount:
',e=a.beakerTransferAmounts;if(e)for(var f,g=-1,h=e.length-1;h>g;)f=e[g+=1],d+=""+c.link(f,"plus",{amount:f},a.amount==f?"selected":null);d+='

Dispense

';var i=a.chemicals;if(i)for(var j,g=-1,k=i.length-1;k>g;)j=i[g+=1],d+=""+c.link(j.title,"tint",j.commands,null,"link fixedLeft");d+='

Beaker

'+c.link("Eject","eject",{ejectBeaker:1},a.isBeakerLoaded?null:"disabled")+'
';var l=a.beakerTransferAmounts;if(l)for(var f,g=-1,m=l.length-1;m>g;)f=l[g+=1],d+=""+c.link(f,"minus",{remove:f});if(d+='
Contents:
',a.isBeakerLoaded)if(d+="Volume: "+a.beakerCurrentVolume+"/"+a.beakerMaxVolume+" Units
",a.beakerContents.length){var n=a.beakerContents;if(n)for(var o,g=-1,p=n.length-1;p>g;)o=n[g+=1],d+=''+o.volume+" units of "+o.name+"
"}else d+='Beaker Empty';else d+='No Beaker Loaded';return d+="
"},chem_heater:function(a,b,c){var d='

Status

Power:
'+c.link(a.isActive?"On":"Off",a.isActive?"power":"close",{toggle_on:1},a.isBeakerLoaded?null:"disabled")+'
Target:
'+c.link(a.targetTemp+"K","pencil",{adjust_temperature:"input"})+'

Beaker

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

Occupant

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

Cell

Power:
'+c.link("On","power",{switchOn:1},a.isOperating?"selected":null)+c.link("Off","close",{switchOff:1},a.isOperating?null:"selected")+'
Temperature:
'+a.cellTemperature+' K
Door:
'+c.link("Open","unlocked",{openCell:1},a.isOpen?"disabled":null)+c.link("Close","locked",{closeCell:1},a.isOpen?null:"disabled")+'
Eject:
'+c.link("Auto","eject",{autoEject:1},a.autoEject?"selected":null)+c.link("Manual","pin-s",{autoEject:0},a.autoEject?null:"selected")+'

Beaker

'+c.link("Eject","eject",{ejectBeaker:1},a.isBeakerLoaded?null:"disabled")+'
Contents:
',a.isBeakerLoaded)if(a.beakerContents.length){var e=a.beakerContents;if(e)for(var f,g=-1,h=e.length-1;h>g;)f=e[g+=1],d+=''+f.volume+" units of "+f.name+"
"}else d+='Beaker Empty';else d+='No Beaker Loaded';return d+="
"},smes:function(a,b,c){var d='

Storage

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

Input

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

Output

Charge Mode:
'+c.link("On","power-off",{output_attempt:1},a.outputAttempt?"selected":null)+c.link("Off","close",{output_attempt:0},a.outputAttempt?null:"selected")+" ",d+=a.outputting?'[Sending]':a.charge>0?'[Not Sending]':'[No Charge]',d+='
Output Setting:
'+c.bar(a.outputLevel,0,a.outputLevelMax)+" "+a.outputLevel+' W
'+c.link("","fast-backward",{set_output_level:"0"},a.outputLevel?null:"selected")+c.link("","backward",{set_output_level:"minus"},a.outputLevel?null:"disabled")+c.link("Set","pencil",{set_output_level:"custom"},null)+c.link("","forward",{set_output_level:"plus"},a.outputLevel==a.outputLevelMax?"disabled":null)+c.link("","fast-forward",{set_output_level:"max"},a.outputLevel==a.outputLevelMax?"selected":null)+'
Outputting:
'+a.outputUsed+" W
"},solar_control:function(a,b,c){var d='

Status

Generated Power:
'+a.generated+' W
Orientation:
'+a.angle+"° ("+a.direction+")"+c.link("15°","minus",{rate_control:"1",cdir:"-15"})+c.link("1°","minus",{rate_control:"1",cdir:"-1"})+c.link("1°","plus",{rate_control:"1",cdir:"1"})+c.link("15°","plus",{rate_control:"1",cdir:"15"})+'

Tracking

Tracker Mode:
'+c.link("Off","close",{track:"0"},0==a.tracking_state?"selected":"")+c.link("Timed","clock",{track:"1"},1==a.tracking_state?"selected":"");return d+=a.connected_tracker?""+c.link("Auto","signal-diag",{track:"2"},2==a.tracking_state?"selected":""):""+c.link("Auto","signal-diag",null,"disabled"),d+='
Tracking Rate:
'+a.tracking_rate+" deg/h ("+a.rotating_way+")"+c.link("180°","minus",{rate_control:"1",tdir:"-180"})+c.link("30°","minus",{rate_control:"1",tdir:"-30"})+c.link("1°","minus",{rate_control:"1",tdir:"-1"})+c.link("1°","plus",{rate_control:"1",tdir:"1"})+c.link("30°","plus",{rate_control:"1",tdir:"30"})+c.link("180°","plus",{rate_control:"1",tdir:"180"})+'

Devices

Solar Tracker:
',d+=a.connected_tracker?'Found':'Not Found',d+='
Solars Panels:
'+a.connected_panels+' Connected
'+c.link("","refresh",{search_connected:"1"})+"
"},space_heater:function(a,b,c){var d='

Status

Power:
'+c.link("On","power",{power:1},a.on?"selected":null)+c.link("Off","close",{power:0},a.on?null:"selected")+'
Stored Energy:
';return a.hasPowercell?(d+=""+c.bar(a.powerLevel,0,100,"good")+" "+a.powerLevel+"%",a.open&&(d+="
"+c.link("Eject","eject",{cellremove:1},null))):(d+="No power cell loaded.",a.open&&(d+=""+c.link("Install","eject",{cellinstall:1},null))),d+='

Thermostat

Current Temp:
'+a.currentTemp+'°C
Target Temp:
'+a.targetTemp+"°C",a.open&&(d+="
"+c.link("","seek-prev",{temp:-20},a.targetTemp>a.minTemp?null:"disabled")+c.link("","triangle-1-w",{temp:-5},a.targetTemp>a.minTemp?null:"disabled")+c.link("Set","pencil",{temp:"custom"},null)+c.link("","triangle-1-e",{temp:5},a.targetTemp
Operational Mode:
',d+=a.open?""+c.link("Heat","arrowthick-1-n",{mode:"heat"},"heat"!=a.mode?null:"selected")+c.link("Cool","arrowthick-1-s",{mode:"cool"},"cool"!=a.mode?null:"selected")+c.link("Auto","arrowthick-2-n-s",{mode:"auto"},"heat"==a.mode||"cool"==a.mode?null:"selected"):"heat"==a.mode?"Heat":"cool"==a.mode?"Cool":"Auto",d+="
"},tanks:function(a,b,c){var d="";return d+=a.maskConnected?'
The regulator is connected to a mask.
':'
The regulator is not connected to a mask.
',d+='
Tank Pressure:
'+c.bar(a.tankPressure,0,1013,a.tankPressure>200?"good":a.tankPressure>100?"average":"bad")+a.tankPressure+' kPa
Release Pressure:
'+c.bar(a.releasePressure,a.minReleasePressure,a.maxReleasePressure)+a.releasePressure+' kPa
Pressure Regulator:
'+c.link("Reset","refresh",{dist_p:"reset"},a.releasePressure!=a.defaultReleasePressure?null:"disabled")+c.link("Min","minus",{dist_p:"min"},a.releasePressure>a.minReleasePressure?null:"disabled")+c.link("Set","pencil",{dist_p:"custom"},null)+c.link("Max","plus",{dist_p:"max"},a.releasePressure'+c.link("Open","unlock",{stat:1},a.maskConnected?a.valveOpen?"selected":null:"disabled")+c.link("Close","lock",{stat:1},a.valveOpen?null:"selected")+"
"}}}(); \ No newline at end of file diff --git a/nano/images/background_notice.jpg b/nano/images/background_notice.jpg deleted file mode 100644 index cd7b89fa9f0..00000000000 Binary files a/nano/images/background_notice.jpg and /dev/null differ diff --git a/nano/images/logo_nanotrasen.png b/nano/images/logo_nanotrasen.png deleted file mode 100644 index 513ba0c4965..00000000000 Binary files a/nano/images/logo_nanotrasen.png and /dev/null differ diff --git a/nano/images/statusicon.png b/nano/images/statusicon.png deleted file mode 100644 index ddf88b0dcda..00000000000 Binary files a/nano/images/statusicon.png and /dev/null differ diff --git a/nano/package.json b/nano/package.json index ef948bb00bb..b2c80fb3a9e 100644 --- a/nano/package.json +++ b/nano/package.json @@ -1,19 +1,30 @@ { "name": "nanoui", - "version": "0.3.0", + "private": true, + "dependencies": { + "autoprefixer": "^6.1.2", + "coffeelint-stylish": "^0.1.2", + "cssnano": "^3.4.0", + "del": "^2.2.0", + "gulp": "^3.9.0", + "gulp-coffee": "^2.3.1", + "gulp-concat": "^2.6.0", + "gulp-dot-precompiler": "git+https://github.com/kentliau/gulp-dot-precompiler.git", + "gulp-header": "^1.7.1", + "gulp-if": "^2.0.0", + "gulp-jsbeautifier": "^1.0.1", + "gulp-less": "^3.0.5", + "gulp-postcss": "^6.0.1", + "gulp-replace": "^0.5.4", + "gulp-uglify": "^1.5.1", + "gulp-util": "^3.0.7", + "main-bower-files": "^2.9.0", + "merge-stream": "^1.0.0", + "postcss-clearfix": "^0.2.0", + "postcss-url": "^5.0.2" + }, "devDependencies": { - "grunt": "^0.4.5", - "grunt-concurrent": "^2.1.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-imagemin": "^1.0.0", - "grunt-contrib-jshint": "^0.11.3", - "grunt-contrib-less": "^1.1.0", - "grunt-contrib-uglify": "^0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-dot": "git+ssh://git@github.com/neersighted/grunt-dot.git", - "grunt-lesslint": "^2.0.0", - "grunt-newer": "^1.1.1", - "less-plugin-autoprefix": "^1.5.1", - "less-plugin-clean-css": "^1.5.1" + "gulp-csscomb": "^3.0.6", + "gulp-filter": "^3.0.1" } } diff --git a/nano/reload.bat b/nano/reload.bat new file mode 100644 index 00000000000..11286ecfafa --- /dev/null +++ b/nano/reload.bat @@ -0,0 +1,2 @@ +FOR /F "tokens=3* delims= " %%a in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal"') do (set documents=%%a) +copy assets\* "%documents%\BYOND\cache" /y diff --git a/nano/scripts/handlers.coffee b/nano/scripts/handlers.coffee new file mode 100644 index 00000000000..089e188ed03 --- /dev/null +++ b/nano/scripts/handlers.coffee @@ -0,0 +1,48 @@ +class @Handlers + constructor: (@bus) -> + @bus.on "rendered", @updateStatus + @bus.on "rendered", @updateLinks + @bus.on "rendered", @attachHandlers + @bus.on "error", @error + + updateStatus: (data) -> + statusicons = document.queryAll(".statusicon") + statusicons.forEach (statusicon) -> + switch data.config.status + when 2 + statusicon.className = "statusicon good" + when 1 + statusicon.className = "statusicon average" + else + statusicon.className = "statusicon bad" + return + return + + + updateLinks: (data) -> + links = document.queryAll(".link") + if data.config.status isnt 2 + links.forEach (element) -> + element.className = "link disabled" + return + return + + + attachHandlers: (data) -> + onClick = (event) -> + href = @data("href") + if href? and data.config.status is 2 + @classList.add "pending" + location.href = href + return + + document.queryAll(".link").forEach (element) -> + element.on "click", onClick + return + return + + + error: (message) -> + url = Util.href(nanoui_error: message) + location.href = url + return diff --git a/nano/scripts/helpers.coffee b/nano/scripts/helpers.coffee new file mode 100644 index 00000000000..5ddbc11ac75 --- /dev/null +++ b/nano/scripts/helpers.coffee @@ -0,0 +1,53 @@ +@Helpers = + link: (text = "", icon = "", parameters = {}, \ + status = "", elementClass = "") -> + parameters = window.Util.href(parameters) + + if !!icon + icon = "" + elementClass += " iconed" + + if !!status + "" + else + "" + + + bar: (value = 0, rangeMin = 0, rangeMax = 100, + styleClass = "", barText = "") -> + if rangeMin < rangeMax + if value < rangeMin + value = rangeMin + else if value > rangeMax + value = rangeMax + else + if value > rangeMin + value = rangeMin + else if value < rangeMax + value = rangeMax + + percentage = Math.round((value - rangeMin) / (rangeMax - rangeMin) * 100) + + "
\ + \ + #{barText} \ +
" + + + round: (number) -> + Math.round number + + + fixed: (number, decimals = 1) -> + Number Math.round(number + "e" + decimals) + "e-" + decimals + + + floor: (number) -> + Math.floor number + + + ceil: (number) -> + Math.ceil number diff --git a/nano/scripts/main.coffee b/nano/scripts/main.coffee new file mode 100644 index 00000000000..f9100ac68b1 --- /dev/null +++ b/nano/scripts/main.coffee @@ -0,0 +1,9 @@ +document.when "ready", => + coderbus = {} + + nanoui = new @NanoUI coderbus + handlers = new @Handlers coderbus + coderbus.emit "memes" + + @NanoBus = coderbus + return diff --git a/nano/scripts/nanoui.coffee b/nano/scripts/nanoui.coffee new file mode 100644 index 00000000000..8fdd7c21a35 --- /dev/null +++ b/nano/scripts/nanoui.coffee @@ -0,0 +1,74 @@ +class @NanoUI + constructor: (@bus) -> + @bus.on "serverUpdate", @serverUpdate + @bus.on "update", @update + @bus.on "render", @render + @bus.on "memes", @render + + @initialized = false + @layoutRendered = false + @contentRendered = false + + @data = {} + @initialData = JSON.parse document.query("#data").data("initial") + + unless @initialData? or + not ("data" of @initialData or "config" of @initalData) + @bus.emit "error", "Initial data did not load correctly." + return + + + serverUpdate: (dataString) => + try + data = JSON.parse(dataString) + catch error + NanoBus.emit "error", \ + "#{error.fileName}:#{error.lineNumber} #{error.message}" + return + + @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 @layoutRendered or data.config.autoUpdateLayout + layout = document.query("#layout") + layout.innerHTML = TMPL[data.config.templates.layout]\ + (data.data, data.config, Helpers) + + @layoutRendered = true + @bus.emit "layoutRendered" + + if not @contentRendered or data.config.autoUpdateContent + content = document.query("#content") + content.innerHTML = TMPL[data.config.templates.content]\ + (data.data, data.config, Helpers) + + @contentRendered = true + @bus.emit "contentRendered" + + catch error + @bus.emit "error", \ + "#{error.fileName}:#{error.lineNumber} #{error.message}" + return + + @bus.emit "rendered", data + @initialized = true unless @initialized + return diff --git a/nano/scripts/nanoui.handlers.js b/nano/scripts/nanoui.handlers.js deleted file mode 100644 index 8accf0be21c..00000000000 --- a/nano/scripts/nanoui.handlers.js +++ /dev/null @@ -1,76 +0,0 @@ -nanoui.handlers = (function (nanoui) { - "use strict"; - - - var updateStatus = function (data) { - var statusicon = document.query('#statusicon'); - if (!statusicon) { - return; - } - - switch (data.config.status) { - case 2: - statusicon.className = 'good'; - break; - case 1: - statusicon.className = 'average'; - break; - default: - statusicon.className = 'bad'; - } - }; - - var updateLinks = function (data) { - var links = document.queryAll('.link'); - var pendingLinks = document.queryAll('.link.pending'); - - if (data.config.status === 2) { - links.forEach(function (element) { - element.classList.remove('disabled'); - }); - pendingLinks.forEach(function (element) { - element.classList.remove('pending'); - }); - } else { - links.forEach(function (element) { - element.classList.remove('active'); - element.classList.remove('pending'); - element.classList.add('disabled'); - }); - } - }; - - var attachHandlers = function (data) { - var onClick = function (event) { - event.preventDefault(); - - var href = this.data('href'); - if (href !== null) { - if (data.config.status === 2) { - this.classList.add('pending'); - } - - location.href = href; - } - }; - - document.queryAll('.link.active').forEach(function (element) { - element.on('click', onClick); - }); - }; - - var error = function (message) { - var url = nanoui.util.href({nanoui_error: message}); - - location.href = url; - }; - - - nanoui.on('beforeRender', updateStatus); - nanoui.on('afterRender', updateLinks); - nanoui.on('afterRender', attachHandlers); - - nanoui.on('error', error); - - return {}; -}(nanoui)); diff --git a/nano/scripts/nanoui.helpers.js b/nano/scripts/nanoui.helpers.js deleted file mode 100644 index 92e0ae91cb5..00000000000 --- a/nano/scripts/nanoui.helpers.js +++ /dev/null @@ -1,69 +0,0 @@ -nanoui.helpers = (function (nanoui) { - "use strict"; - var helpers = {}; - - - helpers.link = function (text, icon, parameters, status, elementClass) { - var context = {}; - - context.text = text || ""; - context.icon = ""; - context.parameters = nanoui.util.href(parameters); - context.status = status; - context.elementClass = elementClass || ""; - - if (nanoui.util.yes(icon)) { - context.icon = nanoui.util.format("", {icon: icon}); - context.elementClass += ' iconed'; - } - - if (nanoui.util.yes(status)) { - return nanoui.util.format("", context); - } - return nanoui.util.format("", context); - }; - - helpers.bar = function (value, rangeMin, rangeMax, styleClass, barText) { - var context = {}; - - if (rangeMin < rangeMax) { - if (value < rangeMin) { - value = rangeMin; - } else if (value > rangeMax) { - value = rangeMax; - } - } else { - if (value > rangeMin) { - value = rangeMin; - } else if (value < rangeMax) { - value = rangeMax; - } - } - - context.styleClass = styleClass || ""; - context.barText = barText || ""; - context.percentage = Math.round((value - rangeMin) / (rangeMax - rangeMin) * 100); - - return nanoui.util.format("
#{barText}
", context); - }; - - helpers.round = function (number) { - return Math.round(number); - }; - - helpers.fixed = function (number, decimals) { - if (nanoui.util.no(decimals)) { decimals = 1; } - return Number(Math.round(number + 'e'+decimals) + 'e-'+decimals); - }; - - helpers.floor = function (number) { - return Math.floor(number); - }; - - helpers.ceil = function (number) { - return Math.ceil(number); - }; - - - return helpers; -}(nanoui)); diff --git a/nano/scripts/nanoui.js b/nano/scripts/nanoui.js deleted file mode 100644 index 68719403812..00000000000 --- a/nano/scripts/nanoui.js +++ /dev/null @@ -1,94 +0,0 @@ -var nanoui = (function (templates) { - "use strict"; - var nanoui = {}; - - - var _initialized = false; - var _layoutRendered = false; - var _contentRendered = false; - - var _initialData = {}; - var _data = {}; - - - var render = function (data) { - if (!_initialized) { - data = _initialData; - } - - nanoui.emit('beforeRender', data); - try { - if (!_layoutRendered || data.config.autoUpdateLayout) { - document.query('#layout').innerHTML = templates[data.config.templates.layout](data.data, data.config, nanoui.helpers); - _layoutRendered = true; - nanoui.emit('layoutRendered'); - } - if (!_contentRendered || data.config.autoUpdateContent) { - document.query('#content').innerHTML = templates[data.config.templates.content](data.data, data.config, nanoui.helpers); - _contentRendered = true; - nanoui.emit('contentRendered'); - } - } catch (error) { - nanoui.emit('error', error.fileName + ":" + error.lineNumber + ": " + error.message); - return; - } - nanoui.emit('afterRender', data); - - if (!_initialized) { - _initialized = true; - } - }; - - var update = function (data) { - if (!nanoui.util.hasKey(data, 'data')) { - if (nanoui.util.hasKey(_data, 'data')) { - data.data = _data.data; - } else { - data.data = {}; - } - } - - _data = data; - - if (_initialized) { - nanoui.emit('render', _data); - } - - nanoui.emit('updateReceived'); - }; - - var serverUpdate = function (dataString) { - var data; - try { - data = JSON.parse(dataString); - } catch (error) { - nanoui.emit('error', error.fileName + ":" + error.lineNumber + ": " + error.message); - return; - } - - nanoui.emit('serverUpdateReceived'); - nanoui.emit('update', data); - }; - - var init = function () { - nanoui.emit('earlyInit'); - - _initialData = JSON.parse(document.query('body').data('initial-data')); - if (_initialData === null || !nanoui.util.hasKey(_initialData, 'config') || !nanoui.util.hasKey(_initialData, 'data')) { - nanoui.emit('error', "Initial data did not load correctly."); - return; - } - - nanoui.emit('lateInit'); - }; - - - document.when('ready', init); - nanoui.on('lateInit', render); - nanoui.on('serverUpdate', serverUpdate); - - nanoui.on('render', render); - nanoui.on('update', update); - - return nanoui; -}(TMPL)); diff --git a/nano/scripts/nanoui.util.js b/nano/scripts/nanoui.util.js deleted file mode 100644 index 85319e8012f..00000000000 --- a/nano/scripts/nanoui.util.js +++ /dev/null @@ -1,82 +0,0 @@ -nanoui.util = (function (nanoui) { - "use strict"; - var util = {}; - - - var _urlParameters = {}; - - - var init = function () { - _urlParameters = JSON.parse(document.query('body').data('url-parameters')); - if (_urlParameters === null) { - nanoui.emit('error', "URL parameters did not load correctly."); - return; - } - }; - - util.extend = function (first, second) { - Object.keys(second).forEach(function (key) { - var secondVal = second[key]; - if (secondVal && Object.prototype.toString.call(secondVal) === '[object Object]') { - first[key] = first[key] || {}; - util.extend(first[key], secondVal); - } else { - first[key] = secondVal; - } - }); - - return first; - }; - - util.format = function (str, obj) { - if (!obj) { - return str; - } - function getValue(str, context) { - var ix = str.lastIndexOf('()'); - if (ix > 0 && ix + '()'.length === str.length) { - return context[str.substring(0, ix)](); - } - return context[str]; - } - return str.replace(/#\{(.+?)\}/g, function (ignore, $1) { - var split = $1.split('.'), - tmp = getValue(split[0], obj), - i, - l; - for (i = 1, l = split.length; i < l; i++) { - tmp = getValue(split[i], tmp); - } - return tmp; - }); - }; - - util.href = function (parameters) { - var url = new Url("byond://"); - - nanoui.util.extend(url.query, nanoui.util.extend(parameters, _urlParameters)); - - return url; - }; - - util.isFunction = function (func) { - return !!(func && func.call && func.apply); - }; - - util.hasKey = function (obj, key) { - return obj.hasOwnProperty(key); - }; - - util.yes = function (arg) { - return !(arg === 'undefined' || !arg); - }; - - util.no = function (arg) { - return arg === 'undefined' || !arg; - }; - - - nanoui.on('earlyInit', init); - - return util; -}(nanoui)); diff --git a/nano/scripts/util.coffee b/nano/scripts/util.coffee new file mode 100644 index 00000000000..4c03f449220 --- /dev/null +++ b/nano/scripts/util.coffee @@ -0,0 +1,21 @@ +@Util = + extend: (first, second) -> + Object.keys(second).forEach (key) -> + secondVal = second[key] + if secondVal and Object::toString.call(secondVal) is "[object Object]" + first[key] = first[key] or {} + @extend first[key], secondVal + else + first[key] = secondVal + return + + first + + + href: (parameters) -> + baseParameters = JSON.parse(document.query("#data").data("url-parameters")) + + url = new Url("byond://") + @extend url.query, @extend(parameters, baseParameters) + + url diff --git a/nano/styles/_bar.less b/nano/styles/_bar.less new file mode 100644 index 00000000000..50e074f1b6e --- /dev/null +++ b/nano/styles/_bar.less @@ -0,0 +1,48 @@ +@import "_config"; +@import "_util"; + + +.bar { + display: inline-block; + position: relative; + top: 4px; // Because this is an empty div, hack it so that it lines up. + vertical-align: top; + box-sizing: border-box; + width: 100%; + height: 20px; // Buttons are 22px, but look 20px because of their dark borders. + margin: 1px; + padding: 1px; + + border: 1px solid @normal; + + background: @dark; + + .barText { + position: absolute; + top: 1px; + right: 3px; + + .fontReset; + } + + .barFill { + display: block; + height: 100%; + + overflow: hidden; + + background: @normal; + &.good { + background: @good; + } + &.average { + background: @average; + } + &.bad { + background: @bad; + } + &.highlight { + background: @highlight; + } + } +} diff --git a/nano/styles/_common.less b/nano/styles/_common.less new file mode 100644 index 00000000000..95f25341f4c --- /dev/null +++ b/nano/styles/_common.less @@ -0,0 +1,10 @@ +@import "_config"; +@import "_util"; + +.content { + margin: 3px; +} + +.loading { + .noticeStripes; +} diff --git a/nano/styles/config.less b/nano/styles/_config.less similarity index 57% rename from nano/styles/config.less rename to nano/styles/_config.less index 5b06e0b1dce..0dae788a97c 100644 --- a/nano/styles/config.less +++ b/nano/styles/_config.less @@ -1,31 +1,33 @@ -// Fonts -@font: Verdana, Geneva, sans-serif; -@font-size: 12px; - -// Global Colors -@normal: #40628a; -@good: #4f7529; -@average: #cd6500; -@bad: #ee0000; -@label: #e9C183; -@highlight: #8ba5c4; -@dark: #272727; - -// Body Colors -@title: @label; -@text: white; -@text-inverse: black; -@background: @dark; - -// Component Colors -@border: @normal; - -// Link Colors -@selected: #2f943c; -@caution: #adaf00; -@danger: #ea0000; -@disabled: #999999; - -@link-border: #393939; - -@hover: 5%; +// Fonts +@font: Verdana, Geneva, sans-serif; +@fontsize: 12px; + +// Global Colors +@normal: #40628a; +@good: #4f7529; +@average: #cd6500; +@bad: #ee0000; +@highlight: #8ba5c4; +@info: #e9C183; +@label: @highlight; +@dark: #272727; + +// Body Colors +@title: #98b0c3; +@text: white; +@textinverse: black; +@background: @dark; + +// Component Colors +@border: @dark; +@rule: @normal; +@display: darken(@dark, 5%); +@notice1: #bb9b68; +@notice2: #b1905d; + +// Link Colors +@hover: 5%; +@selected: #2f943c; +@caution: #bbbe00; +@danger: #ea0000; +@disabled: #999999; diff --git a/nano/styles/_document.less b/nano/styles/_document.less new file mode 100644 index 00000000000..e6f3b9d0435 --- /dev/null +++ b/nano/styles/_document.less @@ -0,0 +1,33 @@ +@import "_config"; +@import "_util"; + + +body { + padding: 0; + margin: 0; + + font-family: @font; + font-size: @fontsize; + color: @text; + + background: @background; +} + +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 deleted file mode 100644 index 56797255a54..00000000000 --- a/nano/styles/_generic.less +++ /dev/null @@ -1,19 +0,0 @@ -@import "config"; -@import "common"; -@import "util"; -@import "link"; -@import "machines"; -@import "bar"; - -body { - background: @background url(background.png) 50% 0 repeat-x; -} - -#content { - clear: both; - padding: 8px; -} - -#loading { - &:extend(.notice); -} diff --git a/nano/styles/_interface.less b/nano/styles/_interface.less new file mode 100644 index 00000000000..efe238f7410 --- /dev/null +++ b/nano/styles/_interface.less @@ -0,0 +1,90 @@ +@import "_config"; +@import "_util"; + + +article.display { + display: flex; + flex-flow: column nowrap; + width: auto; + padding: 4px; + margin: 6px 2px; + + border: 2px solid @border; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5); + + background-color: rgba(0, 0, 0, 0.4); // Transparent background. + + header { + padding-left: 4px; + margin-bottom: 6px; + + border-bottom: 2px solid @rule; + } + + section { + width: 100%; + padding: 2px 0; + } + + section.text { + &:extend(section); + padding: 5px 0; + } + + section.button { + &:extend(section); + padding-bottom: 0; + } + + .cell { + display: inline-block; + margin: 0; + } + + .label { + .cell; + width: 33%; + + color: @label; + } + + .content { + .cell; + width: 66%; + } + + .line { + .cell; + width: 100%; + } + + table { + border-collapse: collapse; + } + + th { + padding: 2px 12px 4px 0; + text-align: left; + } + + td { + &:extend(th); + padding: 2px 2px 0 0; + } +} + +article.notice { + &:extend(article.display all); + margin: 8px 2px; + + border: none; + box-shadow: none; + + .label, span { + color: @textinverse; + font-weight: bolder; + font-style: italic; + } + + .noticeStripes; +} diff --git a/nano/styles/link.less b/nano/styles/_link.less similarity index 84% rename from nano/styles/link.less rename to nano/styles/_link.less index 8cebbe2b74a..834abf468b7 100644 --- a/nano/styles/link.less +++ b/nano/styles/_link.less @@ -1,52 +1,53 @@ -@import "config"; -@import "util"; - - -.active(@color) { - background-color: @color; - &:hover { - background-color: lighten(@color, @hover); - } -} - - -// Basic Link (Button) Element -.link { - height: 16px; - margin: 2px; - padding: 0 4px 4px 4px; - border: 1px solid @link-border; - display: inline-block; - box-sizing: content-box; - white-space: nowrap; - - .fontReset; // Reset font settings. - cursor: default; // This is a 'button,' not a link. - - // Tweak spacing to fit icons. - .iconed { padding-left: 3px; } - i { margin-right: 3px; } - // Swap icons when state goes to pending. - i.main { display: inline-block; } - i.pending { display: none; } - &.pending { - i.main { display: none; } - i.pending { display: inline-block; } - } - - // Link colors: - background-color: @normal; - &.active { - .active(@normal); - &.selected { .active(@selected); } - &.caution { .active(@caution); } - &.danger { .active(@danger); } - } - &.inactive { - background-color: @disabled; - &.selected { background-color: @selected; } - &.caution { background-color: @caution; } - &.danger { background-color: @danger; } - } - &.disabled { background-color: @disabled; } -} +@import "_config"; +@import "_util"; + + +.active(@color) { + background-color: @color; + &:hover { + background-color: lighten(@color, @hover); + } +} + + +// Basic Link (Button) Element +.link { + display: inline-block; + box-sizing: border-box; + height: 22px; + margin: 1px; + padding: 2px 3px; + white-space: nowrap; + + border: 1px solid @border; + + cursor: default; // This is a 'button,' not a link. + .fontReset; // Reset font settings. + + // Tweak spacing to fit icons. + .iconed { padding-left: 3px; } + i { margin-right: 3px; } + // Swap icons when state goes to pending. + i.main { display: inline-block; } + i.pending { display: none; } + &.pending { + i.main { display: none; } + i.pending { display: inline-block; } + } + + // Link colors: + background-color: @normal; + &.active { + .active(@normal); + &.selected { .active(@selected); } + &.caution { .active(@caution); } + &.danger { .active(@danger); } + } + &.inactive { + background-color: @disabled; + &.selected { background-color: @selected; } + &.caution { background-color: @caution; } + &.danger { background-color: @danger; } + } + &.disabled { background-color: @disabled; } +} diff --git a/nano/styles/_nanotrasen.less b/nano/styles/_nanotrasen.less deleted file mode 100644 index c8b5560b660..00000000000 --- a/nano/styles/_nanotrasen.less +++ /dev/null @@ -1,50 +0,0 @@ -@import "config"; -@import "common"; -@import "util"; -@import "link"; -@import "machines"; -@import "bar"; - -body { - background: @background url(background_nanotrasen.png) 50% 0 repeat-x; -} - -#title { - position: relative; - height: 30px; -} - -#statusicon { - position: absolute; - top: 4px; - left: 12px; -} - -#titletext { - position: absolute; - top: 6px; - left: 44px; - width: 66%; - overflow: hidden; - color: #E9C183; - font-size: 16px; -} - -#titlelogo { - position: absolute; - top: 4px; - right: 12px; - - width: 42px; - height: 24px; - background: url(logo_nanotrasen.png) 50% 50% no-repeat; -} - -#content { - padding: 8px; - &:extend(.clearBoth); -} - -#loading { - &:extend(.notice); -} diff --git a/nano/styles/_status.less b/nano/styles/_status.less new file mode 100644 index 00000000000..d5b28aec042 --- /dev/null +++ b/nano/styles/_status.less @@ -0,0 +1,12 @@ +@import "_config"; +@import "_util"; + + +.statusicon { + width: 24px; + height: 24px; + background-image: url('statusicon.png'); + &.good { background-position: 0 0; } + &.average { background-position: 0 -24px; } + &.bad { background-position: 0 -48px; } +} diff --git a/nano/styles/util.less b/nano/styles/_util.less similarity index 67% rename from nano/styles/util.less rename to nano/styles/_util.less index 24c3e011c6b..c350db6b1da 100644 --- a/nano/styles/util.less +++ b/nano/styles/_util.less @@ -1,45 +1,57 @@ -@import "config"; - - -// Colored Elements -.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); - -// Styled Elements -.bold { font-weight: bold; } -.italic { font-style: italic; } -.fontReset { - color: @text; - font-size: @font-size; - font-weight: normal; - font-style: normal; - text-decoration: none; -} - -// 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; } + +.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/images/background.png b/nano/styles/background.png similarity index 100% rename from nano/images/background.png rename to nano/styles/background.png diff --git a/nano/images/background_nanotrasen.png b/nano/styles/background_nanotrasen.png similarity index 100% rename from nano/images/background_nanotrasen.png rename to nano/styles/background_nanotrasen.png diff --git a/nano/images/background_syndicate.png b/nano/styles/background_syndicate.png similarity index 100% rename from nano/images/background_syndicate.png rename to nano/styles/background_syndicate.png diff --git a/nano/styles/bar.less b/nano/styles/bar.less deleted file mode 100644 index aa5c755fc34..00000000000 --- a/nano/styles/bar.less +++ /dev/null @@ -1,43 +0,0 @@ -@import "config"; -@import "util"; - - -.bar { - position: relative; - width: 236px; - height: 16px; - border: 1px solid #666666; - float: left; - margin: 0 5px 0 0; - overflow: hidden; - background: black; - box-sizing: border-box; - .barText { - position: absolute; - top: -2px; - left: 5px; - width: 100%; - height: 100%; - color: white; - font-weight: normal; - } - .barFill { - width: 0; - height: 100%; - background: #40628a; - overflow: hidden; - float: left; - &.good { - background: #4f7529; - } - &.average { - background: #cd6500; - } - &.bad { - background: #ea0000; - } - &.highlight { - background: #8BA5C4; - } - } -} diff --git a/nano/styles/common.less b/nano/styles/common.less deleted file mode 100644 index 4921953ed92..00000000000 --- a/nano/styles/common.less +++ /dev/null @@ -1,70 +0,0 @@ -@import "config"; -@import "util"; - - -body { - padding: 0; - margin: 0; - - font-family: @font; - font-size: @font-size; - line-height: 170%; - color: @text; - - background: @background; -} - -h1 { - font-size: @font-size + 6px; - margin: 0; - padding: 6px 0 6px 0; - clear: both; -} -h2 { - font-size: @font-size + 4px; - margin: 0; - padding: 6px 0 6px 0; - clear: both;} -h3 { - font-size: @font-size + 2px; - margin: 0; - padding: 6px 0 6px 0; - clear: both; -} - -hr { - background-color: @normal; - height: 1px; - border: none; -} - -ul { - padding: 4px 0 0 10px; - margin: 0; - list-style-type: none; - - li { - padding: 0 0 2px 0; - } -} - -noscript { - margin: 33% auto; - width: 50%; - height: 33%; - - background: #ffffff; - border: 2px solid #ff0000; - z-index: 9999; - padding: 0 10px; - text-align: center; -} - -#statusicon { - width: 24px; - height: 24px; - background: url(statusicon.png) no-repeat; - &.good { background-position: 0 0; } - &.average { background-position: 0 -24px; } - &.bad { background-position: 0 -48px; } -} diff --git a/nano/styles/generic.less b/nano/styles/generic.less new file mode 100644 index 00000000000..b1d5b0a7bb0 --- /dev/null +++ b/nano/styles/generic.less @@ -0,0 +1,11 @@ +@import "_config"; +@import "_util"; +@import "_document"; +@import "_common"; +@import "_link"; +@import "_bar"; + + +body { + background: @background url('background.png') 50% 0 repeat-x; +} diff --git a/nano/compiled/logo_nanotrasen.png b/nano/styles/logo_nanotrasen.png similarity index 100% rename from nano/compiled/logo_nanotrasen.png rename to nano/styles/logo_nanotrasen.png diff --git a/nano/images/logo_syndicate.png b/nano/styles/logo_syndicate.png similarity index 100% rename from nano/images/logo_syndicate.png rename to nano/styles/logo_syndicate.png diff --git a/nano/styles/machines.less b/nano/styles/machines.less deleted file mode 100644 index 2df0b1d1bd0..00000000000 --- a/nano/styles/machines.less +++ /dev/null @@ -1,151 +0,0 @@ -@import "config"; -@import "util"; - - -.notice { - padding: 2px 4px; - margin: 4px 0; - - color: @text-inverse; - background: url(background_notice.jpg) 50% 50%; - - &:extend(.bold); - &:extend(.italic); -} - -.noticePlaceholder { - &:extend(.notice); - color: @text; - background: none; -} - -.notice img { - position: absolute; - top: 0; - left: 0; - width: 16px; - height: 16px; -} - -div.notice { - clear: both; -} - - - -.itemGroup { - border: 1px solid #e9c183; - background: #2c2c2c; - padding: 4px; - clear: both; -} - -.item { - display: inline-block; - width: 100%; - clear: both; -} - -.itemContentNarrow, .itemContent { - float: left; -} - -.itemContentNarrow { - width: 30%; -} - -.itemContent { - width: 69%; -} - -.itemLabelNarrow, .itemLabel, .itemLabelWide, .itemLabelWider, .itemLabelWidest { - float: left; - color: #e9c183; -} - -.itemLabelNarrow { - width: 20%; -} - -.itemLabel { - width: 30%; -} - -.itemLabelWide { - width: 45%; -} - -.itemLabelWider { - width: 69%; -} - -.itemLabelWidest { - width: 100%; -} - -.itemContentWide { - float: left; - width: 79%; -} - -.itemContentSmall { - float: left; - width: 33%; -} - -.itemContentMedium { - float: left; - width: 55%; -} - -.statusDisplay { - display: block; - position: relative; - background: #000000; - color: #ffffff; - border: 1px solid #40628a; - padding: 4px; - margin: 2px; -} - -.statusDisplay .itemLabelNarrow, .statusDisplay .itemLabel, .statusDisplay .itemLabelWide, .statusDisplay .itemLabelWider, .statusDisplay .itemLabelWidest { - color: #98B0C3; -} - -.block { - padding: 8px; - margin: 10px 4px 4px 4px; - border: 1px solid #40628a; - background-color: #202020; -} - -.line { - width: 100%; - clear: both; -} - -.fixedLeft { - width: 110px; - float: left; -} - -.fixedLeftWide { - width: 165px; - float: left; -} - -.fixedLeftWider { - width: 220px; - float: left; -} - -.fixedLeftWidest { - width: 250px; - float: left; -} - -.fixedLeftWiderRed { - width: 220px; - float: left; - background: #ee0000; -} diff --git a/nano/styles/nanotrasen.less b/nano/styles/nanotrasen.less new file mode 100644 index 00000000000..fb151669c2d --- /dev/null +++ b/nano/styles/nanotrasen.less @@ -0,0 +1,45 @@ +@import "_config"; +@import "_util"; +@import "_document"; +@import "_common"; +@import "_interface"; +@import "_link"; +@import "_bar"; +@import "_status"; + + +body { + background: @background url('background_nanotrasen.png') 50% 0 repeat-x; +} + +header[role="titlebar"] { + position: relative; + height: 30px; + + .statusicon { + position: absolute; + top: 4px; + left: 12px; + } + + .title { + position: absolute; + top: 6px; + left: 44px; + height: 24px; + width: 66%; + + color: @title; + font-size: 16px; + } + + .logo { + position: absolute; + top: 4px; + right: 12px; + + width: 42px; + height: 24px; + background: url('logo_nanotrasen.png') 50% 50% no-repeat; + } +} diff --git a/nano/compiled/statusicon.png b/nano/styles/statusicon.png similarity index 100% rename from nano/compiled/statusicon.png rename to nano/styles/statusicon.png diff --git a/nano/templates/_generic.dot b/nano/templates/_generic.dot index d6395af9793..197930a4e26 100644 --- a/nano/templates/_generic.dot +++ b/nano/templates/_generic.dot @@ -1,3 +1,3 @@ -
-
Initiating...
-
\ No newline at end of file +
+
Initiating...
+
diff --git a/nano/templates/_nanotrasen.dot b/nano/templates/_nanotrasen.dot index 41d084b2d6e..8d8d24d44d5 100644 --- a/nano/templates/_nanotrasen.dot +++ b/nano/templates/_nanotrasen.dot @@ -1,9 +1,9 @@ -
-
-
{{=config.title}}
- -
- -
-
Initiating...
-
+
+
+
{{=config.title}}
+ +
+ +
+
Initiating...
+
diff --git a/nano/templates/air_alarm.dot b/nano/templates/air_alarm.dot index 5f590f08e05..7a10020fc97 100644 --- a/nano/templates/air_alarm.dot +++ b/nano/templates/air_alarm.dot @@ -1,248 +1,255 @@ -
- {{? data.siliconUser}} -
- Interface Lock: -
-
- {{=helper.link('Engaged', 'locked', {'toggleaccess': 1}, data.locked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlocked', {'toggleaccess': 1}, 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': 1})}}
- {{?}} - {{? data.screen == 1}} -

Air Controls

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

Vent Controls

- {{~ data.vents:vent:i}} -

{{=vent.long_name}}

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

Scrubber Controls

- {{~ data.scrubbers:scrubber:i}} -

{{=scrubber.long_name}}

-
-
-
- Power: -
-
- {{? scrubber.power}} - {{=helper.link('On', 'power-off', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Off', 'close', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
-
- Mode: -
-
- {{? scrubber.scrubbing}} - {{=helper.link('Scrubbing', 'filter', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null)}} - {{??}} - {{=helper.link('Siphoning', 'sign-in', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger')}} - {{?}} -
-
-
-
- Range: -
-
- {{? scrubber.widenet}} - {{=helper.link('Extended', 'expand', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution')}} - {{??}} - {{=helper.link('Normal', 'compress', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null)}} - {{?}} -
-
-
-
- Filters: -
-
- {{=helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', {'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', {'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', {'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}, 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, {'command': 'set_threshold', 'env': setting.env, 'var': setting.val})}} -
- - {{?}} -{{?}} +
+ {{? data.siliconUser}} +
+ + Interface Lock: + +
+ {{=helper.link('Engaged', 'lock', {'toggleaccess': 1}, data.locked ? 'selected' : null)}} + {{=helper.link('Disengaged', 'unlock', {'toggleaccess': 1}, 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': 1})}} + {{?}} + {{? data.screen == 1}} +
+

Air Controls

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

{{=vent.long_name}}

+
+ + Power: + +
+ {{? vent.power}} + {{=helper.link('On', 'power-off', {'id_tag': vent.id_tag, 'command': 'power', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Off', 'close', {'id_tag': vent.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ + Mode: + +
+ {{? vent.direction == "release"}} + Pressurizing + {{??}} + Siphoning + {{?}} +
+
+
+ + Pressure Checks: + +
+ {{=helper.link('Internal', 'sign-in', {'id_tag': vent.id_tag, 'command': 'incheck', 'val': vent.checks}, null, vent.incheck ? 'selected' : null)}} + {{=helper.link('External', 'sign-out', {'id_tag': vent.id_tag, 'command': 'excheck', 'val': vent.checks}, null, vent.excheck ? 'selected' : null)}} +
+
+
+ + Set Pressure: + +
+ {{=helper.link(helper.fixed(vent.external), 'pencil', {'id_tag': vent.id_tag, 'command': 'set_external_pressure'})}} + {{=helper.link('Reset', 'refresh', { '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', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Off', 'close', {'id_tag': scrubber.id_tag, 'command': 'power', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ + Mode: + +
+ {{? scrubber.scrubbing}} + {{=helper.link('Scrubbing', 'filter', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 0}, null, null)}} + {{??}} + {{=helper.link('Siphoning', 'sign-in', {'id_tag': scrubber.id_tag, 'command': 'scrubbing', 'val': 1}, null, 'danger')}} + {{?}} +
+
+
+ + Range: + +
+ {{? scrubber.widenet}} + {{=helper.link('Extended', 'expand', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 0}, null, 'caution')}} + {{??}} + {{=helper.link('Normal', 'compress', {'id_tag': scrubber.id_tag, 'command': 'widenet', 'val': 1}, null, null)}} + {{?}} +
+
+
+ + Filters: + +
+ {{=helper.link("CO2", scrubber.filter_co2 ? 'check-square-o' : 'square-o', {'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', {'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', {'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}, 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, {'command': 'set_threshold', 'env': setting.env, 'var': setting.val})}} +
+ + {{?}} +{{?}} diff --git a/nano/templates/apc.dot b/nano/templates/apc.dot index d6c46b6d5ab..2e17a6f046b 100644 --- a/nano/templates/apc.dot +++ b/nano/templates/apc.dot @@ -1,174 +1,171 @@ -
- {{? data.siliconUser}} -
- Interface Lock: -
-
- {{=helper.link('Engaged', 'lock', {'toggleaccess' : 1}, data.locked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', {'toggleaccess' : 1}, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected'))}} -
-
- {{??}} - {{? data.locked}} - Swipe an ID card to unlock this interface. - {{??}} - Swipe an ID card to lock this interface. - {{?}} - {{?}} -
-

Power Status

-
-
-
- Main Breaker: -
-
- {{? data.locked && !data.siliconUser}} - {{? data.isOperating}} - On - {{??}} - Off - {{?}} - {{??}} - {{=helper.link('On', 'power-off', {'breaker' : 1}, data.isOperating ? 'selected' : null)}} - {{=helper.link('Off', 'close', {'breaker' : 1}, data.isOperating ? null : 'selected')}} - {{?}} -
-
-
-
- External Power: -
-
- {{? data.externalPower == 2}} - Good - {{?? data.externalPower == 1}} - Low - {{??}} - None - {{?}} -
-
-
-
- Power Cell: -
- {{? data.powerCellStatus != null}} - {{=helper.bar(data.powerCellStatus, 0, 100, data.powerCellStatus >= 50 ? 'good' : data.powerCellStatus >= 25 ? 'average' : 'bad')}} -
- {{=helper.round(data.powerCellStatus*10)/10}}% -
- {{??}} -
- Power cell removed. -
- {{?}} -
- {{? data.powerCellStatus != null}} -
-
- Charge Mode: -
-
- {{? data.locked && !data.siliconUser}} - {{? data.chargeMode}} - Auto - {{??}} - Off - {{?}} - {{??}} - {{=helper.link('Auto', 'refresh', {'cmode' : 1}, data.chargeMode ? 'selected' : null)}} - {{=helper.link('Off', 'close', {'cmode' : 1}, data.chargeMode ? null : 'selected')}} - {{?}} -   - {{? data.chargingStatus > 1}} - [Fully Charged] - {{?? data.chargingStatus == 1}} - [Charging] - {{??}} - [Not Charging] - {{?}} -
-
- {{?}} -
-

Power Channels

-
- {{~ data.powerChannels :channel:i}} -
-
- {{=channel.title}}: -
-
- {{=channel.powerLoad}} W -
-
- {{? channel.status <= 1}} - Off - {{?? channel.status >= 2}} - On - {{?}} -   - {{? channel.status == 1 || channel.status == 3}} - [Auto] - {{??}} - [Manual] - {{?}} -
- {{? !data.locked || data.siliconUser}} -
- {{=helper.link('Auto', 'refresh', channel.topicParams.auto, (channel.status == 1 || channel.status == 3) ? 'selected' : null)}} - {{=helper.link('On', 'power-off', channel.topicParams.on, (channel.status == 2) ? 'selected' : null)}} - {{=helper.link('Off', 'close', channel.topicParams.off, (channel.status == 0) ? 'selected' : null)}} -
- {{?}} -
- {{~}} -
-
- Total Load: -
-
- {{=data.totalLoad}} W -
-
-
-{{? data.siliconUser}} -
-

System Overrides

-
-
- {{=helper.link('Overload Lighting Circuit', 'lightbulb', {'overload' : 1})}} -
-
- {{? data.malfStatus == 1}} - {{=helper.link('Override Programming', 'script', {'malfhack' : 1})}} - {{?? data.malfStatus == 2}} - {{=helper.link('Shunt Core Processes', 'arrowreturn-1-s', {'occupyapc' : 1})}} - {{?? data.malfStatus == 3}} - {{=helper.link('Return to Main Core', 'arrowreturn-1-w', {'deoccupyapc' : 1})}} - {{?? data.malfStatus == 4}} - {{=helper.link('Shunt Core Processes', 'arrowreturn-1-s', {'occupyapc' : 1}, 'linkOff')}} - {{?}} -
-
-{{?}} -
-
-
- Cover Lock: -
-
- {{? data.locked && !data.siliconUser}} - {{? data.coverLocked}} - Engaged - {{??}} - Disengaged - {{?}} - {{??}} - {{=helper.link('Engaged', 'lock', {'lock' : 1}, data.coverLocked ? 'selected' : null)}} - {{=helper.link('Disengaged', 'unlock', {'lock' : 1}, data.coverLocked ? null : 'selected')}} - {{?}} -
-
-
+
+ {{? data.siliconUser}} +
+ + Interface Lock: + +
+ {{=helper.link('Engaged', 'lock', {'toggleaccess': 1}, data.locked ? 'selected' : null)}} + {{=helper.link('Disengaged', 'unlock', {'toggleaccess' : 1}, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected'))}} +
+
+ {{??}} + {{? data.locked}} + Swipe an ID card to unlock this interface. + {{??}} + Swipe an ID card to lock this interface. + {{?}} + {{?}} +
+
+

Power Status

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

Power Channels

+ {{~ data.powerChannels :channel:i}} +
+ + {{=channel.title}}: + +
+ {{=channel.powerLoad}} W +
+
+ {{? channel.status <= 1}} + Off + {{?? channel.status >= 2}} + On + {{?}} +   + {{? channel.status == 1 || channel.status == 3}} + [Auto] + {{??}} + [Manual] + {{?}} +
+ {{? !data.locked || data.siliconUser}} +
+ {{=helper.link('Auto', 'refresh', channel.topicParams.auto, (channel.status == 1 || channel.status == 3) ? 'selected' : null)}} + {{=helper.link('On', 'power-off', channel.topicParams.on, (channel.status == 2) ? 'selected' : null)}} + {{=helper.link('Off', 'close', channel.topicParams.off, (channel.status == 0) ? 'selected' : null)}} +
+ {{?}} + + {{~}} +
+ + Total Load: + +
+ {{=data.totalLoad}} W +
+
+
+{{? data.siliconUser}} +
+

System Overrides

+
+ {{=helper.link('Overload Lighting Circuit', 'lightbulb-o', {'overload' : 1})}} +
+
+ {{? data.malfStatus == 1}} + {{=helper.link('Override Programming', 'terminal', {'malfhack' : 1})}} + {{?? data.malfStatus == 2}} + {{=helper.link('Shunt Core Processes', 'caret-square-o-down', {'occupyapc' : 1})}} + {{?? data.malfStatus == 3}} + {{=helper.link('Return to Main Core', 'carat-square-o-left', {'deoccupyapc' : 1})}} + {{?? data.malfStatus == 4}} + {{=helper.link('Shunt Core Processes', 'caret-square-o-down', {'occupyapc' : 1}, 'linkOff')}} + {{?}} +
+
+{{?}} +
+
+ + Cover Lock: + +
+ {{? data.locked && !data.siliconUser}} + {{? data.coverLocked}} + Engaged + {{??}} + Disengaged + {{?}} + {{??}} + {{=helper.link('Engaged', 'lock', {'lock' : 1}, data.coverLocked ? 'selected' : null)}} + {{=helper.link('Disengaged', 'unlock', {'lock' : 1}, data.coverLocked ? null : 'selected')}} + {{?}} +
+
+