diff --git a/code/datums/components/nanites.dm b/code/datums/components/nanites.dm
index a2566aef..0eb80647 100644
--- a/code/datums/components/nanites.dm
+++ b/code/datums/components/nanites.dm
@@ -36,6 +36,7 @@
/datum/component/nanites/RegisterWithParent()
RegisterSignal(parent, COMSIG_HAS_NANITES, .proc/confirm_nanites)
+ RegisterSignal(parent, COMSIG_NANITE_IS_STEALTHY, .proc/check_stealth)
RegisterSignal(parent, COMSIG_NANITE_UI_DATA, .proc/nanite_ui_data)
RegisterSignal(parent, COMSIG_NANITE_GET_PROGRAMS, .proc/get_programs)
RegisterSignal(parent, COMSIG_NANITE_SET_VOLUME, .proc/set_volume)
@@ -56,9 +57,11 @@
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_shock)
RegisterSignal(parent, COMSIG_SPECIES_GAIN, .proc/check_viable_biotype)
RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal)
+ RegisterSignal(parent, COMSIG_NANITE_COMM_SIGNAL, .proc/receive_comm_signal)
/datum/component/nanites/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_HAS_NANITES,
+ COMSIG_NANITE_IS_STEALTHY,
COMSIG_NANITE_UI_DATA,
COMSIG_NANITE_GET_PROGRAMS,
COMSIG_NANITE_SET_VOLUME,
@@ -77,7 +80,8 @@
COMSIG_LIVING_MINOR_SHOCK,
COMSIG_MOVABLE_HEAR,
COMSIG_SPECIES_GAIN,
- COMSIG_NANITE_SIGNAL))
+ COMSIG_NANITE_SIGNAL,
+ COMSIG_NANITE_COMM_SIGNAL))
/datum/component/nanites/Destroy()
STOP_PROCESSING(SSnanites, src)
@@ -186,6 +190,9 @@
var/datum/nanite_program/NP = X
NP.on_minor_shock()
+/datum/component/nanites/proc/check_stealth(datum/source)
+ return stealth
+
/datum/component/nanites/proc/on_death(datum/source, gibbed)
for(var/X in programs)
var/datum/nanite_program/NP = X
@@ -196,6 +203,12 @@
var/datum/nanite_program/NP = X
NP.receive_signal(code, source)
+/datum/component/nanites/proc/receive_comm_signal(datum/source, comm_code, comm_message, comm_source = "an unidentified source")
+ for(var/X in programs)
+ if(istype(X, /datum/nanite_program/triggered/comm))
+ var/datum/nanite_program/triggered/comm/NP = X
+ NP.receive_comm_signal(comm_code, comm_message, comm_source)
+
/datum/component/nanites/proc/check_viable_biotype()
if((MOB_SILICON & host_mob.mob_biotypes))
qdel(src) //bodytype no longer sustains nanites
diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm
index 2e783adf..1e1c4c54 100644
--- a/code/datums/mood_events/generic_negative_events.dm
+++ b/code/datums/mood_events/generic_negative_events.dm
@@ -217,7 +217,14 @@
mood_change = -3
timeout = 10 MINUTES
+/datum/mood_event/nanite_sadness
+ description = "+++++++HAPPINESS SUPPRESSION+++++++\n"
+ mood_change = -7
/datum/mood_event/daylight_2
description = "I have been scorched by the unforgiving rays of the sun.\n"
mood_change = -6
timeout = 15 MINUTES
+
+/datum/mood_event/nanite_sadness/add_effects(message)
+ description = "+++++++[message]+++++++\n"
+
diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm
index 0de5cd26..2027a99f 100644
--- a/code/datums/mood_events/generic_positive_events.dm
+++ b/code/datums/mood_events/generic_positive_events.dm
@@ -131,6 +131,17 @@
description = "Whatever I ate was a-nya-zing!\n"
mood_change = 8 //Felinids become pacified from catnip, so give a bigger mood boost
+/datum/mood_event/nanite_happiness
+ description = "+++++++HAPPINESS ENHANCEMENT+++++++\n"
+ mood_change = 7
+
+/datum/mood_event/nanite_happiness/add_effects(message)
+ description = "+++++++[message]+++++++\n"
+
+/datum/mood_event/area
+ description = "" //Fill this out in the area
+ mood_change = 0
+
//Bloodsucker stuff below.
/datum/mood_event/drankblood
description = "I have fed greedly from that which nourishes me.\n"
diff --git a/code/modules/research/designs/electronics_designs.dm b/code/modules/research/designs/electronics_designs.dm
index 26266f75..1d91175f 100644
--- a/code/modules/research/designs/electronics_designs.dm
+++ b/code/modules/research/designs/electronics_designs.dm
@@ -36,6 +36,16 @@
category = list("Electronics")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
+/datum/design/nanite_comm_remote
+ name = "Nanite Communication Remote"
+ desc = "Allows for the construction of a nanite communication remote."
+ id = "nanite_comm_remote"
+ build_type = PROTOLATHE
+ materials = list(MAT_GLASS = 500, MAT_METAL = 500)
+ build_path = /obj/item/nanite_remote/comm
+ category = list("Electronics")
+ departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
+
/datum/design/nanite_scanner
name = "Nanite Scanner"
desc = "Allows for the construction of a nanite scanner."
diff --git a/code/modules/research/designs/nanite_designs.dm b/code/modules/research/designs/nanite_designs.dm
index 09fe1d9c..13668ba5 100644
--- a/code/modules/research/designs/nanite_designs.dm
+++ b/code/modules/research/designs/nanite_designs.dm
@@ -380,7 +380,7 @@
name = "Mind Control"
desc = "The nanites imprint an absolute directive onto the host's brain while they're active."
id = "mindcontrol_nanites"
- program_type = /datum/nanite_program/mind_control
+ program_type = /datum/nanite_program/triggered/comm/mind_control
category = list("Weaponized Nanites")
////////////////////SUPPRESSION NANITES//////////////////////////////////////
@@ -445,21 +445,35 @@
name = "Skull Echo"
desc = "The nanites echo a synthesized message inside the host's skull."
id = "voice_nanites"
- program_type = /datum/nanite_program/triggered/voice
+ program_type = /datum/nanite_program/triggered/comm/voice
category = list("Suppression Nanites")
/datum/design/nanites/speech
name = "Forced Speech"
desc = "The nanites force the host to say a pre-programmed sentence when triggered."
id = "speech_nanites"
- program_type = /datum/nanite_program/triggered/speech
+ program_type = /datum/nanite_program/triggered/comm/speech
category = list("Suppression Nanites")
/datum/design/nanites/hallucination
name = "Hallucination"
desc = "The nanites make the host see and hear things that aren't real."
id = "hallucination_nanites"
- program_type = /datum/nanite_program/triggered/hallucination
+ program_type = /datum/nanite_program/triggered/comm/hallucination
+ category = list("Suppression Nanites")
+
+/datum/design/nanites/good_mood
+ name = "Happiness Enhancer"
+ desc = "The nanites synthesize serotonin inside the host's brain, creating an artificial sense of happiness."
+ id = "good_mood_nanites"
+ program_type = /datum/nanite_program/good_mood
+ category = list("Suppression Nanites")
+
+/datum/design/nanites/bad_mood
+ name = "Happiness Suppressor"
+ desc = "The nanites suppress the production of serotonin inside the host's brain, creating an artificial state of depression."
+ id = "bad_mood_nanites"
+ program_type = /datum/nanite_program/bad_mood
category = list("Suppression Nanites")
////////////////////SENSOR NANITES//////////////////////////////////////
diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm
index ef7e767b..049a6d01 100644
--- a/code/modules/research/nanites/nanite_programs/healing.dm
+++ b/code/modules/research/nanites/nanite_programs/healing.dm
@@ -3,7 +3,7 @@
/datum/nanite_program/regenerative
name = "Accelerated Regeneration"
desc = "The nanites boost the host's natural regeneration, increasing their healing speed. Does not consume nanites if the host is unharmed."
- use_rate = 2.5
+ use_rate = 0.5
rogue_types = list(/datum/nanite_program/necrotic)
/datum/nanite_program/regenerative/check_conditions()
@@ -23,11 +23,11 @@
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(1/parts.len, 1/parts.len))
+ if(L.heal_damage(0.5/parts.len, 0.5/parts.len, null, BODYPART_ORGANIC))
host_mob.update_damage_overlays()
else
- host_mob.adjustBruteLoss(-1, TRUE)
- host_mob.adjustFireLoss(-1, TRUE)
+ host_mob.adjustBruteLoss(-0.5, TRUE)
+ host_mob.adjustFireLoss(-0.5, TRUE)
/datum/nanite_program/temperature
name = "Temperature Adjustment"
@@ -112,7 +112,7 @@
/datum/nanite_program/repairing
name = "Mechanical Repair"
desc = "The nanites fix damage in the host's mechanical limbs."
- use_rate = 0.5 //much more efficient than organic healing
+ use_rate = 0.5
rogue_types = list(/datum/nanite_program/necrotic)
/datum/nanite_program/repairing/check_conditions()
@@ -137,13 +137,13 @@
return
var/update = FALSE
for(var/obj/item/bodypart/L in parts)
- if(L.heal_damage(1/parts.len, 1/parts.len, only_robotic = TRUE, only_organic = FALSE))
+ if(L.heal_damage(1.5/parts.len, 1.5/parts.len, null, BODYPART_ROBOTIC)) //much faster than organic healing
update = TRUE
if(update)
host_mob.update_damage_overlays()
else
- host_mob.adjustBruteLoss(-1, TRUE)
- host_mob.adjustFireLoss(-1, TRUE)
+ host_mob.adjustBruteLoss(-1.5, TRUE)
+ host_mob.adjustFireLoss(-1.5, TRUE)
/datum/nanite_program/purging_advanced
name = "Selective Blood Purification"
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index a0df4dc6..e4b250ad 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -114,7 +114,19 @@
. = ..()
host_mob.cure_fakedeath("nanites")
-/datum/nanite_program/triggered/speech
+//Can receive transmissions from a nanite communication remote for customized messages
+/datum/nanite_program/triggered/comm
+ var/comm_code = 0
+ var/comm_message = ""
+
+/datum/nanite_program/triggered/comm/proc/receive_comm_signal(signal_comm_code, comm_message, comm_source)
+ if(!activated || !comm_code)
+ return
+ if(signal_comm_code == comm_code)
+ host_mob.investigate_log("'s [name] nanite program was messaged by [comm_source] with comm code [signal_comm_code] and message '[comm_message]'.", INVESTIGATE_NANITES)
+ trigger(comm_message)
+
+/datum/nanite_program/triggered/comm/speech
name = "Forced Speech"
desc = "The nanites force the host to say a pre-programmed sentence when triggered."
unique = FALSE
@@ -122,10 +134,10 @@
trigger_cooldown = 20
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
- extra_settings = list("Sentence")
+ extra_settings = list("Sentence","Comm Code")
var/sentence = ""
-/datum/nanite_program/triggered/speech/set_extra_setting(user, setting)
+/datum/nanite_program/triggered/comm/speech/set_extra_setting(user, setting)
if(setting == "Sentence")
var/new_sentence = stripped_input(user, "Choose the sentence that the host will be forced to say.", "Sentence", sentence, MAX_MESSAGE_LEN)
if(!new_sentence)
@@ -133,23 +145,34 @@
if(new_sentence[1] == "*") //emotes are abusable, like surrender
return
sentence = new_sentence
+ if(setting == "Comm Code")
+ var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
+ if(isnull(new_code))
+ return
+ comm_code = CLAMP(round(new_code, 1), 0, 9999)
-/datum/nanite_program/triggered/speech/get_extra_setting(setting)
+/datum/nanite_program/triggered/comm/speech/get_extra_setting(setting)
if(setting == "Sentence")
return sentence
+ if(setting == "Comm Code")
+ return comm_code
-/datum/nanite_program/triggered/speech/copy_extra_settings_to(datum/nanite_program/triggered/speech/target)
+/datum/nanite_program/triggered/comm/speech/copy_extra_settings_to(datum/nanite_program/triggered/comm/speech/target)
target.sentence = sentence
+ target.comm_code = comm_code
-/datum/nanite_program/triggered/speech/trigger()
+/datum/nanite_program/triggered/comm/speech/trigger(comm_message)
if(!..())
return
+ var/sent_message = comm_message
+ if(!comm_message)
+ sent_message = sentence
if(host_mob.stat == DEAD)
return
to_chat(host_mob, "You feel compelled to speak...")
- host_mob.say(sentence, forced = "nanite speech")
+ host_mob.say(sent_message, forced = "nanite speech")
-/datum/nanite_program/triggered/voice
+/datum/nanite_program/triggered/comm/voice
name = "Skull Echo"
desc = "The nanites echo a synthesized message inside the host's skull."
unique = FALSE
@@ -157,44 +180,62 @@
trigger_cooldown = 20
rogue_types = list(/datum/nanite_program/brain_misfire, /datum/nanite_program/brain_decay)
- extra_settings = list("Message")
+ extra_settings = list("Message","Comm Code")
var/message = ""
-/datum/nanite_program/triggered/voice/set_extra_setting(user, setting)
+/datum/nanite_program/triggered/comm/voice/set_extra_setting(user, setting)
if(setting == "Message")
var/new_message = stripped_input(user, "Choose the message sent to the host.", "Message", message, MAX_MESSAGE_LEN)
if(!new_message)
return
message = new_message
+ if(setting == "Comm Code")
+ var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
+ if(isnull(new_code))
+ return
+ comm_code = CLAMP(round(new_code, 1), 0, 9999)
-/datum/nanite_program/triggered/voice/get_extra_setting(setting)
+/datum/nanite_program/triggered/comm/voice/get_extra_setting(setting)
if(setting == "Message")
return message
+ if(setting == "Comm Code")
+ return comm_code
-/datum/nanite_program/triggered/voice/copy_extra_settings_to(datum/nanite_program/triggered/voice/target)
+/datum/nanite_program/triggered/comm/voice/copy_extra_settings_to(datum/nanite_program/triggered/comm/voice/target)
target.message = message
+ target.comm_code = comm_code
-/datum/nanite_program/triggered/voice/trigger()
+/datum/nanite_program/triggered/comm/voice/trigger(comm_message)
if(!..())
return
+ var/sent_message = comm_message
+ if(!comm_message)
+ sent_message = message
if(host_mob.stat == DEAD)
return
- to_chat(host_mob, "You hear a strange, robotic voice in your head... \"[message]\"")
+ to_chat(host_mob, "You hear a strange, robotic voice in your head... \"[sent_message]\"")
-/datum/nanite_program/triggered/hallucination
+/datum/nanite_program/triggered/comm/hallucination
name = "Hallucination"
desc = "The nanites make the host hallucinate something when triggered."
trigger_cost = 4
trigger_cooldown = 80
unique = FALSE
rogue_types = list(/datum/nanite_program/brain_misfire)
- extra_settings = list("Hallucination Type")
+ extra_settings = list("Hallucination Type", "Comm Code")
var/hal_type
var/hal_details
-/datum/nanite_program/triggered/hallucination/trigger()
+/datum/nanite_program/triggered/comm/hallucination/trigger(comm_message)
if(!..())
return
+
+ if(comm_message && (hal_type != "Message")) //Triggered via comm remote, but not set to a message hallucination
+ return
+ var/sent_message = comm_message //Comm remotes can send custom hallucination messages for the chat hallucination
+ if(!sent_message)
+ sent_message = hal_details
+
if(!iscarbon(host_mob))
return
var/mob/living/carbon/C = host_mob
@@ -203,7 +244,7 @@
else
switch(hal_type)
if("Message")
- new /datum/hallucination/chat(C, TRUE, null, hal_details)
+ new /datum/hallucination/chat(C, TRUE, null, sent_message)
if("Battle")
new /datum/hallucination/battle(C, TRUE, hal_details)
if("Sound")
@@ -223,7 +264,13 @@
if("Plasma Flood")
new /datum/hallucination/fake_flood(C, TRUE)
-/datum/nanite_program/triggered/hallucination/set_extra_setting(user, setting)
+/datum/nanite_program/triggered/comm/hallucination/set_extra_setting(user, setting)
+ if(setting == "Comm Code")
+ var/new_code = input(user, "(Only for Message) Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
+ if(isnull(new_code))
+ return
+ comm_code = CLAMP(round(new_code, 1), 0, 9999)
+
if(setting == "Hallucination Type")
var/list/possible_hallucinations = list("Random","Message","Battle","Sound","Weird Sound","Station Message","Health","Alert","Fire","Shock","Plasma Flood")
var/hal_type_choice = input("Choose the hallucination type", name) as null|anything in possible_hallucinations
@@ -299,13 +346,76 @@
if("Plasma Flood")
hal_type = "Plasma Flood"
-/datum/nanite_program/triggered/hallucination/get_extra_setting(setting)
+/datum/nanite_program/triggered/comm/hallucination/get_extra_setting(setting)
if(setting == "Hallucination Type")
if(!hal_type)
return "Random"
else
return hal_type
+ if(setting == "Comm Code")
+ return comm_code
-/datum/nanite_program/triggered/hallucination/copy_extra_settings_to(datum/nanite_program/triggered/hallucination/target)
+/datum/nanite_program/triggered/comm/hallucination/copy_extra_settings_to(datum/nanite_program/triggered/comm/hallucination/target)
target.hal_type = hal_type
- target.hal_details = hal_details
\ No newline at end of file
+ target.hal_details = hal_details
+ target.comm_code = comm_code
+
+/datum/nanite_program/good_mood
+ name = "Happiness Enhancer"
+ desc = "The nanites synthesize serotonin inside the host's brain, creating an artificial sense of happiness."
+ use_rate = 0.1
+ rogue_types = list(/datum/nanite_program/brain_decay)
+ extra_settings = list("Mood Message")
+ var/message = "HAPPINESS ENHANCEMENT"
+
+/datum/nanite_program/good_mood/set_extra_setting(user, setting)
+ if(setting == "Mood Message")
+ var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
+ if(!new_message)
+ return
+ message = new_message
+
+/datum/nanite_program/good_mood/get_extra_setting(setting)
+ if(setting == "Mood Message")
+ return message
+
+/datum/nanite_program/good_mood/copy_extra_settings_to(datum/nanite_program/good_mood/target)
+ target.message = message
+
+/datum/nanite_program/good_mood/enable_passive_effect()
+ . = ..()
+ SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_happy", /datum/mood_event/nanite_happiness, message)
+
+/datum/nanite_program/good_mood/disable_passive_effect()
+ . = ..()
+ SEND_SIGNAL(host_mob, COMSIG_CLEAR_MOOD_EVENT, "nanite_happy")
+
+/datum/nanite_program/bad_mood
+ name = "Happiness Suppressor"
+ desc = "The nanites suppress the production of serotonin inside the host's brain, creating an artificial state of depression."
+ use_rate = 0.1
+ rogue_types = list(/datum/nanite_program/brain_decay)
+ extra_settings = list("Mood Message")
+ var/message = "HAPPINESS SUPPRESSION"
+
+/datum/nanite_program/bad_mood/set_extra_setting(user, setting)
+ if(setting == "Mood Message")
+ var/new_message = stripped_input(user, "Choose the message visible on the mood effect.", "Message", message, MAX_NAME_LEN)
+ if(!new_message)
+ return
+ message = new_message
+
+/datum/nanite_program/bad_mood/get_extra_setting(setting)
+ if(setting == "Mood Message")
+ return message
+
+/datum/nanite_program/bad_mood/copy_extra_settings_to(datum/nanite_program/bad_mood/target)
+ target.message = message
+
+/datum/nanite_program/bad_mood/enable_passive_effect()
+ . = ..()
+ SEND_SIGNAL(host_mob, COMSIG_ADD_MOOD_EVENT, "nanite_sadness", /datum/mood_event/nanite_sadness, message)
+
+/datum/nanite_program/bad_mood/disable_passive_effect()
+ . = ..()
+ SEND_SIGNAL(host_mob, COMSIG_CLEAR_MOOD_EVENT, "nanite_sadness")
diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm
index 3db482d9..46f5de16 100644
--- a/code/modules/research/nanites/nanite_programs/utility.dm
+++ b/code/modules/research/nanites/nanite_programs/utility.dm
@@ -6,6 +6,7 @@
rogue_types = list(/datum/nanite_program/toxic)
extra_settings = list("Program Overwrite","Cloud Overwrite")
+ var/pulse_cooldown = 0
var/sync_programs = TRUE
var/sync_overwrite = FALSE
var/overwrite_cloud = FALSE
@@ -67,12 +68,16 @@
target.sync_overwrite = sync_overwrite
/datum/nanite_program/viral/active_effect()
+ if(world.time < pulse_cooldown)
+ return
for(var/mob/M in orange(host_mob, 5))
- if(prob(5))
- if(sync_programs)
- SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, sync_overwrite)
- if(overwrite_cloud)
- SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, set_cloud)
+ if(SEND_SIGNAL(M, COMSIG_NANITE_IS_STEALTHY))
+ continue
+ if(sync_programs)
+ SEND_SIGNAL(M, COMSIG_NANITE_SYNC, nanites, sync_overwrite)
+ if(overwrite_cloud)
+ SEND_SIGNAL(M, COMSIG_NANITE_SET_CLOUD, set_cloud)
+ pulse_cooldown = world.time + 75
/datum/nanite_program/monitoring
name = "Monitoring"
@@ -197,6 +202,15 @@
return
SEND_SIGNAL(host_mob, COMSIG_NANITE_SIGNAL, code, source)
+/datum/nanite_program/relay/proc/relay_comm_signal(comm_code, relay_code, comm_message)
+ if(!activated)
+ return
+ if(!host_mob)
+ return
+ if(relay_code != relay_channel)
+ return
+ SEND_SIGNAL(host_mob, COMSIG_NANITE_COMM_SIGNAL, comm_code, comm_message)
+
/datum/nanite_program/metabolic_synthesis
name = "Metabolic Synthesis"
desc = "The nanites use the metabolic cycle of the host to speed up their replication rate, using their extra nutrition as fuel."
@@ -248,26 +262,27 @@
resulting in an extremely infective strain of nanites."
use_rate = 1.50
rogue_types = list(/datum/nanite_program/aggressive_replication, /datum/nanite_program/necrotic)
+ var/spread_cooldown = 0
/datum/nanite_program/spreading/active_effect()
- if(prob(10))
- var/list/mob/living/target_hosts = list()
- var/turf/T = get_turf(host_mob)
- for(var/mob/living/L in range(5, host_mob))
- if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes))
- continue
- if(!disease_air_spread_walk(T, get_turf(L)))
- continue
- target_hosts += L
- target_hosts -= host_mob
- if(!target_hosts.len)
- return
- var/mob/living/infectee = pick(target_hosts)
- if(prob(100 - (infectee.get_permeability_protection() * 100)))
- //this will potentially take over existing nanites!
- infectee.AddComponent(/datum/component/nanites, 10)
- SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
- infectee.investigate_log("[key_name(infectee)] was infected by spreading nanites by [key_name(host_mob)]", INVESTIGATE_NANITES)
+ if(spread_cooldown < world.time)
+ return
+ spread_cooldown = world.time + 50
+ var/list/mob/living/target_hosts = list()
+ for(var/mob/living/L in oview(5, host_mob))
+ if(!prob(25))
+ continue
+ if(!(L.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD)))
+ continue
+ target_hosts += L
+ if(!target_hosts.len)
+ return
+ var/mob/living/infectee = pick(target_hosts)
+ if(prob(100 - (infectee.get_permeability_protection() * 100)))
+ //this will potentially take over existing nanites!
+ infectee.AddComponent(/datum/component/nanites, 10)
+ SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites)
+ infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES)
/datum/nanite_program/mitosis
name = "Mitosis"
diff --git a/code/modules/research/nanites/nanite_programs/weapon.dm b/code/modules/research/nanites/nanite_programs/weapon.dm
index 4f29398e..f634b208 100644
--- a/code/modules/research/nanites/nanite_programs/weapon.dm
+++ b/code/modules/research/nanites/nanite_programs/weapon.dm
@@ -160,40 +160,55 @@
/datum/nanite_program/cryo/active_effect()
host_mob.adjust_bodytemperature(-rand(15,25), 50)
-/datum/nanite_program/mind_control
+/datum/nanite_program/triggered/comm/mind_control
name = "Mind Control"
- desc = "The nanites imprint an absolute directive onto the host's brain while they're active."
- use_rate = 3
+ desc = "The nanites imprint an absolute directive onto the host's brain for one minute when triggered."
+ trigger_cost = 30
+ trigger_cooldown = 1800
rogue_types = list(/datum/nanite_program/brain_decay, /datum/nanite_program/brain_misfire)
- extra_settings = list("Directive")
- var/cooldown = 0 //avoids spam when nanites are running low
+ extra_settings = list("Directive","Comm Code")
var/directive = "..."
-/datum/nanite_program/mind_control/set_extra_setting(user, setting)
+/datum/nanite_program/triggered/comm/mind_control/set_extra_setting(user, setting)
if(setting == "Directive")
var/new_directive = stripped_input(user, "Choose the directive to imprint with mind control.", "Directive", directive, MAX_MESSAGE_LEN)
if(!new_directive)
return
directive = new_directive
+ if(setting == "Comm Code")
+ var/new_code = input(user, "Set the communication code (1-9999) or set to 0 to disable external signals.", name, null) as null|num
+ if(isnull(new_code))
+ return
+ comm_code = CLAMP(round(new_code, 1), 0, 9999)
-/datum/nanite_program/mind_control/get_extra_setting(setting)
+/datum/nanite_program/triggered/comm/mind_control/get_extra_setting(setting)
if(setting == "Directive")
return directive
+ if(setting == "Comm Code")
+ return comm_code
-/datum/nanite_program/mind_control/copy_extra_settings_to(datum/nanite_program/mind_control/target)
+/datum/nanite_program/triggered/comm/mind_control/copy_extra_settings_to(datum/nanite_program/triggered/comm/mind_control/target)
target.directive = directive
+ target.comm_code = comm_code
-/datum/nanite_program/mind_control/enable_passive_effect()
- if(world.time < cooldown)
+/datum/nanite_program/triggered/comm/mind_control/trigger(comm_message)
+ if(!..())
return
- . = ..()
- brainwash(host_mob, directive)
+ if(host_mob.stat == DEAD)
+ return
+ var/sent_directive = comm_message
+ if(!comm_message)
+ sent_directive = directive
+ brainwash(host_mob, sent_directive)
log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[directive]'.")
+ addtimer(CALLBACK(src, .proc/end_brainwashing), 600)
-/datum/nanite_program/mind_control/disable_passive_effect()
- . = ..()
+/datum/nanite_program/triggered/comm/mind_control/proc/end_brainwashing()
if(host_mob.mind && host_mob.mind.has_antag_datum(/datum/antagonist/brainwashed))
host_mob.mind.remove_antag_datum(/datum/antagonist/brainwashed)
log_game("[key_name(host_mob)] is no longer brainwashed by nanites.")
- cooldown = world.time + 450
+
+/datum/nanite_program/triggered/comm/mind_control/disable_passive_effect()
+ . = ..()
+ end_brainwashing()
diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm
index dcfd3b95..3dbf4934 100644
--- a/code/modules/research/nanites/nanite_remote.dm
+++ b/code/modules/research/nanites/nanite_remote.dm
@@ -166,6 +166,109 @@
. = TRUE
+/obj/item/nanite_remote/comm
+ name = "nanite communication remote"
+ desc = "A device that can send text messages to specific programs."
+ icon_state = "nanite_comm_remote"
+ var/comm_code = 0
+ var/comm_message = ""
+
+/obj/item/nanite_remote/comm/afterattack(atom/target, mob/user, etc)
+ switch(mode)
+ if(REMOTE_MODE_OFF)
+ return
+ if(REMOTE_MODE_SELF)
+ to_chat(user, "You activate [src], signaling the nanites in your bloodstream.")
+ signal_mob(user, comm_code, comm_message)
+ if(REMOTE_MODE_TARGET)
+ if(isliving(target) && (get_dist(target, get_turf(src)) <= 7))
+ to_chat(user, "You activate [src], signaling the nanites inside [target].")
+ signal_mob(target, code, comm_message, key_name(user))
+ if(REMOTE_MODE_AOE)
+ to_chat(user, "You activate [src], signaling the nanites inside every host around you.")
+ for(var/mob/living/L in view(user, 7))
+ signal_mob(L, code, comm_message, key_name(user))
+ if(REMOTE_MODE_RELAY)
+ to_chat(user, "You activate [src], signaling all connected relay nanites.")
+ signal_relay(code, relay_code, comm_message, key_name(user))
+
+/obj/item/nanite_remote/comm/signal_mob(mob/living/M, code, source)
+ SEND_SIGNAL(M, COMSIG_NANITE_COMM_SIGNAL, comm_code, comm_message)
+
+/obj/item/nanite_remote/comm/signal_relay(code, relay_code, source)
+ for(var/X in SSnanites.nanite_relays)
+ var/datum/nanite_program/relay/N = X
+ N.relay_comm_signal(comm_code, relay_code, comm_message)
+
+/obj/item/nanite_remote/comm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
+ SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ if(!ui)
+ ui = new(user, src, ui_key, "nanite_comm_remote", name, 420, 800, master_ui, state)
+ ui.open()
+
+/obj/item/nanite_remote/comm/ui_data()
+ var/list/data = list()
+ data["comm_code"] = comm_code
+ data["relay_code"] = relay_code
+ data["comm_message"] = comm_message
+ data["mode"] = mode
+ data["locked"] = locked
+ data["saved_settings"] = saved_settings
+
+ return data
+
+/obj/item/nanite_remote/comm/ui_act(action, params)
+ if(..())
+ return
+ switch(action)
+ if("set_comm_code")
+ if(locked)
+ return
+ var/new_code = input("Set comm code (0000-9999):", name, code) as null|num
+ if(!isnull(new_code))
+ new_code = CLAMP(round(new_code, 1),0,9999)
+ comm_code = new_code
+ . = TRUE
+ if("set_message")
+ if(locked)
+ return
+ var/new_message = stripped_input(usr, "Set the message (Max 300 characters):", "Set Message", null , 300)
+ if(!new_message)
+ return
+ comm_message = new_message
+ . = TRUE
+ if("comm_save")
+ if(locked)
+ return
+ var/code_name = stripped_input(usr, "Set the setting name", "Set Name", null , 15)
+ if(!code_name)
+ return
+ var/new_save = list()
+ new_save["id"] = last_id + 1
+ last_id++
+ new_save["name"] = code_name
+ new_save["code"] = comm_code
+ new_save["mode"] = mode
+ new_save["relay_code"] = relay_code
+ new_save["message"] = comm_message
+
+ saved_settings += list(new_save)
+ . = TRUE
+ if("comm_load")
+ var/code_id = params["save_id"]
+ var/list/setting
+ for(var/list/X in saved_settings)
+ if(X["id"] == text2num(code_id))
+ setting = X
+ break
+ if(setting)
+ comm_code = setting["code"]
+ mode = setting["mode"]
+ relay_code = setting["relay_code"]
+ comm_message = setting["message"]
+ . = TRUE
+
+
#undef REMOTE_MODE_OFF
#undef REMOTE_MODE_SELF
#undef REMOTE_MODE_TARGET
diff --git a/code/modules/research/nanites/program_disks.dm b/code/modules/research/nanites/program_disks.dm
index f780f409..6444ebc0 100644
--- a/code/modules/research/nanites/program_disks.dm
+++ b/code/modules/research/nanites/program_disks.dm
@@ -142,4 +142,10 @@
program_type = /datum/nanite_program/researchplus
/obj/item/disk/nanite_program/reduced_diagnostics
- program_type = /datum/nanite_program/reduced_diagnostics
\ No newline at end of file
+ program_type = /datum/nanite_program/reduced_diagnostics
+
+/obj/item/disk/nanite_program/good_mood
+ program_type = /datum/nanite_program/good_mood
+
+/obj/item/disk/nanite_program/bad_mood
+ program_type = /datum/nanite_program/bad_mood
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index c8685849..28e4be9a 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -959,7 +959,7 @@
display_name = "Basic Nanite Programming"
description = "The basics of nanite construction and programming."
prereq_ids = list("datatheory","robotics")
- design_ids = list("nanite_disk","nanite_remote","nanite_scanner",\
+ design_ids = list("nanite_disk","nanite_remote","nanite_comm_remote","nanite_scanner",\
"nanite_chamber","public_nanite_chamber","nanite_chamber_control","nanite_programmer","nanite_program_hub","nanite_cloud_control",\
"relay_nanites", "monitoring_nanites", "access_nanites", "repairing_nanites","sensor_nanite_volume", "repeater_nanites", "relay_repeater_nanites","red_diag_nanites")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
@@ -998,7 +998,7 @@
display_name = "Neural Nanite Programming"
description = "Nanite programs affecting nerves and brain matter."
prereq_ids = list("nanite_bio")
- design_ids = list("nervous_nanites", "brainheal_nanites", "paralyzing_nanites", "stun_nanites", "selfscan_nanites")
+ design_ids = list("nervous_nanites", "brainheal_nanites", "paralyzing_nanites", "stun_nanites", "selfscan_nanites","good_mood_nanites","bad_mood_nanites")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi
index 37a1a087..331dc911 100644
Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 6f83b2f6..4caa6b79 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -3044,9 +3044,9 @@
#include "hyperstation\code\__DEFINES\wendigo.dm"
#include "hyperstation\code\controllers\subsystem\economy.dm"
#include "hyperstation\code\datums\actions.dm"
+#include "hyperstation\code\datums\ert_hazard_cleanup.dm"
#include "hyperstation\code\datums\components\crafting\bounties.dm"
#include "hyperstation\code\datums\components\crafting\recipes.dm"
-#include "hyperstation\code\datums\ert_hazard_cleanup.dm"
#include "hyperstation\code\datums\elements\holder_micro.dm"
#include "hyperstation\code\datums\mood_events\events.dm"
#include "hyperstation\code\datums\ruins\lavaland.dm"
diff --git a/tgui/assets/tgui.js b/tgui/assets/tgui.js
index 3f5f7974..649f97fc 100644
--- a/tgui/assets/tgui.js
+++ b/tgui/assets/tgui.js
@@ -1 +1 @@
-require=function a(o,s,p){function u(e,t){if(!s[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[e]={exports:{}};o[e][0].call(i.exports,function(t){return u(o[e][1][t]||t)},i,i.exports,a,o,s,p)}return s[e].exports}for(var c="function"==typeof require&&require,t=0;to;)i.call(t,a=r[o++])&&e.push(a);return e}},{78:78,81:81,82:82}],34:[function(t,e,n){var m=t(41),g=t(24),b=t(43),v=t(92),y=t(26),_="prototype",x=function(t,e,n){var a,r,i,o,s=t&x.F,p=t&x.G,u=t&x.S,c=t&x.P,l=t&x.B,d=p?m:u?m[e]||(m[e]={}):(m[e]||{})[_],f=p?g:g[e]||(g[e]={}),h=f[_]||(f[_]={});for(a in p&&(n=e),n)i=((r=!s&&d&&d[a]!==undefined)?d:n)[a],o=l&&r?y(i,m):c&&"function"==typeof i?y(Function.call,i):i,d&&v(d,a,i,t&x.U),f[a]!=i&&b(f,a,o),c&&h[a]!=i&&(h[a]=i)};m.core=g,x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,e.exports=x},{24:24,26:26,41:41,43:43,92:92}],35:[function(t,e,n){var r=t(127)("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(a){}}return!0}},{127:127}],36:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],37:[function(t,e,n){"use strict";var s=t(43),p=t(92),u=t(36),c=t(29),l=t(127);e.exports=function(e,t,n){var a=l(e),r=n(c,a,""[e]),i=r[0],o=r[1];u(function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})&&(p(String.prototype,e,i),s(RegExp.prototype,a,2==t?function(t,e){return o.call(t,this,e)}:function(t){return o.call(t,this)}))}},{127:127,29:29,36:36,43:43,92:92}],38:[function(t,e,n){"use strict";var a=t(8);e.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{8:8}],39:[function(t,e,n){"use strict";var f=t(50),h=t(52),m=t(116),g=t(26),b=t(127)("isConcatSpreadable");e.exports=function v(t,e,n,a,r,i,o,s){for(var p,u,c=r,l=0,d=!!o&&g(o,s,3);ldocument.F=Object<\/script>"),t.close(),c=t.F;n--;)delete c[u][s[n]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r[u]=i(t),n=new r,r[u]=null,n[p]=t):n=c(),e===undefined?n:o(n,e)}},{100:100,31:31,32:32,44:44,73:73,8:8}],72:[function(t,e,n){var r=t(8),i=t(45),o=t(118),s=Object.defineProperty;n.f=t(30)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},{118:118,30:30,45:45,8:8}],73:[function(t,e,n){var o=t(72),s=t(8),p=t(81);e.exports=t(30)?Object.defineProperties:function(t,e){s(t);for(var n,a=p(e),r=a.length,i=0;ir;)o(a,n=e[r++])&&(~p(i,n)||i.push(n));return i}},{100:100,115:115,12:12,42:42}],81:[function(t,e,n){var a=t(80),r=t(32);e.exports=Object.keys||function(t){return a(t,r)}},{32:32,80:80}],82:[function(t,e,n){n.f={}.propertyIsEnumerable},{}],83:[function(t,e,n){var r=t(34),i=t(24),o=t(36);e.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},{24:24,34:34,36:36}],84:[function(t,e,n){var p=t(81),u=t(115),c=t(82).f;e.exports=function(s){return function(t){for(var e,n=u(t),a=p(n),r=a.length,i=0,o=[];i>>0||(o.test(n)?16:10))}:a},{109:109,110:110,41:41}],88:[function(t,e,n){e.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},{}],89:[function(t,e,n){var a=t(8),r=t(52),i=t(69);e.exports=function(t,e){if(a(t),r(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},{52:52,69:69,8:8}],90:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],91:[function(t,e,n){var r=t(92);e.exports=function(t,e,n){for(var a in e)r(t,a,e[a],n);return t}},{92:92}],92:[function(t,e,n){var i=t(41),o=t(43),s=t(42),p=t(122)("src"),a="toString",r=Function[a],u=(""+r).split(a);t(24).inspectSource=function(t){return r.call(t)},(e.exports=function(t,e,n,a){var r="function"==typeof n;r&&(s(n,"name")||o(n,"name",e)),t[e]!==n&&(r&&(s(n,p)||o(n,p,t[e]?""+t[e]:u.join(String(e)))),t===i?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[p]||r.call(this)})},{122:122,24:24,41:41,42:42,43:43}],93:[function(t,e,n){e.exports=function(e,n){var a=n===Object(n)?function(t){return n[t]}:n;return function(t){return String(t).replace(e,a)}}},{}],94:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},{}],95:[function(t,e,n){"use strict";var a=t(34),o=t(4),s=t(26),p=t(40);e.exports=function(t){a(a.S,t,{from:function(t){var e,n,a,r,i=arguments[1];return o(this),(e=i!==undefined)&&o(i),t==undefined?new this:(n=[],e?(a=0,r=s(i,arguments[2],2),p(t,!1,function(t){n.push(r(t,a++))})):p(t,!1,n.push,n),new this(n))}})}},{26:26,34:34,4:4,40:40}],96:[function(t,e,n){"use strict";var a=t(34);e.exports=function(t){a(a.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},{34:34}],97:[function(r,t,e){function i(t,e){if(a(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")}var n=r(52),a=r(8);t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,a){try{(a=r(26)(Function.call,r(75).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(e){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:a(t,e),t}}({},!1):undefined),check:i}},{26:26,52:52,75:75,8:8}],98:[function(t,e,n){"use strict";var a=t(41),r=t(72),i=t(30),o=t(127)("species");e.exports=function(t){var e=a[t];i&&e&&!e[o]&&r.f(e,o,{configurable:!0,get:function(){return this}})}},{127:127,30:30,41:41,72:72}],99:[function(t,e,n){var a=t(72).f,r=t(42),i=t(127)("toStringTag");e.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&a(t,i,{configurable:!0,value:e})}},{127:127,42:42,72:72}],100:[function(t,e,n){var a=t(101)("keys"),r=t(122);e.exports=function(t){return a[t]||(a[t]=r(t))}},{101:101,122:122}],101:[function(t,e,n){var a=t(24),r=t(41),i="__core-js_shared__",o=r[i]||(r[i]={});(e.exports=function(t,e){return o[t]||(o[t]=e!==undefined?e:{})})("versions",[]).push({version:a.version,mode:t(60)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},{24:24,41:41,60:60}],102:[function(t,e,n){var r=t(8),i=t(4),o=t(127)("species");e.exports=function(t,e){var n,a=r(t).constructor;return a===undefined||(n=r(a)[o])==undefined?e:i(n)}},{127:127,4:4,8:8}],103:[function(t,e,n){"use strict";var a=t(36);e.exports=function(t,e){return!!t&&a(function(){e?t.call(null,function(){},1):t.call(null)})}},{36:36}],104:[function(t,e,n){var p=t(114),u=t(29);e.exports=function(s){return function(t,e){var n,a,r=String(u(t)),i=p(e),o=r.length;return i<0||o<=i?s?"":undefined:(n=r.charCodeAt(i))<55296||56319"+r+""+e+">"}var r=t(34),i=t(36),o=t(29),s=/"/g;e.exports=function(e,t){var n={};n[e]=t(a),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||3p&&(u=u.slice(0,p)),a?u+r:r+u}},{108:108,116:116,29:29}],108:[function(t,e,n){"use strict";var r=t(114),i=t(29);e.exports=function(t){var e=String(i(this)),n="",a=r(t);if(a<0||a==Infinity)throw RangeError("Count can't be negative");for(;0>>=1)&&(e+=e))1&a&&(n+=e);return n}},{114:114,29:29}],109:[function(t,e,n){function a(t,e,n){var a={},r=s(function(){return!!p[t]()||"
"!="
"[t]()}),i=a[t]=r?e(l):p[t];n&&(a[n]=i),o(o.P+o.F*r,"String",a)}var o=t(34),r=t(29),s=t(36),p=t(110),i="["+p+"]",u=RegExp("^"+i+i+"*"),c=RegExp(i+i+"*$"),l=a.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};e.exports=a},{110:110,29:29,34:34,36:36}],110:[function(t,e,n){e.exports="\t\n\x0B\f\r \u2028\u2029\ufeff"},{}],111:[function(t,e,n){function a(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}}function r(t){a.call(t.data)}var i,o,s,p=t(26),u=t(47),c=t(44),l=t(31),d=t(41),f=d.process,h=d.setImmediate,m=d.clearImmediate,g=d.MessageChannel,b=d.Dispatch,v=0,y={},_="onreadystatechange";h&&m||(h=function(t){for(var e=[],n=1;n>1,c=23===e?O(2,-24)-O(2,-77):0,l=0,d=t<0||0===t&&1/t<0?1:0;for((t=A(t))!=t||t===C?(r=t!=t?1:0,a=p):(a=T(R(t)/M),t*(i=O(2,-a))<1&&(a--,i*=2),2<=(t+=1<=a+u?c/i:c*O(2,1-u))*i&&(a++,i/=2),p<=a+u?(r=0,a=p):1<=a+u?(r=(t*i-1)*O(2,e),a+=u):(r=t*O(2,u-1)*O(2,e),a=0));8<=e;o[l++]=255&r,r/=256,e-=8);for(a=a<>1,s=r-7,p=n-1,u=t[p--],c=127&u;for(u>>=7;0>=-s,s+=e;0>8&255]}function G(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function z(t){return I(t,52,8)}function W(t){return I(t,23,4)}function H(t,e,n){m(t[_],e,{get:function(){return this[n]}})}function K(t,e,n,a){var r=f(+n);if(r+e>t[N])throw E(x);var i=t[D]._b,o=r+t[F],s=i.slice(o,o+e);return a?s:s.reverse()}function Q(t,e,n,a,r,i){var o=f(+n);if(o+e>t[N])throw E(x);for(var s=t[D]._b,p=o+t[F],u=a(+r),c=0;cJ;)(Y=X[J++])in w||s(w,Y,P[Y]);i||($.constructor=w)}var Z=new k(new w(2)),tt=k[_].setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||p(k[_],{setInt8:function(t,e){tt.call(this,t,e<<24>>24)},setUint8:function(t,e){tt.call(this,t,e<<24>>24)}},!0)}else w=function(t){c(this,w,v);var e=f(t);this._b=g.call(new Array(e),0),this[N]=e},k=function(t,e,n){c(this,k,y),c(t,w,y);var a=t[N],r=l(e);if(r<0||a>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return U(K(this,4,t,arguments[1]))},getUint32:function(t){return U(K(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return B(K(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return B(K(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){Q(this,1,t,V,e)},setUint8:function(t,e){Q(this,1,t,V,e)},setInt16:function(t,e){Q(this,2,t,q,e,arguments[2])},setUint16:function(t,e){Q(this,2,t,q,e,arguments[2])},setInt32:function(t,e){Q(this,4,t,G,e,arguments[2])},setUint32:function(t,e){Q(this,4,t,G,e,arguments[2])},setFloat32:function(t,e){Q(this,4,t,W,e,arguments[2])},setFloat64:function(t,e){Q(this,8,t,z,e,arguments[2])}});b(w,v),b(k,y),s(k[_],o.VIEW,!0),n[v]=w,n[y]=k},{10:10,113:113,114:114,116:116,121:121,30:30,36:36,41:41,43:43,60:60,7:7,72:72,77:77,91:91,99:99}],121:[function(t,e,n){for(var a,r=t(41),i=t(43),o=t(122),s=o("typed_array"),p=o("view"),u=!(!r.ArrayBuffer||!r.DataView),c=u,l=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(a=r[d[l++]])?(i(a.prototype,s,!0),i(a.prototype,p,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:p}},{122:122,41:41,43:43}],122:[function(t,e,n){var a=0,r=Math.random();e.exports=function(t){return"Symbol(".concat(t===undefined?"":t,")_",(++a+r).toString(36))}},{}],123:[function(t,e,n){var a=t(41).navigator;e.exports=a&&a.userAgent||""},{41:41}],124:[function(t,e,n){var a=t(52);e.exports=function(t,e){if(!a(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},{52:52}],125:[function(t,e,n){var a=t(41),r=t(24),i=t(60),o=t(126),s=t(72).f;e.exports=function(t){var e=r.Symbol||(r.Symbol=i?{}:a.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},{126:126,24:24,41:41,60:60,72:72}],126:[function(t,e,n){n.f=t(127)},{127:127}],127:[function(t,e,n){var a=t(101)("wks"),r=t(122),i=t(41).Symbol,o="function"==typeof i;(e.exports=function(t){return a[t]||(a[t]=o&&i[t]||(o?i:r)("Symbol."+t))}).store=a},{101:101,122:122,41:41}],128:[function(t,e,n){var a=t(18),r=t(127)("iterator"),i=t(59);e.exports=t(24).getIteratorMethod=function(t){if(t!=undefined)return t[r]||t["@@iterator"]||i[a(t)]}},{127:127,18:18,24:24,59:59}],129:[function(t,e,n){var a=t(34),r=t(93)(/[\\^$*+?.()|[\]{}]/g,"\\$&");a(a.S,"RegExp",{escape:function(t){return r(t)}})},{34:34,93:93}],130:[function(t,e,n){var a=t(34);a(a.P,"Array",{copyWithin:t(9)}),t(6)("copyWithin")},{34:34,6:6,9:9}],131:[function(t,e,n){"use strict";var a=t(34),r=t(13)(4);a(a.P+a.F*!t(103)([].every,!0),"Array",{every:function(t){return r(this,t,arguments[1])}})},{103:103,13:13,34:34}],132:[function(t,e,n){var a=t(34);a(a.P,"Array",{fill:t(10)}),t(6)("fill")},{10:10,34:34,6:6}],133:[function(t,e,n){"use strict";var a=t(34),r=t(13)(2);a(a.P+a.F*!t(103)([].filter,!0),"Array",{filter:function(t){return r(this,t,arguments[1])}})},{103:103,13:13,34:34}],134:[function(t,e,n){"use strict";var a=t(34),r=t(13)(6),i="findIndex",o=!0;i in[]&&Array(1)[i](function(){o=!1}),a(a.P+a.F*o,"Array",{findIndex:function(t){return r(this,t,1=t.length?(this._t=undefined,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},{115:115,56:56,58:58,59:59,6:6}],141:[function(t,e,n){"use strict";var a=t(34),r=t(115),i=[].join;a(a.P+a.F*(t(48)!=Object||!t(103)(i)),"Array",{join:function(t){return i.call(r(this),t===undefined?",":t)}})},{103:103,115:115,34:34,48:48}],142:[function(t,e,n){"use strict";var a=t(34),r=t(115),i=t(114),o=t(116),s=[].lastIndexOf,p=!!s&&1/[1].lastIndexOf(1,-0)<0;a(a.P+a.F*(p||!t(103)(s)),"Array",{lastIndexOf:function(t){if(p)return s.apply(this,arguments)||0;var e=r(this),n=o(e.length),a=n-1;for(1>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},{34:34}],165:[function(t,e,n){var a=t(34),r=Math.exp;a(a.S,"Math",{cosh:function(t){return(r(t=+t)+r(-t))/2}})},{34:34}],166:[function(t,e,n){var a=t(34),r=t(61);a(a.S+a.F*(r!=Math.expm1),"Math",{expm1:r})},{34:34,61:61}],167:[function(t,e,n){var a=t(34);a(a.S,"Math",{fround:t(62)})},{34:34,62:62}],168:[function(t,e,n){var a=t(34),p=Math.abs;a(a.S,"Math",{hypot:function(t,e){for(var n,a,r=0,i=0,o=arguments.length,s=0;i>>16)*o+i*(n&r>>>16)<<16>>>0)}})},{34:34,36:36}],170:[function(t,e,n){var a=t(34);a(a.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},{34:34}],171:[function(t,e,n){var a=t(34);a(a.S,"Math",{log1p:t(63)})},{34:34,63:63}],172:[function(t,e,n){var a=t(34);a(a.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},{34:34}],173:[function(t,e,n){var a=t(34);a(a.S,"Math",{sign:t(65)})},{34:34,65:65}],174:[function(t,e,n){var a=t(34),r=t(61),i=Math.exp;a(a.S+a.F*t(36)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(r(t)-r(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},{34:34,36:36,61:61}],175:[function(t,e,n){var a=t(34),r=t(61),i=Math.exp;a(a.S,"Math",{tanh:function(t){var e=r(t=+t),n=r(-t);return e==Infinity?1:n==Infinity?-1:(e-n)/(i(t)+i(-t))}})},{34:34,61:61}],176:[function(t,e,n){var a=t(34);a(a.S,"Math",{trunc:function(t){return(0w;w++)i(g,_=x[w])&&!i(m,_)&&d(m,_,l(g,_));(m.prototype=b).constructor=m,t(92)(r,h,m)}},{109:109,118:118,19:19,30:30,36:36,41:41,42:42,46:46,71:71,72:72,75:75,77:77,92:92}],178:[function(t,e,n){var a=t(34);a(a.S,"Number",{EPSILON:Math.pow(2,-52)})},{34:34}],179:[function(t,e,n){var a=t(34),r=t(41).isFinite;a(a.S,"Number",{isFinite:function(t){return"number"==typeof t&&r(t)}})},{34:34,41:41}],180:[function(t,e,n){var a=t(34);a(a.S,"Number",{isInteger:t(51)})},{34:34,51:51}],181:[function(t,e,n){var a=t(34);a(a.S,"Number",{isNaN:function(t){return t!=t}})},{34:34}],182:[function(t,e,n){var a=t(34),r=t(51),i=Math.abs;a(a.S,"Number",{isSafeInteger:function(t){return r(t)&&i(t)<=9007199254740991}})},{34:34,51:51}],183:[function(t,e,n){var a=t(34);a(a.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{34:34}],184:[function(t,e,n){var a=t(34);a(a.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{34:34}],185:[function(t,e,n){var a=t(34),r=t(86);a(a.S+a.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},{34:34,86:86}],186:[function(t,e,n){var a=t(34),r=t(87);a(a.S+a.F*(Number.parseInt!=r),"Number",{parseInt:r})},{34:34,87:87}],187:[function(t,e,n){"use strict";function u(t,e){for(var n=-1,a=e;++n<6;)a+=t*o[n],o[n]=a%1e7,a=i(a/1e7)}function c(t){for(var e=6,n=0;0<=--e;)n+=o[e],o[e]=i(n/t),n=n%t*1e7}function l(){for(var t=6,e="";0<=--t;)if(""!==e||0===t||0!==o[t]){var n=String(o[t]);e=""===e?n:e+h.call("0",7-n.length)+n}return e}var a=t(34),d=t(114),f=t(5),h=t(108),r=1..toFixed,i=Math.floor,o=[0,0,0,0,0,0],m="Number.toFixed: incorrect invocation!",g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)};a(a.P+a.F*(!!r&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!t(36)(function(){r.call({})})),"Number",{toFixed:function(t){var e,n,a,r,i=f(this,m),o=d(t),s="",p="0";if(o<0||20t;)e(a[t++]);l._c=[],l._n=!1,n&&!l._h&&N(l)})}}function o(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),i(e,!0))}var n,s,p,u,c=a(60),l=a(41),f=a(26),h=a(18),m=a(34),g=a(52),b=a(4),v=a(7),y=a(40),_=a(102),x=a(111).set,w=a(68)(),k=a(69),S=a(88),E=a(123),C=a(89),P="Promise",A=l.TypeError,O=l.process,T=O&&O.versions,R=T&&T.v8||"",M=l[P],L="process"==h(O),j=s=k.f,D=!!function(){try{var t=M.resolve(1),e=(t.constructor={})[a(127)("species")]=function(t){t(r,r)};return(L||"function"==typeof PromiseRejectionEvent)&&t.then(r)instanceof e&&0!==R.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(n){}}(),N=function(i){x.call(l,function(){var t,e,n,a=i._v,r=F(i);if(r&&(t=S(function(){L?O.emit("unhandledRejection",a,i):(e=l.onunhandledrejection)?e({promise:i,reason:a}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",a)}),i._h=L||F(i)?2:1),i._a=undefined,r&&t.e)throw t.v})},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},I=function(e){x.call(l,function(){var t;L?O.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},B=function(n){var a,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===n)throw A("Promise can't be resolved itself");(a=d(n))?w(function(){var t={_w:r,_d:!1};try{a.call(n,f(B,t,1),f(o,t,1))}catch(e){o.call(t,e)}}):(r._v=n,r._s=1,i(r,!1))}catch(t){o.call({_w:r,_d:!1},t)}}};D||(M=function(t){v(this,M,P,"_h"),b(t),n.call(this);try{t(f(B,this,1),f(o,this,1))}catch(e){o.call(this,e)}},(n=function(t){this._c=[],this._a=undefined,this._s=0,this._d=!1,this._v=undefined,this._h=0,this._n=!1}).prototype=a(91)(M.prototype,{then:function(t,e){var n=j(_(this,M));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=L?O.domain:undefined,this._c.push(n),this._a&&this._a.push(n),this._s&&i(this,!1),n.promise},"catch":function(t){return this.then(undefined,t)}}),p=function(){var t=new n;this.promise=t,this.resolve=f(B,t,1),this.reject=f(o,t,1)},k.f=j=function(t){return t===M||t===u?new p(t):s(t)}),m(m.G+m.W+m.F*!D,{Promise:M}),a(99)(M,P),a(98)(P),u=a(24)[P],m(m.S+m.F*!D,P,{reject:function(t){var e=j(this);return(0,e.reject)(t),e.promise}}),m(m.S+m.F*(c||!D),P,{resolve:function(t){return C(c&&this===u?M:this,t)}}),m(m.S+m.F*!(D&&a(57)(function(t){M.all(t)["catch"](r)})),P,{all:function(t){var o=this,e=j(o),s=e.resolve,p=e.reject,n=S(function(){var a=[],r=0,i=1;y(t,!1,function(t){var e=r++,n=!1;a.push(undefined),i++,o.resolve(t).then(function(t){n||(n=!0,a[e]=t,--i||s(a))},p)}),--i||s(a)});return n.e&&p(n.v),e.promise},race:function(t){var e=this,n=j(e),a=n.reject,r=S(function(){y(t,!1,function(t){e.resolve(t).then(n.resolve,a)})});return r.e&&a(r.v),n.promise}})},{102:102,111:111,123:123,127:127,18:18,24:24,26:26,34:34,4:4,40:40,41:41,52:52,57:57,60:60,68:68,69:69,7:7,88:88,89:89,91:91,98:98,99:99}],209:[function(t,e,n){var a=t(34),i=t(4),o=t(8),s=(t(41).Reflect||{}).apply,p=Function.apply;a(a.S+a.F*!t(36)(function(){s(function(){})}),"Reflect",{apply:function(t,e,n){var a=i(t),r=o(n);return s?s(a,e,r):p.call(a,e,r)}})},{34:34,36:36,4:4,41:41,8:8}],210:[function(t,e,n){var a=t(34),s=t(71),p=t(4),u=t(8),c=t(52),r=t(36),l=t(17),d=(t(41).Reflect||{}).construct,f=r(function(){function t(){}return!(d(function(){},[],t)instanceof t)}),h=!r(function(){d(function(){})});a(a.S+a.F*(f||h),"Reflect",{construct:function(t,e){p(t),u(e);var n=arguments.length<3?t:p(arguments[2]);if(h&&!f)return d(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var a=[null];return a.push.apply(a,e),new(l.apply(t,a))}var r=n.prototype,i=s(c(r)?r:Object.prototype),o=Function.apply.call(t,i,e);return c(o)?o:i}})},{17:17,34:34,36:36,4:4,41:41,52:52,71:71,8:8}],211:[function(t,e,n){var r=t(72),a=t(34),i=t(8),o=t(118);a(a.S+a.F*t(36)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=o(e,!0),i(n);try{return r.f(t,e,n),!0}catch(a){return!1}}})},{118:118,34:34,36:36,72:72,8:8}],212:[function(t,e,n){var a=t(34),r=t(75).f,i=t(8);a(a.S,"Reflect",{deleteProperty:function(t,e){var n=r(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},{34:34,75:75,8:8}],213:[function(t,e,n){"use strict";function a(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)}var r=t(34),i=t(8);t(55)(a,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:undefined,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new a(t)}})},{34:34,55:55,8:8}],214:[function(t,e,n){var a=t(75),r=t(34),i=t(8);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return a.f(i(t),e)}})},{34:34,75:75,8:8}],215:[function(t,e,n){var a=t(34),r=t(79),i=t(8);a(a.S,"Reflect",{getPrototypeOf:function(t){return r(i(t))}})},{34:34,79:79,8:8}],216:[function(t,e,n){var i=t(75),o=t(79),s=t(42),a=t(34),p=t(52),u=t(8);a(a.S,"Reflect",{get:function c(t,e){var n,a,r=arguments.length<3?t:arguments[2];return u(t)===r?t[e]:(n=i.f(t,e))?s(n,"value")?n.value:n.get!==undefined?n.get.call(r):undefined:p(a=o(t))?c(a,e,r):void 0}})},{34:34,42:42,52:52,75:75,79:79,8:8}],217:[function(t,e,n){var a=t(34);a(a.S,"Reflect",{has:function(t,e){return e in t}})},{34:34}],218:[function(t,e,n){var a=t(34),r=t(8),i=Object.isExtensible;a(a.S,"Reflect",{isExtensible:function(t){return r(t),!i||i(t)}})},{34:34,8:8}],219:[function(t,e,n){var a=t(34);a(a.S,"Reflect",{ownKeys:t(85)})},{34:34,85:85}],220:[function(t,e,n){var a=t(34),r=t(8),i=Object.preventExtensions;a(a.S,"Reflect",{preventExtensions:function(t){r(t);try{return i&&i(t),!0}catch(e){return!1}}})},{34:34,8:8}],221:[function(t,e,n){var a=t(34),r=t(97);r&&a(a.S,"Reflect",{setPrototypeOf:function(t,e){r.check(t,e);try{return r.set(t,e),!0}catch(n){return!1}}})},{34:34,97:97}],222:[function(t,e,n){var s=t(72),p=t(75),u=t(79),c=t(42),a=t(34),l=t(90),d=t(8),f=t(52);a(a.S,"Reflect",{set:function h(t,e,n){var a,r,i=arguments.length<4?t:arguments[3],o=p.f(d(t),e);if(!o){if(f(r=u(t)))return h(r,e,n,i);o=l(0)}if(c(o,"value")){if(!1===o.writable||!f(i))return!1;if(a=p.f(i,e)){if(a.get||a.set||!1===a.writable)return!1;a.value=n,s.f(i,e,a)}else s.f(i,e,l(0,n));return!0}return o.set!==undefined&&(o.set.call(i,n),!0)}})},{34:34,42:42,52:52,72:72,75:75,79:79,8:8,90:90}],223:[function(t,e,n){var a=t(41),i=t(46),r=t(72).f,o=t(77).f,s=t(53),p=t(38),u=a.RegExp,c=u,l=u.prototype,d=/a/g,f=/a/g,h=new u(d)!==d;if(t(30)&&(!h||t(36)(function(){return f[t(127)("match")]=!1,u(d)!=d||u(f)==f||"/a/i"!=u(d,"i")}))){u=function(t,e){var n=this instanceof u,a=s(t),r=e===undefined;return!n&&a&&t.constructor===u&&r?t:i(h?new c(a&&!r?t.source:t,e):c((a=t instanceof u)?t.source:t,a&&r?p.call(t):e),n?this:l,u)};function m(e){e in u||r(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}for(var g=o(c),b=0;g.length>b;)m(g[b++]);(l.constructor=u).prototype=l,t(92)(a,"RegExp",u)}t(98)("RegExp")},{127:127,30:30,36:36,38:38,41:41,46:46,53:53,72:72,77:77,92:92,98:98}],224:[function(t,e,n){t(30)&&"g"!=/./g.flags&&t(72).f(RegExp.prototype,"flags",{configurable:!0,get:t(38)})},{30:30,38:38,72:72}],225:[function(t,e,n){t(37)("match",1,function(a,r,t){return[function(t){"use strict";var e=a(this),n=t==undefined?undefined:t[r];return n!==undefined?n.call(t,e):new RegExp(t)[r](String(e))},t]})},{37:37}],226:[function(t,e,n){t(37)("replace",2,function(r,i,o){return[function(t,e){"use strict";var n=r(this),a=t==undefined?undefined:t[i];return a!==undefined?a.call(t,n,e):o.call(String(n),t,e)},o]})},{37:37}],227:[function(t,e,n){t(37)("search",1,function(a,r,t){return[function(t){"use strict";var e=a(this),n=t==undefined?undefined:t[r];return n!==undefined?n.call(t,e):new RegExp(t)[r](String(e))},t]})},{37:37}],228:[function(e,t,n){e(37)("split",2,function(r,i,o){"use strict";var f=e(53),h=o,m=[].push,t="split",g="length",b="lastIndex";if("c"=="abbc"[t](/(b)*/)[1]||4!="test"[t](/(?:)/,-1)[g]||2!="ab"[t](/(?:ab)*/)[g]||4!="."[t](/(.?)(.?)/)[g]||1<"."[t](/()()/)[g]||""[t](/.?/)[g]){var v=/()??/.exec("")[1]===undefined;o=function(t,e){var n=String(this);if(t===undefined&&0===e)return[];if(!f(t))return h.call(n,t,e);var a,r,i,o,s,p=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,l=e===undefined?4294967295:e>>>0,d=new RegExp(t.source,u+"g");for(v||(a=new RegExp("^"+d.source+"$(?!\\s)",u));(r=d.exec(n))&&!(c<(i=r.index+r[0][g])&&(p.push(n.slice(c,r.index)),!v&&1=l));)d[b]===r.index&&d[b]++;return c===n[g]?!o&&d.test("")||p.push(""):p.push(n.slice(c)),p[g]>l?p.slice(0,l):p}}else"0"[t](undefined,0)[g]&&(o=function(t,e){return t===undefined&&0===e?[]:h.call(this,t,e)});return[function(t,e){var n=r(this),a=t==undefined?undefined:t[i];return a!==undefined?a.call(t,n,e):o.call(String(n),t,e)},o]})},{37:37,53:53}],229:[function(e,t,n){"use strict";e(224);function a(t){e(92)(RegExp.prototype,s,t,!0)}var r=e(8),i=e(38),o=e(30),s="toString",p=/./[s];e(36)(function(){return"/a/b"!=p.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):undefined)}):p.name!=s&&a(function(){return p.call(this)})},{224:224,30:30,36:36,38:38,8:8,92:92}],230:[function(t,e,n){"use strict";var a=t(20),r=t(124);e.exports=t(23)("Set",function(t){return function(){return t(this,0>10),e%1024+56320))}return n.join("")}})},{112:112,34:34}],241:[function(t,e,n){"use strict";var a=t(34),r=t(105),i="includes";a(a.P+a.F*t(35)(i),"String",{includes:function(t){return!!~r(this,t,i).indexOf(t,1=e.length?{value:undefined,done:!0}:(t=a(e,n),this._i+=t.length,{value:t,done:!1})})},{104:104,56:56}],244:[function(t,e,n){"use strict";t(106)("link",function(e){return function(t){return e(this,"a","href",t)}})},{106:106}],245:[function(t,e,n){var a=t(34),o=t(115),s=t(116);a(a.S,"String",{raw:function(t){for(var e=o(t.raw),n=s(e.length),a=arguments.length,r=[],i=0;ir;)c(W,e=n[r++])||e==V||e==h||a.push(e);return a}function p(t){for(var e,n=t===K,a=N(n?H:C(t)),r=[],i=0;a.length>i;)!c(W,e=a[i++])||n&&!c(K,e)||r.push(W[e]);return r}var u=t(41),c=t(42),l=t(30),d=t(34),f=t(92),h=t(66).KEY,m=t(36),g=t(101),b=t(99),v=t(122),y=t(127),_=t(126),x=t(125),w=t(33),k=t(50),S=t(8),E=t(52),C=t(115),P=t(118),A=t(90),O=t(71),T=t(76),R=t(75),M=t(72),L=t(81),j=R.f,D=M.f,N=T.f,F=u.Symbol,I=u.JSON,B=I&&I.stringify,U="prototype",V=y("_hidden"),q=y("toPrimitive"),G={}.propertyIsEnumerable,z=g("symbol-registry"),W=g("symbols"),H=g("op-symbols"),K=Object[U],Q="function"==typeof F,Y=u.QObject,$=!Y||!Y[U]||!Y[U].findChild,X=l&&m(function(){return 7!=O(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a})?function(t,e,n){var a=j(K,e);a&&delete K[e],D(t,e,n),a&&t!==K&&D(K,e,a)}:D,J=Q&&"symbol"==typeof F.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof F},Z=function(t,e,n){return t===K&&Z(H,e,n),S(t),e=P(e,!0),S(n),c(W,e)?(n.enumerable?(c(t,V)&&t[V][e]&&(t[V][e]=!1),n=O(n,{enumerable:A(0,!1)})):(c(t,V)||D(t,V,A(1,{})),t[V][e]=!0),X(t,e,n)):D(t,e,n)};Q||(f((F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var e=v(0et;)y(tt[et++]);for(var nt=L(y.store),at=0;nt.length>at;)x(nt[at++]);d(d.S+d.F*!Q,"Symbol",{"for":function(t){return c(z,t+="")?z[t]:z[t]=F(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in z)if(z[e]===t)return e},useSetter:function(){$=!0},useSimple:function(){$=!1}}),d(d.S+d.F*!Q,"Object",{create:function(t,e){return e===undefined?O(t):r(O(t),e)},defineProperty:Z,defineProperties:r,getOwnPropertyDescriptor:o,getOwnPropertyNames:s,getOwnPropertySymbols:p}),I&&d(d.S+d.F*(!Q||m(function(){var t=F();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))})),"JSON",{stringify:function(t){for(var e,n,a=[t],r=1;r>>0,i=n>>>0;return(e>>>0)+(a>>>0)+((r&i|(r|i)&~(r+i>>>0))>>>31)|0}})},{34:34}],281:[function(t,e,n){var a=t(34);a(a.S,"Math",{imulh:function(t,e){var n=+t,a=+e,r=65535&n,i=65535&a,o=n>>16,s=a>>16,p=(o*i>>>0)+(r*i>>>16);return o*s+(p>>16)+((r*s>>>0)+(65535&p)>>16)}})},{34:34}],282:[function(t,e,n){var a=t(34);a(a.S,"Math",{isubh:function(t,e,n,a){var r=t>>>0,i=n>>>0;return(e>>>0)-(a>>>0)-((~r&i|~(r^i)&r-i>>>0)>>>31)|0}})},{34:34}],283:[function(t,e,n){var a=t(34);a(a.S,"Math",{RAD_PER_DEG:180/Math.PI})},{34:34}],284:[function(t,e,n){var a=t(34),r=Math.PI/180;a(a.S,"Math",{radians:function(t){return t*r}})},{34:34}],285:[function(t,e,n){var a=t(34);a(a.S,"Math",{scale:t(64)})},{34:34,64:64}],286:[function(t,e,n){var a=t(34);a(a.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0>>16,s=a>>>16,p=(o*i>>>0)+(r*i>>>16);return o*s+(p>>>16)+((r*s>>>0)+(65535&p)>>>16)}})},{34:34}],288:[function(t,e,n){"use strict";var a=t(34),r=t(117),i=t(4),o=t(72);t(30)&&a(a.P+t(74),"Object",{__defineGetter__:function(t,e){o.f(r(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},{117:117,30:30,34:34,4:4,72:72,74:74}],289:[function(t,e,n){"use strict";var a=t(34),r=t(117),i=t(4),o=t(72);t(30)&&a(a.P+t(74),"Object",{__defineSetter__:function(t,e){o.f(r(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},{117:117,30:30,34:34,4:4,72:72,74:74}],290:[function(t,e,n){var a=t(34),r=t(84)(!0);a(a.S,"Object",{entries:function(t){return r(t)}})},{34:34,84:84}],291:[function(t,e,n){var a=t(34),p=t(85),u=t(115),c=t(75),l=t(25);a(a.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,a=u(t),r=c.f,i=p(a),o={},s=0;i.length>s;)(n=r(a,e=i[s++]))!==undefined&&l(o,e,n);return o}})},{115:115,25:25,34:34,75:75,85:85}],292:[function(t,e,n){"use strict";var a=t(34),r=t(117),i=t(118),o=t(79),s=t(75).f;t(30)&&a(a.P+t(74),"Object",{__lookupGetter__:function(t){var e,n=r(this),a=i(t,!0);do{if(e=s(n,a))return e.get}while(n=o(n))}})},{117:117,118:118,30:30,34:34,74:74,75:75,79:79}],293:[function(t,e,n){"use strict";var a=t(34),r=t(117),i=t(118),o=t(79),s=t(75).f;t(30)&&a(a.P+t(74),"Object",{__lookupSetter__:function(t){var e,n=r(this),a=i(t,!0);do{if(e=s(n,a))return e.set}while(n=o(n))}})},{117:117,118:118,30:30,34:34,74:74,75:75,79:79}],294:[function(t,e,n){var a=t(34),r=t(84)(!1);a(a.S,"Object",{values:function(t){return r(t)}})},{34:34,84:84}],295:[function(t,e,n){"use strict";function i(t){return null==t?undefined:f(t)}function o(t){var e=t._c;e&&(t._c=undefined,e())}function s(t){return t._o===undefined}function p(t){s(t)||(t._o=undefined,o(t))}function a(t,e){h(t),this._c=undefined,this._o=t,t=new _(this);try{var n=e(t),a=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){a.unsubscribe()}:f(n),this._c=n)}catch(r){return void t.error(r)}s(this)&&o(this)}var r=t(34),u=t(41),c=t(24),l=t(68)(),d=t(127)("observable"),f=t(4),h=t(8),m=t(7),g=t(91),b=t(43),v=t(40),y=v.RETURN;a.prototype=g({},{unsubscribe:function(){p(this)}});var _=function(t){this._s=t};_.prototype=g({},{next:function(t){var e=this._s;if(!s(e)){var n=e._o;try{var a=i(n.next);if(a)return a.call(n,t)}catch(r){try{p(e)}finally{throw r}}}},error:function(t){var e=this._s;if(s(e))throw t;var n=e._o;e._o=undefined;try{var a=i(n.error);if(!a)throw t;t=a.call(n,t)}catch(r){try{o(e)}finally{throw r}}return o(e),t},complete:function(t){var e=this._s;if(!s(e)){var n=e._o;e._o=undefined;try{var a=i(n.complete);t=a?a.call(n,t):undefined}catch(r){try{o(e)}finally{throw r}}return o(e),t}}});var x=function(t){m(this,x,"Observable","_f")._f=f(t)};g(x.prototype,{subscribe:function(t){return new a(t,this._f)},forEach:function(r){var e=this;return new(c.Promise||u.Promise)(function(t,n){f(r);var a=e.subscribe({next:function(t){try{return r(t)}catch(e){n(e),a.unsubscribe()}},error:n,complete:t})})}}),g(x,{from:function(a){var t="function"==typeof this?this:x,e=i(h(a)[d]);if(e){var n=h(e.call(a));return n.constructor===t?n:new t(function(t){return n.subscribe(t)})}return new t(function(e){var n=!1;return l(function(){if(!n){try{if(v(a,!1,function(t){if(e.next(t),n)return y})===y)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,a=new Array(e);t",a.insertBefore(n.lastChild,a.firstChild)}(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),s||function a(e,n){n.cache||(n.cache={},n.createElem=e.createElement,n.createFrag=e.createDocumentFragment,n.frag=n.createFrag()),e.createElement=function(t){return h.shivMethods?d(t,e,n):n.createElem(t)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+c().join().replace(/[\w\-:]+/g,function(t){return n.createElem(t),n.frag.createElement(t),'c("'+t+'")'})+");return n}")(h,n.frag)}(t,e),t}!function(){try{var t=o.createElement("a");t.innerHTML="",n="hidden"in t,s=1==t.childNodes.length||function(){o.createElement("a");var t=o.createDocumentFragment();return"undefined"==typeof t.cloneNode||"undefined"==typeof t.createDocumentFragment||"undefined"==typeof t.createElement}()}catch(e){s=n=!0}}();var h={elements:e.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3-pre",shivCSS:!1!==e.shivCSS,supportsUnknownElements:s,shivMethods:!1!==e.shivMethods,type:"default",shivDocument:f,createElement:d,createDocumentFragment:function m(t,e){if(t=t||o,s)return t.createDocumentFragment();for(var n=(e=e||l(t)).frag.cloneNode(),a=0,r=c(),i=r.length;a>>0,"function"!=typeof t)throw new TypeError;for(r=0;r "+t);var i=undefined;(i=n.node||a.fragment&&a.fragment.rendered&&a.find("*"))&&e.push(i)}}console.warn.apply(console,["%cRactive.js: %c"+t,"color: rgb(114, 157, 52);","color: rgb(85, 85, 85);"].concat(e))},nt=function(){console.log.apply(console,arguments)}):at=nt=rt=B;var ft='A function was specified for "%s" %s, but no %s was returned',ht=function(t,e){return'Missing "'+t+'" '+e+" plugin. You may need to download a plugin via http://docs.ractivejs.org/latest/plugins#"+e+"s"};function mt(t,e,n){var a=gt(t,e,n);return a?a[t][n]:null}function gt(t,e,n){for(;e;){if(n in e[t])return e;if(e.isolated)return null;e=e.parent}}var bt=function(t,e,n,a){if(t===e)return vt(e);if(a){var r=mt("interpolators",n,a);if(r)return r(t,e)||vt(e);pt(ht(a,"interpolator"))}return yt.number(t,e)||yt.array(t,e)||yt.object(t,e)||vt(e)};function vt(t){return function(){return t}}var yt={number:function(e,t){var n;return tt(e)&&tt(t)?(n=(t=+t)-(e=+e))?function(t){return e+t*n}:function(){return e}:null},array:function(t,e){var n,a,r,i;if(!X(t)||!X(e))return null;for(n=[],a=[],i=r=Math.min(t.length,e.length);i--;)a[i]=bt(t[i],e[i]);for(i=r;i=this.duration?(null!==r&&(ge.start(this.root),this.root.viewmodel.set(r,this.to),ge.end()),this.step&&this.step(1,this.to),this.complete(this.to),-1===(a=this.root._animations.indexOf(this))&<("Animation was not found"),this.root._animations.splice(a,1),this.running=!1):(e=this.easing?this.easing(t/this.duration):t/this.duration,null!==r&&(n=this.interpolator(e),ge.start(this.root),this.root.viewmodel.set(r,n),ge.end()),this.step&&this.step(e,n),!0))},stop:function(){var t;this.running=!1,-1===(t=this.root._animations.indexOf(this))&<("Animation was not found"),this.root._animations.splice(t,1)}};function ke(t,e,n){var a,r,i,o,s,p,u,c,l,d,f,h,m,g;if(a=new Xt(function(t){return r=t}),"object"!=typeof t)return(n=n||{}).complete&&a.then(n.complete),n.complete=r,o=Ce(this,t,e,n),a.stop=function(){return o.stop()},a;for(i in p=(n=e||{}).easing,u=n.duration,s=[],c=n.step,l=n.complete,(c||l)&&(f={},n.step=null,n.complete=null,d=function(n){return function(t,e){f[n]=e}}),t)t.hasOwnProperty(i)&&((c||l)&&(h=d(i),n={easing:p,duration:u},c&&(n.step=h)),n.complete=l?h:B,s.push(Ce(this,i,t[i],n)));return g={easing:p,duration:u},c&&(g.step=function(t){return c(t,f)}),l&&a.then(function(t){return l(t,f)}),g.complete=r,m=Ce(this,null,null,g),s.push(m),a.stop=function(){for(var t;t=s.pop();)t.stop();m&&m.stop()},a}var Se=ye,Ee={stop:B};function Ce(t,e,n,a){var r,i,o,s;return null!==(e=e&&Pt(Tt(e)))&&(s=t.viewmodel.get(e)),we.abort(e,t),Z(s,n)?(a.complete&&a.complete(a.to),Ee):(a.easing&&"function"!=typeof(r="function"==typeof a.easing?a.easing:t.easing[a.easing])&&(r=null),i=a.duration===undefined?400:a.duration,o=new Se({keypath:e,from:s,to:n,root:t,duration:i,easing:r,interpolator:a.interpolator,step:a.step,complete:a.complete}),we.add(o),t._animations.push(o),o)}function Pe(){return this.detached||(this.el&&Wt(this.el.__ractive_instances__,this),this.detached=this.fragment.detach(),Ae.fire(this)),this.detached}var Ae=new Bt("detach");function Oe(t){return this.el?this.fragment.find(t):null}function Te(t,e){if(this._isComponentQuery?!this.selector||t.name===this.selector:t.node?p(t.node,this.selector):null)return this.push(t.node||t.instance),e||this._makeDirty(),!0}function Re(){var t,e,n;t=this._root[this._isComponentQuery?"liveComponentQueries":"liveQueries"],e=this.selector,-1!==(n=t.indexOf(e))&&(t.splice(n,1),t[e]=null)}function Me(t,e){var n,a,r,i,o,s,p,u;for(n=je(t.component||t._ractive.proxy),a=je(e.component||e._ractive.proxy),r=zt(n),i=zt(a);r&&r===i;)n.pop(),a.pop(),o=r,r=zt(n),i=zt(a);if(r=r.component||r,i=i.component||i,(p=r.parentFragment)===(u=i.parentFragment))return p.items.indexOf(r)-u.items.indexOf(i)||n.length-a.length;if(s=o.fragments)return s.indexOf(p)-s.indexOf(u)||n.length-a.length;throw new Error("An unexpected condition was met while comparing the position of two components. Please file an issue at https://github.com/RactiveJS/Ractive/issues - thanks!")}function Le(t){var e;return(e=t.parentFragment)?e.owner:t.component&&(e=t.component.parentFragment)?e.owner:void 0}function je(t){var e,n;for(e=[t],n=Le(t);n;)e.push(n),n=Le(n);return e}function De(t,e){return t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:Me(t,e)}function Ne(){this.sort(this._isComponentQuery?Me:De),this._dirty=!1}function Fe(){var t=this;this._dirty||(this._dirty=!0,ge.scheduleTask(function(){t._sort()}))}function Ie(t){var e=this.indexOf(this._isComponentQuery?t.instance:t);-1!==e&&this.splice(e,1)}var Be=function Cc(t,e,n,a){var r=[];return W(r,{selector:{value:e},live:{value:n},_isComponentQuery:{value:a},_test:{value:Te}}),n&&W(r,{cancel:{value:Re},_root:{value:t},_sort:{value:Ne},_makeDirty:{value:Fe},_remove:{value:Ie},_dirty:{value:!1,writable:!0}}),r};function Ue(t,e){var n,a;return this.el?(e=e||{},n=this._liveQueries,(a=n[t])?e&&e.live?a:a.slice():((a=Be(this,t,!!e.live,!1)).live&&(n.push(t),n["_"+t]=a),this.fragment.findAll(t,a),a)):[]}function Ve(t,e){var n,a;return e=e||{},n=this._liveComponentQueries,(a=n[t])?e&&e.live?a:a.slice():((a=Be(this,t,!!e.live,!0)).live&&(n.push(t),n["_"+t]=a),this.fragment.findAllComponents(t,a),a)}function qe(t){return this.fragment.findComponent(t)}function Ge(t){return this.container?this.container.component&&this.container.component.name===t?this.container:this.container.findContainer(t):null}function ze(t){return this.parent?this.parent.component&&this.parent.component.name===t?this.parent:this.parent.findParent(t):null}var We={enqueue:function(t,e){t.event&&(t._eventQueue=t._eventQueue||[],t._eventQueue.push(t.event)),t.event=e},dequeue:function(t){t._eventQueue&&t._eventQueue.length?t.event=t._eventQueue.pop():delete t.event}},He=function Pc(t,e){var n=arguments[2]===undefined?{}:arguments[2];if(!e)return;n.event?n.event.name=e:n.event={name:e,_noArg:!0};var a=Pt(e).wildcardMatches();!function u(t,e,n,a){var r=arguments[4]!==undefined&&arguments[4];var i,o,s=!0;We.enqueue(t,n);for(o=e.length;0<=o;o--)(i=t._subs[e[o]])&&(s=Ke(t,i,n,a)&&s);We.dequeue(t);if(t.parent&&s){if(r&&t.component){var p=t.component.name+"."+e[e.length-1];e=Pt(p).wildcardMatches(),n&&(n.component=t)}u(t.parent,e,n,a)}}(t,a,n.event,n.args,!0)};function Ke(t,e,n,a){var r=null,i=!1;n&&!n._noArg&&(a=[n].concat(a));for(var o=0,s=(e=e.slice()).length;o\~:]))+)((?::[^\s\+\>\~\(]+(?:\([^\)]+\))?)?\s*[\s\+\>\~]?)\s*/g,Fn=/^@media/,In=/\[data-ractive-css~="\{[a-z0-9-]+\}"]/g;function Bn(t){return t.trim?t.trim():t.replace(/^\s+/,"").replace(/\s+$/,"")}function Un(t){return t.str}var Vn=1,qn={name:"css",extend:function(t,e,n){if(n.css){var a=Vn++,r=n.noCssTransform?n.css:Ln(n.css,a);e.cssId=a,On.add({id:a,styles:r})}},init:function(){}};var Gn={name:"data",extend:function(t,e,n){var a=undefined,r=undefined;if(n.data&&et(n.data))for(a in n.data)(r=n.data[a])&&"object"==typeof r&&(et(r)||X(r))&<("Passing a `data` option with object and array properties to Ractive.extend() is discouraged, as mutating them is likely to cause bugs. Consider using a data function instead:\n\n // this...\n data: function () {\n return {\n myObject: {}\n };\n })\n\n // instead of this:\n data: {\n myObject: {}\n }");e.data=zn(e.data,n.data)},init:function(t,e,n){var a=zn(t.prototype.data,n.data);return"function"==typeof a&&(a=a.call(e)),a||{}},reset:function(t){var e=this.init(t.constructor,t,t.viewmodel);return t.viewmodel.reset(e),!0}};function zn(t,e){!function r(t){t&&t.constructor!==Object&&("function"==typeof t||("object"!=typeof t?pt("data option must be an object or a function, `"+t+"` is not valid"):lt("If supplied, options.data should be a plain JavaScript object - using a non-POJO as the root object may work, but is discouraged")))}(e);var n="function"==typeof t,a="function"==typeof e;return e||n||(e={}),n||a?function(){return Hn(a?Wn(e,this):e,n?Wn(t,this):t)}:Hn(e,t)}function Wn(t,e){var n=t.call(e);if(n)return"object"!=typeof n&&pt("Data function must return an object"),n.constructor!==Object&&dt("Data function returned something other than a plain JavaScript object. This might work, but is strongly discouraged"),n}function Hn(t,e){if(t&&e){for(var n in e)n in t||(t[n]=e[n]);return t}return t||e}var Kn=null,Qn=["preserveWhitespace","sanitize","stripComments","delimiters","tripleDelimiters","interpolate"],Yn={fromId:function Mc(t,e){var n;if(!a){if(e&&e.noThrow)return;throw new Error("Cannot retrieve template #"+t+" as Ractive is not running in a browser.")}Xn(t)&&(t=t.substring(1));if(!(n=document.getElementById(t))){if(e&&e.noThrow)return;throw new Error("Could not find template element with id #"+t)}if("SCRIPT"===n.tagName.toUpperCase())return"textContent"in n?n.textContent:n.innerHTML;if(e&&e.noThrow)return;throw new Error("Template element with id #"+t+", must be a