Comparing version 0.2.5 to 0.2.7
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],r={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to torso",order:["burning"],prio:0},"restoration to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to torso",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],bals_used:[],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},might:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:["weariness","paralysis"].concat(e),prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},sun:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:[],command:"sun",order:e,prio:0}};function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var a=0;a<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this._name=r,this._enabled=!1,this._t_started=0,this._t_ended=0,this._timerId=0,this._default_length=n,this.setLength(n),this._callbacks=[]}var r,s,t;return r=e,(s=[{key:"length",get:function(){return this._t_length}},{key:"setLength",value:function(e){this._t_length=e,this._t_length_ms=1e3*e}},{key:"reset",value:function(){this.setLength(this._default_length)}},{key:"start",value:function(){this._enabled&&clearTimeout(this._timerId),this._timerId=setTimeout(this.stop.bind(this),this._t_length_ms),this._t_started=performance.now()/1e3,this._enabled=!0}},{key:"stop",value:function(){if(this._enabled&&(clearTimeout(this._timerId),this._t_ended=performance.now()/1e3,this._enabled=!1,this._callbacks))for(var e=0;e<this._callbacks.length;e++)this._callbacks[e](this._t_ended-this._t_started)}},{key:"duration",value:function(){return this._enabled?this.elapsed():this._t_ended-this._t_started}},{key:"elapsed",value:function(){return this._enabled?performance.now()/1e3-this._t_started:0}},{key:"remaining",value:function(){return this._enabled?this._t_length-performance.now()/1e3-this._t_started:0}},{key:"addCallback",value:function(e){this._callbacks.push(e)}},{key:"clearCallbacks",value:function(){this._callbacks=[]}}])&&n(r.prototype,s),t&&n(r,t),Object.defineProperty(r,"prototype",{writable:!1}),e}(),t=s,i={},o=function(e){var a=[];Object.keys(r).forEach((function(n){var s;(null===(s=r[n].order)||void 0===s?void 0:s.indexOf(e))>-1&&a.push(n)}));var n={name:e,probability:0,cures:a,have:!1,got:function(){var r;i[e].have||(eventStream.raiseEvent("insightGotAff",i[e]),eventStream.raiseEvent("insightGot".concat(e),i[e])),i[e].have=!0,i[e].probability=1,null===(r=i[e].timer)||void 0===r||r.start()},lost:function(){var r;i[e].have&&(eventStream.raiseEvent("insightLostAff",i[e]),eventStream.raiseEvent("insightLost".concat(e),i[e])),i[e].have=!1,i[e].probability=0,null===(r=i[e].timer)||void 0===r||r.stop()},reset:function(){var r;i[e].have=!1,i[e].probability=0,null===(r=i[e].timer)||void 0===r||r.stop()}};return Object.keys(d).indexOf(e)>-1&&(n.timer=new t("insightTimer".concat(e),d[e].duration),n.timer.addCallback(n.lost)),n},l=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],d={test:{duration:10},weakenedmind:{duration:60},slimeobscure:{duration:30},palpatarfeed:{duration:20},cleanseaura:{duration:6}};l.forEach((function(e){i[e]=o(e)}));function c(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function m(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var h={},u={hp:2e4,mana:2e4,hpMax:2e4,manaMax:2e4,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},b=function(){Object.assign(h,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?c(Object(a),!0).forEach((function(r){m(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},u))},g={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"],justice:["paralysis","sensitivity","healthleech","haemophilia","weariness","asthma","clumsiness"]};function p(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,r){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=y(e))||r&&e&&"number"==typeof e.length){a&&(e=a);var n=0,s=function(){};return{s:s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var t,i=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){o=!0,t=e},f:function(){try{i||null==a.return||a.return()}finally{if(o)throw t}}}}function y(e,r){if(e){if("string"==typeof e)return v(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?v(e,r):void 0}}function v(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a<r;a++)n[a]=e[a];return n}var k=i,_=[[]],N=[],w=[],O={id:""},q=function(e){k[e].got();var r,a=f(_);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.includes(e)||n.push(e)}}catch(e){a.e(e)}finally{a.f()}w.push(e),A()},j=function(e){k[e].lost(),_.forEach((function(r){var a=r.indexOf(e);a>-1&&r.splice(a,1)})),E(),A()},x=function(e){var a,n=f(r[e].order);try{for(n.s();!(a=n.n()).done;){var s=a.value;if(1===i[s].probability)return j(s),!0}}catch(e){n.e(e)}finally{n.f()}return!1},E=function(e){if(1!==_.length){var r,a=new Map,n=[],s=f(_);try{for(s.s();!(r=s.n()).done;){var t=r.value.slice().sort().join();a.has(t)?a.set(t,a.get(t)+1):a.set(t,1)}}catch(e){s.e(e)}finally{s.f()}return 1===new Set(a.values()).size&&(a.forEach((function(e,r){return n.push(r.split(","))})),_=n),n}},A=function(){var e=new Set(_.flat()),r=N.filter((function(r){return!e.has(r)}));r.length>0&&r.forEach((function(e){return k[e].lost()})),(N=Array.from(e)).forEach((function(e){k[e].probability=parseFloat((Math.round(100*function(e){return _.filter((function(r){return r.includes(e)})).length/_.length}(e))/100).toFixed(2))})),eventStream.raiseEvent("insightUpdateAffs")},P=q,S=j,z=function(e){if(r[e].bals_used.includes("salve")&&x(e))console.log("salveCure() true return");else{var a=r[e].order,n=[],s=!1;_.forEach((function(e){if(e.find((function(e){return a.includes(e)}))){s=!0;var r,t=f(e);try{var i=function(){var s=r.value;if(a.includes(s)){var t=e.filter((function(e){return e!==s}));t.length>0&&n.push(t)}};for(t.s();!(r=t.n()).done;)i()}catch(e){t.e(e)}finally{t.f()}}})),s&&(_=n.length>0?n:[[]]),E(),A(),w.push(e)}},L=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=f(_.map((function(e){return e.slice(0)})));try{for(n.s();!(a=n.n()).done;){var s=a.value;s.includes(e)||s.push(e),r.push(s)}}catch(e){n.e(e)}finally{n.f()}})),_=r.length>0?r:[[]],E(),A()},T=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=f(_.map((function(e){return e.slice(0)})));try{for(n.s();!(a=n.n()).done;){var s=a.value;s.includes(e)||(s.push(e),r.push(s))}}catch(e){n.e(e)}finally{n.f()}})),_.forEach((function(a){e.every((function(e){return a.includes(e)}))&&r.push(a)})),r.length>0&&(_=r),E(),A()},D=function(e){var r,a=[],n=_.map((function(e){return e.slice(0)})),s=f(n);try{for(s.s();!(r=s.n()).done;){var t,o=r.value,l=f(e);try{for(l.s();!(t=l.n()).done;){var d=t.value;if(!o.includes(d)){i[d].have=!0,o.push(d),a.push(o);break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){s.e(e)}finally{s.f()}n.forEach((function(r){e.every((function(e){return r.includes(e)}))&&a.push(r)})),a.length>0&&(_=a),E(),A()},C=function(e,r){var a=k[e].probability;if(!(r&&1===a||!r&&0===a))if(r&&0===k[e].probability)q(e);else if(r||1!==k[e].probability){var n=[];_.forEach((function(a){a.includes(e)===r&&n.push(a)})),_=n,w.push("".concat(e,":").concat(r)),E(),A()}else j(e)},M=function(e,r){var a=[];_.forEach((function(n){e.every((function(e){return n.includes(e)}))===r&&a.push(n)})),_=a,E(),A()},H=function(e,r){var a=[];k[e].have&&(k[r].got(),_.forEach((function(n){if(n.includes(e)){var s=n.indexOf(e);n[s]=r,a.push(n)}else a.push(n)})),_=a,E(),A())},I=function(){for(var e in _=[[]],N=[],w=[],k){if(Object.hasOwnProperty.call(k,e))k[e].reset()}},R=function(e){var r=e.p,a=e.m,n=p(_);if((n=n.filter((function(e){var n=e.filter((function(e){return g.physicals.includes(e)})),s=e.filter((function(e){return g.mentals.includes(e)}));return n.length<=r&&s.length<=a}))).length<r+a)return console.error("Insight Error: No present branch for physical ".concat(r,", mental ").concat(a)),!1;_=p(n),E(),A()},G={};function B(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function F(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}[{id:"balance",duration:2},{id:"equilibrium",duration:2},{id:"herb",duration:2},{id:"smoke",duration:1.5},{id:"salve",duration:1},{id:"focus",duration:2.5},{id:"tree",duration:15},{id:"shrugging",duration:10}].forEach((function(e){return G[e.id]=function(e){var r=e.id,a=e.duration,n={name:r,have:!0,got:function(){G[r].have=!0,eventStream.raiseEvent("insightGotBal",G[r]),eventStream.raiseEvent("insightGot".concat(r),G[r]),G[r].timer.stop()},lost:function(){var e;G[r].have=!1,eventStream.raiseEvent("insightLostBal",G[r]),eventStream.raiseEvent("insightLost".concat(r),G[r]),null===(e=G[r].timer)||void 0===e||e.start()},reset:function(){G[r].have=!0,G[r].timer.stop()},timer:new t("insightTimer".concat(r),a)};return n.timer.addCallback(n.reset),n}(e)}));var U={},Y={insomnia:!0,kola:!0,speed:!0,shield:!0,rebounding:!0,prismatic:!0,cloak:!0,fangbarrier:!0},K=function(){Object.assign(U,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?B(Object(a),!0).forEach((function(r){F(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):B(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},Y))};function W(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function $(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?W(Object(a),!0).forEach((function(r){J(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):W(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}function J(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var Q=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=document.createElement("span");a.setAttribute("class","mono"),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"["})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:Gold",innerHTML:"Insight"})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"] "})),r?a.insertAdjacentHTML("beforeend",e):a.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:e})),globalThis.nexusclient.add_html_line(a.outerHTML)},V={fg:"olive",bg:""},X={fg:"royalblue",bg:""},Z={fg:"",bg:""},ee={fg:"ForestGreen",bg:""},re={fg:"",bg:""},ae={fg:"slategray",bg:""},ne={fg:"greenyellow",bg:""},se={fg:"DeepSkyBlue",bg:""},te={fg:"DarkOrange",bg:""},ie={fg:"Red",bg:""},oe={fg:"Gold",bg:""},le={fg:"firebrick",bg:""},de={fg:"Tan",bg:""},ce={fg:"darkseagreen",bg:""},me={fg:"orchid",bg:""},he={fg:"sienna",bg:""},ue={fg:"darkviolet",bg:""},be={fg:"lightpink",bg:""},ge={fg:"paleyellow",bg:"darkslategray"},pe={addiction:$({shortName:"add"},te),aeon:$({shortName:"ae"},ne),agoraphobia:$({shortName:"agor"},X),amnesia:{shortName:"amn",fg:"",bg:""},anorexia:$({shortName:"ANO"},he),asthma:$({shortName:"AST"},ee),blackout:{shortName:"bo",fg:"",bg:""},blindness:$({shortName:"unb"},Z),bound:$({shortName:"bnd"},ge),brokenleftarm:$({shortName:"la1"},me),brokenleftleg:$({shortName:"ll1"},me),brokenrightarm:$({shortName:"ra1"},me),brokenrightleg:$({shortName:"rl1"},me),bruisedribs:{shortName:"ribs",fg:"",bg:""},burning:$({shortName:"burn"},me),calcifiedskull:$({shortName:"calh"},ue),calcifiedtorso:$({shortName:"calt"},ue),claustrophobia:$({shortName:"clau"},de),clumsiness:$({shortName:"clu"},ee),concussion:$({shortName:"conc"},ue),confusion:$({shortName:"con"},de),corruption:{shortName:"corr",fg:"",bg:""},crackedribs:$({shortName:"cr"},be),crushedthroat:$({shortName:"cru"},me),daeggerimpale:$({shortName:"daeg"},ge),damage:{shortName:"dmg",fg:"tomato",bg:""},damagedleftarm:$({shortName:"la2"},ue),damagedleftleg:$({shortName:"ll2"},ue),damagedrightarm:$({shortName:"ra2"},ue),damagedrightleg:$({shortName:"rl2"},ue),damagedhead:$({shortName:"hd2"},ue),darkshade:$({shortName:"dark"},te),dazed:$({shortName:"dzd"},ne),dazzled:$({shortName:"dzl"},me),deadening:$({shortName:"dea"},ne),deafness:$({shortName:"und"},re),dehydrated:{shortName:"deh",fg:"",bg:""},dementia:$({shortName:"dem"},de),depression:$({shortName:"dep"},oe),deteriorate:{shortName:"det",fg:"",bg:""},disloyalty:$({shortName:"disl"},le),disrupted:{shortName:"disr",fg:"",bg:""},dissonance:$({shortName:"disso"},oe),dizziness:$({shortName:"diz"},oe),enscorcelled:{shortName:"ensor",fg:"",bg:""},entangled:$({shortName:"entgl"},ge),epilepsy:$({shortName:"epi"},oe),fear:{shortName:"fear",fg:"",bg:""},flushings:$({shortName:"flush"},te),frozen:$({shortName:"frz"},ce),generosity:$({shortName:"gen"},se),grievouswounds:$({shortName:"grv"},be),guilt:$({shortName:"gui"},X),haemophilia:$({shortName:"haem"},te),hallucinations:$({shortName:"hall"},de),hamstrung:{shortName:"hms",fg:"",bg:""},healthleech:$({shortName:"hthl"},ee),heartseed:$({shortName:"heart"},ue),hellsight:$({shortName:"hell"},le),horror:$({shortName:"hor"},oe),hypersomnia:$({shortName:"hypers"},de),hypochondria:$({shortName:"hypoch"},ee),hypothermia:$({shortName:"hypoth"},ue),icefisted:{shortName:"ice",fg:"",bg:""},impaled:$({shortName:"impl"},ge),impatience:$({shortName:"IMPAT"},oe),indifference:$({shortName:"ind"},se),itching:$({shortName:"itch"},he),justice:$({shortName:"just"},se),kkractlebrand:$({shortName:"kkr"},be),laceratedthroat:$({shortName:"lac2"},ue),latched:$({shortName:"latch"},be),lethargy:$({shortName:"let"},te),lightbind:{shortName:"light",fg:"",bg:""},loneliness:$({shortName:"lon"},X),lovers:$({shortName:"love"},se),manaleech:$({shortName:"man"},le),mangledleftarm:$({shortName:"la3"},ue),mangledleftleg:$({shortName:"ll3"},ue),mangledrightarm:$({shortName:"ra3"},ue),mangledrightleg:$({shortName:"rl3"},ue),mangledhead:$({shortName:"hd3"},ue),masochism:$({shortName:"maso"},X),mildtrauma:$({shortName:"tor1"},ue),mycalium:$({shortName:"myc"},oe),nausea:$({shortName:"nau"},te),numbedleftarm:{shortName:"nbla",fg:"",bg:""},numbedrightarm:{shortName:"nbra",fg:"",bg:""},pacified:$({shortName:"pac"},se),paralysis:$({shortName:"PAR"},ie),paranoia:$({shortName:"prn"},de),parasite:$({shortName:"prs"},ee),peace:$({shortName:"pea"},se),phlogisticated:{shortName:"phlog",fg:"",bg:""},pinshot:{shortName:"psh",fg:"",bg:""},pressure:$({shortName:"pres"},ae),prone:{shortName:"pr",fg:"",bg:""},pyramides:$({shortName:"pyra"},ie),pyre:$({shortName:"pyre"},se),rebbies:$({shortName:"reb"},ee),recklessness:$({shortName:"reck"},X),retardation:{shortName:"ret",fg:"",bg:""},retribution:$({shortName:"retr"},se),revealed:{shortName:"rev",fg:"",bg:""},sandfever:$({shortName:"sand"},oe),scalded:$({shortName:"scald"},he),scytherus:$({shortName:"scy"},te),selarnia:$({shortName:"sel"},me),sensitivity:$({shortName:"sen"},ee),serioustrauma:$({shortName:"tor2"},ue),shadowmadness:$({shortName:"shad"},oe),shivering:$({shortName:"shiv"},ce),shyness:$({shortName:"shy"},oe),skullfractures:$({shortName:"sf"},be),slashedthroat:$({shortName:"lac1"},he),sleeping:{shortName:"slp",fg:"",bg:""},slickness:$({shortName:"SLI"},ie),slimeobscure:{shortName:"nkh",fg:"",bg:""},spiritburn:$({shortName:"spirB"},X),spiritwrack:{shortName:"spirW",fg:"",bg:""},stupidity:$({shortName:"st"},oe),stuttering:$({shortName:"stut"},he),homunculusmercury:{shortName:"merc",fg:"",bg:""},temperedcholeric:$({shortName:"choH"},V),temperedmelancholic:$({shortName:"melaH"},V),temperedphlegmatic:$({shortName:"phleH"},V),temperedsanguine:$({shortName:"sanH"},V),tenderskin:$({shortName:"tend"},X),tension:$({shortName:"tens"},ne),timeflux:{shortName:"tmfx",fg:"",bg:""},timeloop:$({shortName:"tmlp"},se),tonguetied:$({shortName:"tngt"},ue),torntendons:$({shortName:"tt"},be),transfixation:$({shortName:"trfx"},ge),unweavingbody:$({shortName:"unwM"},te),unweavingspirit:$({shortName:"unwS"},ne),unweavingmind:$({shortName:"unwM"},oe),unblind:{shortName:"unB",fg:"",bg:""},undeaf:{shortName:"unD",fg:"",bg:""},vertigo:$({shortName:"vert"},X),vitrified:{shortName:"vitri",fg:"",bg:""},voidfisted:{shortName:"void",fg:"",bg:""},voyria:{shortName:"voy",fg:"",bg:""},weariness:$({shortName:"wea"},ee),webbed:$({shortName:"web"},ge),whisperingmadness:$({shortName:"mad"},X),wristfractures:$({shortName:"wf"},be)};var fe=function(e){var r=e.id,a=e.player,n=e.probability,s=void 0===n?0:n;if(ve(a)&&void 0!==r){var t=i[r];return!!(t.have&&t.probability>=s)}},ye=function(e){var r=e.ids,a=e.probability,n=void 0===a?0:a,s=e.player;if(ve(s)){var t=!1;return Array.isArray(r)&&(t=r.every((function(e){return N.indexOf(e)>-1&&i[e].probability>=n}))),t}},ve=function(e){if(void 0===e||e==O.id)return!0},ke=function(){I(),K(),b(),function(){for(var e in G)G[e].reset()}(),insight.reporting.notices&&Q("Reset")};function _e(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function Ne(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var we={version:"0.2.5",addAff:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(P(r),insight.reporting.notices&&Q("Added: ".concat(r)))},getAff:function(e){var r=e.id,a=e.player;if(ve(a)&&void 0!==r)return insight.affs[r]},removeAff:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&S(r)},usedCure:function(e){var a=e.id,n=e.player;ve(n)&&void 0!==a&&(!function(e){var a=r[e].blocks;void 0!==a&&a.forEach((function(e){Array.isArray(e)?ye({ids:e})&&e.forEach((function(e){return C(e,!1)})):fe({id:e})&&C(e,!1)}))}(a),z(a),r[a].bals_used.forEach((function(e){return G[e].lost()})),eventStream.raiseEvent("insightUsedCure",a),eventStream.raiseEvent("insightUseCure".concat(a)))},confirmAff:function(e){var r=e.id,a=e.state,n=e.player;ve(n)&&void 0!==r&&(C(r,a),insight.reporting.notices&&Q("Confirmed: ".concat(r," ").concat(a)))},confirmAffs:function(e){var r=e.ids,a=e.state,n=e.player;ve(n)&&void 0!==r&&Array.isArray(r)&&(M(r,a),insight.reporting.notices&&Q("Confirmed: ".concat(id," ").concat(a)))},reset:ke,randomAffs:function(e){var r=e.ids,a=e.player;ve(a)&&void 0!==r&&(L(r),insight.reporting.notices&&Q("Random: ".concat(r)))},readAuraConfirm:function(e){var r=e.p,a=e.m,n=e.player;ve(n)&&R({p:r,m:a})},smartAffs:function(e){var r=e.ids,a=e.player,n=e.ordered,s=void 0!==n&&n;ve(a)&&void 0!==r&&(s?D(r):T(r),insight.reporting.notices&&Q("Smart: ".concat(r)))},convertAff:function(e){var r=e.id,a=e.to,n=e.player;ve(n)&&void 0!==r&&void 0!==a&&H(r,a)},addDef:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(U[r]=!0,insight.reporting.notices&&Q("Def (".concat(r,"): true")))},removeDef:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(U[r]=!1,insight.reporting.notices&&Q("Def (".concat(r,"): false")))},hasAff:fe,hasAffs:ye,hasAnAff:function(e){var r=e.ids,a=e.player,n=e.probability,s=void 0===n?0:n;if(ve(a)){var t=!1;return Array.isArray(r)&&(t=N.some((function(e){return r.indexOf(e)>-1&&i[e].probability>=s}))),t}},hasDef:function(e){var r=e.id;e.player;return U[r]},hasBal:function(e){var r=e.id;e.player;return G[r].have},lostBal:function(e){var r=e.id;e.player;G[r].lost()},balRemaining:function(e){var r=e.id;e.player;return G[r].timer.remaining()},setStatus:function(e){var r=e.id,a=e.value;e.player;h[r]=a,insight.reporting.notices&&Q("Status (".concat(r,"): ").concat(a))},getStatus:function(e){var r=e.id;e.player;return h[r]},currentAffs:function(){return N},currentAffDisplay:function(){var e=[];return N.forEach((function(r){return e.push("".concat(r,": ").concat(i[r].probability))})),e},currentAffDisplayHTML:function(){var e=document.createElement("span");if(e.setAttribute("class","mono"),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"["})),N.length>1)for(var r=0;r<N.length-1;r++){var a=N[r];e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(pe[a].fg||"",";background:").concat(pe[a].bg||""),innerHTML:insight.reporting.shortNames?"".concat(pe[a].shortName):"".concat(a)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:N.length>1?": ".concat(i[a].probability,", "):": ".concat(i[a].probability)}))}var n=N.at(-1);return e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(pe[n].fg||"",";background:").concat(pe[n].bg||""),innerHTML:insight.reporting.shortNames?"".concat(pe[n].shortName):"".concat(n)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:": ".concat(i[n].probability)})),N.forEach((function(e){})),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"]"})),e.outerHTML},nextLine:function(e){var r=!1,a=nexusclient.current_block.filter((function(e){return void 0===e.html_text})),n=a.indexOf(nexusclient.current_line);if(void 0!==a[n+1].line){var s=a[n+1].parsed_line.text();return e instanceof RegExp?r=e.test(s):"string"==typeof e&&(r=s.includes(e)),r}},checkBlock:function(e){var r=nexusclient.current_block,a=!1;return e instanceof RegExp?a=!!r.find((function(r){return void 0!==r.line&&e.test(r.line)})):"string"==typeof e&&(a=!!r.find((function(r){return void 0!==r.line&&r.line.includes(e)}))),a},notice:Q,target:O,reporting:{notices:!1,shortNames:!1,colors:!1},occultist:g,affs:i,defs:U,bals:G,status:h,timeline:function(){return _},debug:function(){console.log(O.id)},setTarget:function(e){void 0!==e&&(O.id=e,ke())},players:{}};if(globalThis.insight=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?_e(Object(a),!0).forEach((function(r){Ne(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_e(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},we),globalThis.insight.reset(),"undefined"!=typeof nexusclient){eventStream.removeListener("insightLostAff","insightLostAff"),eventStream.registerEvent("insightLostAff",(function(e){we.reporting.notices&&we.notice("Pruned: ".concat(e.name))}));eventStream.removeListener("IRE.Target.Set","insightTarget"),eventStream.registerEvent("IRE.Target.Set",(function(e){we.target.id=e})),"undefined"!=typeof nexusclient&&"Khaseem"!==nexusclient.datahandler().GMCP.Char.Status.name&&fetch("https://unpkg.com/nexsight/insight3.nxs",{cache:"no-store"}).then((function(e){return e.json()})).then((function(e){nexusclient.packages().get("insight3").apply(e,nexusclient.reflexes())}))}}(); | ||
(()=>{var e={95:()=>{eventStream.registerEvent("insight.domination.humbugCommand",(e=>{insight.addAff({id:"addiction",player:e.target})}));eventStream.registerEvent("insight.domination.houndCommand",(e=>{insight.addAff({id:"weariness",player:e.target})}));eventStream.registerEvent("insight.domination.stormCommand",(e=>{insight.addAff({id:"vertigo",player:e.target})}));eventStream.registerEvent("insight.domination.bloodleechCommand",(e=>{insight.addAff({id:"haemophilia",player:e.target})}));eventStream.registerEvent("insight.domination.sycophantCommand",(e=>{insight.addAff({id:"weakenedmind",player:e.target})}));eventStream.registerEvent("insight.domination.slimeCommand",(e=>{insight.addAff({id:"slimeobscure",player:e.target});insight.nextLine(/^Horror overcomes \w+'s face as \w+ body stiffens into paralysis\.$/)&&insight.confirmAff({id:"asthma",player:e.target,state:!0})}));eventStream.registerEvent("insight.domination.chimeraCommandDeaf",(e=>{insight.confirmAff({id:"undeaf",state:!1,player:e.target})}));eventStream.registerEvent("insight.domination.chimeraCommand",(e=>{insight.confirmAff({id:"undeaf",state:!0,player:e.target}),insight.nextLine(insight.target.id)||insight.addAff({id:"hallucinations",player:e.target})}));eventStream.registerEvent("insight.domination.bubonisCommand",(e=>{insight.hasDef({id:"fangbarrier",player:e.target})?insight.nextLine("The protective coating covering the skin of")?(insight.confirmAff({id:"asthma",player:e.target,state:!0}),insight.addAff({id:"slickness",player:e.target})):insight.addAff({id:"asthma",player:e.target,state:!0}):insight.hasAff({id:"asthma",player:e.target,probability:.49})?insight.addAff({id:"slickness",player:e.target}):insight.addAff({id:"asthma",player:e.target,state:!0})}));eventStream.registerEvent("insight.domination.wormCommand",(e=>{insight.addAff({id:"palpatarfeed",player:e.target})}));eventStream.registerEvent("insight.domination.wormTick",(e=>{insight.addAff({id:"healthleech",player:e.target})}));const croneCommand=e=>{insight.addAff({id:`broken${affs[0]}`,player:e.target})};eventStream.registerEvent("insight.domination.croneCommand",croneCommand),eventStream.registerEvent("insight.domination.cronePrimebond",croneCommand);eventStream.registerEvent("insight.domination.abominationCommandFail",(e=>{insight.removeAff({id:"cleanseaura",player:e.target})}));const gremlinCommand=e=>{insight.removeDef({id:"shield",player:e.target})};eventStream.registerEvent("insight.domination.gremlinCommand",gremlinCommand),eventStream.registerEvent("insight.domination.gremlinCommandFail",gremlinCommand);eventStream.registerEvent("insight.domination.firelordCommand",(e=>{insight.removeDef({id:"shield",player:e.target})}));eventStream.registerEvent("insight.domination.firelordCommandFail",(e=>{}));eventStream.registerEvent("insight.domination.wormPrimebond",(e=>{insight.addAff({id:"nausea",player:e.target})}));eventStream.registerEvent("insight.domination.gremlinPrimebond",(e=>{insight.addAff({id:"dizziness",player:e.target})}));eventStream.registerEvent("insight.domination.gremlinPrimebond2",(e=>{insight.confirmAff({id:"dizziness",state:!0,player:e.target})}));eventStream.registerEvent("insight.domination.humbugPrimebond",(e=>{insight.hasAff({id:"addiction",player:e.target,probability:.49})?(insight.adjustStat({id:"hp",player:e.target,value:-.1}),insight.adjustStat({id:"mana",player:e.target,value:-.1})):(insight.adjustStat({id:"hp",player:e.target,value:-.05}),insight.adjustStat({id:"mana",player:e.target,value:-.05}))}));eventStream.registerEvent("insight.domination.bubonisPrimebond",(e=>{insight.smartAffs({ids:insight.occultist.bubonis,player:e.target})}));eventStream.registerEvent("insight.domination.chimeraPrimebondGas",(e=>{insight.removeDef({id:insomnia,player:e.target})}));eventStream.registerEvent("insight.domination.chimeraPrimebondRam",(e=>{insight.addAff({id:"prone",player:e.target})}));eventStream.registerEvent("insight.domination.chimeraPrimebondRoar",(e=>{insight.addAff({id:"undeaf",player:e.target}),insight.addAff({id:"prone",player:e.target})}));eventStream.registerEvent("insight.domination.chimeraPrimebondUndeaf",(e=>{insight.addAff({id:"undeaf",player:e.target})}))},389:()=>{eventStream.registerEvent("insight.occultism.instill",(e=>{insight.adjustStat({id:"hp",player:e.target,value:-.03}),insight.adjustStat({id:"mana",player:e.target,value:-.03}),"sensitivity"===e.affs[0]?insight.hasAff({id:"undeaf",player:e.target})?insight.addAff({id:"sensitivity",player:e.target}):insight.addAff({id:"undeaf",player:e.target}):insight.addAff({id:e.affs[0],player:e.target})}));eventStream.registerEvent("insight.occultism.enervate",(e=>{insight.adjustStat({id:"mana",player:e.target,value:-.2})}));eventStream.registerEvent("insight.occultism.ague",(e=>{insight.hasDef({id:"insulation",player:e.target})?insight.removeDef({id:"insulation",player:e.target}):insight.smartAffs({ids:["shivering","frozen"],player:e.target,ordered:!0})}));eventStream.registerEvent("insight.domination.attend",(e=>{insight.addAff({id:"undeaf",player:e.target}),insight.addAff({id:"unblind",player:e.target})}));eventStream.registerEvent("insight.occultism.shrivelTargeted",(e=>{insight.addAff({id:e.affs[0],player:e.target})}));eventStream.registerEvent("insight.occultism.shrivelArms",(e=>{insight.smartAffs({ids:["brokenrightarm","brokenleftarm"],player:e.target})}));eventStream.registerEvent("insight.occultism.shrivelLegs",(e=>{insight.smartAffs({ids:["brokenrightarm","brokenleftarm"],player:e.target})}));eventStream.registerEvent("insight.occultism.shrivelRehit",(e=>{const t=e.groups.limb.replace(" ","").toLowerCase();"arm"===t?(insight.confirmAff({id:"brokenleftarm",player:e.target,state:!0}),insight.confirmAff({id:"brokenrightarm",player:e.target,state:!0})):"leg"===t?(insight.confirmAff({id:"brokenleftleg",player:e.target,state:!0}),insight.confirmAff({id:"brokenrightleg",player:e.target,state:!0})):insight.confirmAff({id:`broken${t}`,player:e.target,state:!0})}));eventStream.registerEvent("insight.occultism.unnamableSpeak",(e=>{const t=GMCP.RoomPlayers.map((e=>e.name));nexAction.triggers.add({id:"insight.occultism.unnamableSpeak",tags:["insight"],regex:/^(\w+) pales as the blood drains from \w+ face\.$/,action:e=>{insight.addAff({id:"undeaf",player:e[1]}),t=t.filter((t=>t!==e[1]))},onRemove:()=>{t.forEach((e=>insight.removeAff({id:"undeaf",player:e})))}}),eventStream.registerEvent("PromptEvent",(()=>{nexAction.triggers.remove("insight.occultism.unnamableSpeak")}),!0)}));eventStream.registerEvent("insight.occultism.unnamableVision",(e=>{const t=GMCP.RoomPlayers.map((e=>e.name));nexAction.triggers.add({id:"insight.occultism.unnamableVision",tags:["insight"],regex:/^(\w+) pales as the blood drains from \w+ face\.$/,action:e=>{insight.addAff({id:"unblind",player:e[1]}),t=t.filter((t=>t!==e[1]))},onRemove:()=>{t.forEach((e=>insight.removeAff({id:"unblind",player:e})))}}),eventStream.registerEvent("PromptEvent",(()=>{nexAction.triggers.remove("insight.occultism.unnamableVision")}),!0)}));eventStream.registerEvent("insight.occultism.devolve",(e=>{insight.addAff({id:"shyness",player:e.target}),insight.addAff({id:"disloyalty",player:e.target})}));eventStream.registerEvent("insight.occultism.whisperingmadness",(e=>{insight.addAff({id:"whisperingmadness",player:e.target})}));eventStream.registerEvent("insight.occultism.whisperingmadnessMiss",(e=>{insight.occultist.whisperingmadness.forEach((t=>insight.removeAff({id:t,player:e.target})))}));eventStream.registerEvent("insight.occultism.cleanseaura",(e=>{nexusclient.current_block.find((e=>e.line.includes("A look of sudden concern")))?insight.addAff({id:"cleanseaura",player:e.target}):insight.removeAff({id:"cleanseaura",player:e.target})}))},473:()=>{eventStream.registerEvent("insight.tarot.magician",(e=>{insight.adjustStat({id:"mana",player:e.target,value:.25})}));eventStream.registerEvent("insight.tarot.priestess",(e=>{insight.adjustStat({id:"hp",player:e.target,value:.25})}));eventStream.registerEvent("insight.tarot.lovers",(e=>{insight.addAff({id:"lovers",player:e.target})}));eventStream.registerEvent("insight.tarot.aeon",(e=>{insight.removeDef({id:"speed",player:e.target}),insight.addAff({id:"aeon",player:e.target})}));eventStream.registerEvent("insight.tarot.aeonStrip",(e=>{insight.removeDef({id:"speed",player:e.target})}));eventStream.registerEvent("insight.tarot.justice",(e=>{insight.addAff({id:"justice",player:e.target})}));eventStream.registerEvent("insight.tarot.deathRub",(e=>{insight.hasDef({id:"insulation",player:e.target})?insight.removeDef({id:"insulation",player:e.target}):insight.addAff({id:"shivering",player:e.target})}));eventStream.registerEvent("insight.tarot.ruinateLovers",(e=>{insight.addAff({id:"manaleech",player:e.target})}));eventStream.registerEvent("insight.tarot.ruinateJustice",(e=>{insight.nextLine("violently spasms")||["paralysis","asthma","healthleech","haemophilia","sensitivity","clumsiness","weariness"].forEach((e=>insight.confirmAff({id:e,state:!1})))}));eventStream.registerEvent("insight.tarot.moon",(e=>{console.log(JSON.stringify(insight.state.queues[insight.state.lastQueue]));const t=insight.state.queues[insight.state.lastQueue].match(/FLING MOON AT \w+ (\w+)/);t?insight.addAff({id:t[1].toLowerCase(),player:e.target}):insight.smartAffs({ids:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy"],player:e.target})}))}},t={};function __webpack_require__(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,__webpack_require__),s.exports}(()=>{"use strict";const e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],t={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","stuttering","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to body",order:["burning"],prio:0},"restoration to head":{bals_used:["salve","restoration"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to body":{bals_used:["salve","restoration"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to body",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve","restoration"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve","restoration"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],bals_used:[],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},might:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:["weariness","paralysis",...e],prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},accelerate:{bals_req:["equilibrium","balance","accelerate"],bals_used:["accelerate","balance"],blocks:["recklessness"],skills:["Depthswalker"],command:"accelerate",order:e,prio:0},sun:{bals_req:["sun"],bals_used:["sun"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["free"],bals_used:["free"],blocks:[],skills:[],command:"generic",order:e,prio:0},ruinateJustice:{bals_req:["free"],bals_used:["free"],blocks:[],command:"ruinate justice",order:["paralysis","asthma","clumsiness","weariness","haemophilia","sensitivity","healthleech"],prio:0}},capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1),generateChunk=(e,t,a)=>{let i=document.createElement("span");return i.style.color=t,i.style.backgroundColor=a,i.textContent=e,i},a={antimony:{fg:"olive",bg:""},argentum:{fg:"royalblue",bg:""},arsenic:{fg:"",bg:""},aurum:{fg:"ForestGreen",bg:""},azurite:{fg:"",bg:""},calamine:{fg:"",bg:""},calcite:{fg:"slategray",bg:""},cinnabar:{fg:"greenyellow",bg:""},cuprum:{fg:"DeepSkyBlue",bg:""},ferrum:{fg:"DarkOrange",bg:""},gypsum:{fg:"",bg:""},magnesium:{fg:"Red",bg:""},plumbum:{fg:"Gold",bg:""},quartz:{fg:"",bg:""},quicksilver:{fg:"",bg:""},realgar:{fg:"firebrick",bg:""},stannum:{fg:"Tan",bg:""},caloric:{fg:"darkseagreen",bg:""},mending:{fg:"orchid",bg:""},epidermal:{fg:"sienna",bg:""},restoration:{fg:"darkviolet",bg:""},health:{fg:"lightpink",bg:""},writhe:{fg:"paleyellow",bg:"darkslategray"}},i={addiction:{shortName:"add",...a.ferrum},aeon:{shortName:"ae",...a.cinnabar},agoraphobia:{shortName:"agor",...a.argentum},amnesia:{shortName:"amn",fg:"",bg:""},anorexia:{shortName:"ANO",...a.epidermal},asthma:{shortName:"AST",...a.aurum},blackout:{shortName:"bo",fg:"",bg:""},blindness:{shortName:"unb",...a.arsenic},bound:{shortName:"bnd",...a.writhe},brokenleftarm:{shortName:"la1",...a.mending},brokenleftleg:{shortName:"ll1",...a.mending},brokenrightarm:{shortName:"ra1",...a.mending},brokenrightleg:{shortName:"rl1",...a.mending},bruisedribs:{shortName:"ribs",fg:"",bg:""},burning:{shortName:"burn",...a.mending},calcifiedskull:{shortName:"calh",...a.restoration},calcifiedtorso:{shortName:"calt",...a.restoration},claustrophobia:{shortName:"clau",...a.stannum},cleanseaura:{shortName:"cleanse",fg:"",bg:""},clumsiness:{shortName:"clu",...a.aurum},concussion:{shortName:"conc",...a.restoration},confusion:{shortName:"con",...a.stannum},corruption:{shortName:"corr",fg:"",bg:""},crackedribs:{shortName:"cr",...a.health},crushedthroat:{shortName:"cru",...a.mending},daeggerimpale:{shortName:"daeg",...a.writhe},damage:{shortName:"dmg",fg:"tomato",bg:""},damagedleftarm:{shortName:"la2",...a.restoration},damagedleftleg:{shortName:"ll2",...a.restoration},damagedrightarm:{shortName:"ra2",...a.restoration},damagedrightleg:{shortName:"rl2",...a.restoration},damagedhead:{shortName:"hd2",...a.restoration},darkshade:{shortName:"dark",...a.ferrum},dazed:{shortName:"dzd",...a.cinnabar},dazzled:{shortName:"dzl",...a.mending},deadening:{shortName:"dea",...a.cinnabar},deafness:{shortName:"und",...a.calamine},dehydrated:{shortName:"deh",fg:"",bg:""},dementia:{shortName:"dem",...a.stannum},depression:{shortName:"dep",...a.plumbum},deteriorate:{shortName:"det",fg:"",bg:""},disloyalty:{shortName:"disl",...a.realgar},disrupted:{shortName:"disr",fg:"",bg:""},dissonance:{shortName:"disso",...a.plumbum},dizziness:{shortName:"diz",...a.plumbum},enmesh:{text:"enmsh",...a.writhe},enscorcelled:{shortName:"ensor",fg:"",bg:""},entangled:{shortName:"entgl",...a.writhe},epilepsy:{shortName:"epi",...a.plumbum},fear:{shortName:"fear",fg:"",bg:""},flushings:{shortName:"flush",...a.ferrum},frozen:{shortName:"frz",...a.caloric},generosity:{shortName:"gen",...a.cuprum},grievouswounds:{shortName:"grv",...a.health},guilt:{shortName:"gui",...a.argentum},haemophilia:{shortName:"haem",...a.ferrum},hallucinations:{shortName:"hall",...a.stannum},hamstrung:{shortName:"hms",fg:"",bg:""},healthleech:{shortName:"hthl",...a.aurum},heartseed:{shortName:"heart",...a.restoration},hellsight:{shortName:"hell",...a.realgar},horror:{shortName:"hor",...a.plumbum},hypersomnia:{shortName:"hypers",...a.stannum},hypochondria:{shortName:"hypoch",...a.aurum},hypothermia:{shortName:"hypoth",...a.restoration},icefisted:{shortName:"ice",fg:"",bg:""},impaled:{shortName:"impl",...a.writhe},impatience:{shortName:"IMPAT",...a.plumbum},indifference:{shortName:"ind",...a.cuprum},itching:{shortName:"itch",...a.epidermal},justice:{shortName:"just",...a.cuprum},kkractlebrand:{shortName:"kkr",...a.health},laceratedthroat:{shortName:"lac2",...a.restoration},latched:{shortName:"latch",...a.health},lethargy:{shortName:"let",...a.ferrum},lightbind:{shortName:"light",fg:"",bg:""},loneliness:{shortName:"lon",...a.argentum},lovers:{shortName:"love",...a.cuprum},manaleech:{shortName:"man",...a.realgar},mangledleftarm:{shortName:"la3",...a.restoration},mangledleftleg:{shortName:"ll3",...a.restoration},mangledrightarm:{shortName:"ra3",...a.restoration},mangledrightleg:{shortName:"rl3",...a.restoration},mangledhead:{shortName:"hd3",...a.restoration},masochism:{shortName:"maso",...a.argentum},mildtrauma:{shortName:"tor1",...a.restoration},mycalium:{shortName:"myc",...a.plumbum},nausea:{shortName:"nau",...a.ferrum},numbedleftarm:{shortName:"nbla",fg:"",bg:""},numbedrightarm:{shortName:"nbra",fg:"",bg:""},pacified:{shortName:"pac",...a.cuprum},paralysis:{shortName:"PAR",...a.magnesium},paranoia:{shortName:"prn",...a.stannum},parasite:{shortName:"prs",...a.aurum},peace:{shortName:"pea",...a.cuprum},phlogisticated:{shortName:"phlog",fg:"",bg:""},pinshot:{shortName:"psh",fg:"",bg:""},pressure:{shortName:"pres",...a.calcite},prone:{shortName:"pr",fg:"",bg:""},pyramides:{shortName:"pyra",...a.magnesium},pyre:{shortName:"pyre",...a.cuprum},rebbies:{shortName:"reb",...a.aurum},recklessness:{shortName:"reck",...a.argentum},retardation:{shortName:"ret",fg:"",bg:""},retribution:{shortName:"retr",...a.cuprum},revealed:{shortName:"rev",fg:"",bg:""},sandfever:{shortName:"sand",...a.plumbum},scalded:{shortName:"scald",...a.epidermal},scytherus:{shortName:"scy",...a.ferrum},selarnia:{shortName:"sel",...a.mending},sensitivity:{shortName:"sen",...a.aurum},serioustrauma:{shortName:"tor2",...a.restoration},shadowmadness:{shortName:"shad",...a.plumbum},shivering:{shortName:"shiv",...a.caloric},shyness:{shortName:"shy",...a.plumbum},skullfractures:{shortName:"sf",...a.health},slashedthroat:{shortName:"lac1",...a.epidermal},sleeping:{shortName:"slp",fg:"",bg:""},slickness:{shortName:"SLI",...a.magnesium},slimeobscure:{shortName:"nkh",fg:"",bg:""},spiritburn:{shortName:"spirB",...a.argentum},spiritwrack:{shortName:"spirW",fg:"",bg:""},stupidity:{shortName:"st",...a.plumbum},stuttering:{shortName:"stut",...a.epidermal},homunculusmercury:{shortName:"merc",fg:"",bg:""},temperedcholeric:{shortName:"choH",...a.antimony},temperedmelancholic:{shortName:"melaH",...a.antimony},temperedphlegmatic:{shortName:"phleH",...a.antimony},temperedsanguine:{shortName:"sanH",...a.antimony},tenderskin:{shortName:"tend",...a.argentum},tension:{shortName:"tens",...a.cinnabar},timeflux:{shortName:"tmfx",fg:"",bg:""},timeloop:{shortName:"tmlp",...a.cuprum},tonguetied:{shortName:"tngt",...a.restoration},torntendons:{shortName:"tt",...a.health},transfixation:{shortName:"trfx",...a.writhe},unweavingbody:{shortName:"unwM",...a.ferrum},unweavingspirit:{shortName:"unwS",...a.cinnabar},unweavingmind:{shortName:"unwM",...a.plumbum},unblind:{shortName:"unB",fg:"",bg:""},undeaf:{shortName:"unD",fg:"",bg:""},vertigo:{shortName:"vert",...a.argentum},vitrified:{shortName:"vitri",fg:"",bg:""},voidfisted:{shortName:"void",fg:"",bg:""},voyria:{shortName:"voy",fg:"",bg:""},weariness:{shortName:"wea",...a.aurum},webbed:{shortName:"web",...a.writhe},whisperingmadness:{shortName:"mad",...a.argentum},wristfractures:{shortName:"wf",...a.health}},colorGradation=e=>`hsl(${1.2*e}, 100%, ${e<75?50:Math.abs(e-100)/2+25}%)`,s={notice:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a="#784695",i="#CBCE91FF",s="#FFF2D7";let r=document.createElement("span");r.setAttribute("class","mono"),r.appendChild(Object.assign(document.createElement("span"),{style:`color:${a}`,innerHTML:"<<"})),r.appendChild(Object.assign(document.createElement("span"),{style:`color:${i}`,innerHTML:"insight"})),r.appendChild(Object.assign(document.createElement("span"),{style:`color:${a}`,innerHTML:">> "})),t?r.insertAdjacentHTML("beforeend",e):r.appendChild(Object.assign(document.createElement("span"),{style:`color:${s}`,innerHTML:e})),nexusclient.add_html_line(r.outerHTML)},affUpdate:(e,t)=>{const a=document.createElement("span");let s;a.setAttribute("class","mono"),s=t?generateChunk("+aff ","lime"):generateChunk("-aff ","red"),a.appendChild(s);const r=generateChunk(capitalize(e),i[e].fg||"",i[e].bg||"");return a.appendChild(r),a.outerHTML},defUpdate:(e,t)=>{const a=document.createElement("span");let i;a.setAttribute("class","mono"),i=t?generateChunk("+def ","lime"):generateChunk("-def ","red"),a.appendChild(i);const s=generateChunk(capitalize(e));return a.appendChild(s),a.outerHTML},currentAffDisplayHTML:()=>{let e=document.createElement("span");if(e.setAttribute("class","mono"),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"["})),insight.currentAffs().length>1)for(let t=0;t<insight.currentAffs().length-1;t++){const a=insight.currentAffs()[t];e.appendChild(Object.assign(document.createElement("span"),{style:`color:${i[a].fg||""};background:${i[a].bg||""}`,innerHTML:insight.reporting.shortNames?`${i[a].shortName}`:`${capitalize(a)}`})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:insight.currentAffs().length>1?`: ${insight.target.affs[a].probability}, `:`: ${insight.target.affs[a].probability}`}))}const t=insight.currentAffs().at(-1);return e.appendChild(Object.assign(document.createElement("span"),{style:`color:${i[t].fg||""};background:${i[t].bg||""}`,innerHTML:insight.reporting.shortNames?`${i[t].shortName}`:`${t}`})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:`: ${insight.target.affs[t].probability}`})),insight.currentAffs().forEach((e=>{})),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"]"})),e.outerHTML},currentStatsDisplayHTML:()=>{const e={...insight.target.stats};let t=document.createElement("span");t.setAttribute("class","mono");const a=generateChunk(`${e.hp.get()}(${100*e.hpPercent.get()}%)`,colorGradation(100*e.hpPercent.get()));t.appendChild(a);const i=generateChunk(", ");t.appendChild(i);const s=generateChunk(`${e.mana.get()}(${100*e.manaPercent.get()}%)`,colorGradation(100*e.manaPercent.get()));return t.appendChild(s),t.outerHTML},cureColors:a,affAbbrev:i};class Timer{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._id=e,this._enabled=!1,this._startTime=0,this._endTime=0,this._timerId=0,this._defaultLength=t,this.setLength(t),this._callbacks=[]}get length(){return this._length}get id(){return this._id}get enabled(){return this._enabled}setLength(e){if(e<0)throw new Error("Timer length cannot be negative");this._length=e}reset(){clearTimeout(this._timerId),this._enabled=!1,this.setLength(this._defaultLength),this._endTime=performance.now()/1e3,eventStream.raiseEvent(`timerReset${this._id}`)}start(){clearTimeout(this._timerId),this._startTimer(),eventStream.raiseEvent(`timerStarted${this._id}`)}_startTimer(){this._timerId=setTimeout(this.stop.bind(this),1e3*this._length),this._enabled=!0,this._startTime=performance.now()/1e3}stop(){this._enabled&&(clearTimeout(this._timerId),this._endTime=performance.now()/1e3,this._enabled=!1,eventStream.raiseEvent(`timerStopped${this._id}`),this._callbacks.forEach((e=>e())))}duration(){return this._enabled?this.elapsed():this._endTime-this._startTime}elapsed(){return this._enabled?performance.now()/1e3-this._startTime:0}remaining(){return this._enabled?this._length-this.elapsed():this._length}addCallback(e){if("function"!=typeof e)throw new Error("Callback must be a function");this._callbacks.push(e)}clearCallbacks(){this._callbacks=[]}static createTimer(e){return new Timer(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}}const r=Timer.createTimer,createAff=(e,a)=>{const i=[];Object.keys(t).forEach((a=>{t[a].order?.indexOf(e)>-1&&i.push(a)}));const s={id:e,player:a,probability:0,cures:i,have:!1,got(){this.have||(eventStream.raiseEvent("insightGotAff",this),eventStream.raiseEvent(`insightGotAff${e}`,this)),this.have=!0,this.probability=1,this.timer?.start()},lost(){this.have&&(eventStream.raiseEvent("insightLostAff",this),eventStream.raiseEvent(`insightLostAff${e}`,this)),this.reset()},reset(){this.have=!1,this.probability=0,this.timer?.stop()}};return Object.keys(n).indexOf(e)>-1&&(s.timer=r(`insightTimer${e}`,n[e].length),s.timer.addCallback((()=>{globalThis.insight.removeAff({id:s.id,player:s.player})}))),s},n={test:{length:10},aeon:{length:16},airfisted:{length:16},blackout:{length:10},blistered:{length:20},bruisedribs:{length:30},cadmuscurse:{length:20},cleanseaura:{length:5},condemned:{length:20},constricted:{length:30},corruption:{length:45},dazzled:{length:60},dehydrated:{length:60},demonstain:{length:120},empoweredloshre:{length:12},empoweredmannaz:{length:20},enmesh:{length:5},ensorcelled:{length:20},flamefisted:{length:30},hamstrung:{length:9},heartseed:{length:11},hecatecurse:{length:16},icefisted:{length:30},internalbleeding:{length:30},inquisition:{length:30},kaisurge:{length:15},lightbind:{length:22},mindravaged:{length:20},mudded:{length:12},numbedleftarm:{length:7.5},numbedrightarm:{length:7.5},petrified:{length:10},palpatarfeed:{length:20},phlogisticated:{length:45},pinshot:{length:18},revealed:{length:60},scalded:{length:20},scrambledbrains:{length:60},silenced:{length:20},silver:{length:180},slimeobscure:{length:60},solarburn:{length:5},stun:{length:3},timeflux:{length:60},trueblind:{length:6},unconsciousness:{length:10},vinewreathed:{length:30},vitrified:{length:45},voidfisted:{length:5},waterbonds:{length:30},weakenedmind:{length:60}},o=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","cleanseaura","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],l={};o.forEach((e=>{l[e]=createAff(e)}));const generateAffs=e=>{const t={};return o.forEach((a=>{t[a]=createAff(a,e)})),t},createBal=e=>{let{id:t,duration:a}=e;const i={id:t,have:!0,timer:r(`insightTimer${t}`,a),got(){this.have=!0,eventStream.raiseEvent("insightGotBal",this),eventStream.raiseEvent(`insightGot${t}`,this),this.timer.stop()},lost(){this.have=!1,eventStream.raiseEvent("insightLostBal",this),eventStream.raiseEvent(`insightLost${t}`,this),this.timer?.start()},reset(){this.have=!0,this.timer.stop()}};return i.timer.addCallback(i.reset.bind(i)),i},d={},m=[{id:"balance",duration:1.8},{id:"equilibrium",duration:1.8},{id:"herb",duration:1.3},{id:"smoke",duration:1.3},{id:"salve",duration:.8},{id:"restoration",duration:3.8},{id:"focus",duration:2.3},{id:"tree",duration:14.8},{id:"shrugging",duration:9.8},{id:"fool",duration:9.8},{id:"sun",duration:19.8},{id:"accelerate",duration:9.8}];m.forEach((e=>d[e.id]=createBal(e)));const generateBals=()=>{const e={};m.forEach((t=>e[t.id]=createBal(t)));return e.restoration.timer.addCallback((()=>{insight.players[insight.restorationCure.player].timeline.cure(insight.restorationCure.id)})),e},createDef=e=>{let{id:t,value:a,player:i,duration:s}=e;return{id:t,have:a,player:i,defaultValue:a,got(){this.have||(eventStream.raiseEvent("insightGotDef",this),eventStream.raiseEvent(`insightGot${t}`,this)),this.have=!0},lost(){this.have&&(eventStream.raiseEvent("insightLostDef",this),eventStream.raiseEvent(`insightLost${t}`,this)),this.have=!1},reset(){this.have=this.defaultValue}}},h={insomnia:!0,insulation:!0,kola:!0,speed:!0,shield:!1,rebounding:!0,prismatic:!1,cloak:!0,fangbarrier:!0,curseward:!1,selfishness:!0},generateDefs=e=>{const t={};for(const a in h)Object.hasOwnProperty.call(h,a)&&(t[a]=createDef({id:a,value:h[a],player:e}));return t},createStat=e=>{let{id:t,value:a}=e;const i={id:t,value:a,defaultValue:a,set(e){this.value=e,eventStream.raiseEvent("insightSetStat",this),eventStream.raiseEvent(`insightSet${t}`,this)},get(){return this.value},reset(){this.value=this.defaultValue}};return i},g={hp:8e3,mana:8e3,hpMax:8e3,manaMax:8e3,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},generateStats=()=>{const e={};for(const t in g)Object.hasOwnProperty.call(g,t)&&(e[t]=createStat({id:t,value:g[t]}));return e},c={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"],justice:["paralysis","sensitivity","healthleech","haemophilia","weariness","asthma","clumsiness"]},createTimeline=e=>{let{affs:a}=e;const i={affs:a,present:[{probability:1,affs:[]}],currentAffs:[],history:[],logging:!1,reset(){this.present=[{probability:1,affs:[]}],this.currentAffs=[],this.history=[];for(const e in this.affs)if(Object.hasOwnProperty.call(this.affs,e)){this.affs[e].reset()}},add(e){this.logging&&console.log(`add(${e})`);for(const t of this.present)t.affs.includes(e)||t.affs.push(e);this.affs[e].got(),this.history.push(e),this.updateAffs(),this.logging&&(console.log("add "+e),console.log(JSON.stringify(this.present)))},remove(e){this.logging&&console.log(`remove(${e})`),this.affs[e].lost(),this.present.forEach((t=>{let a=t.affs.indexOf(e);a>-1&&t.affs.splice(a,1)})),this.pruneDuplicates(),this.updateAffs()},random(e){this.logging&&console.log(`random(${a})`);const t=[];e.forEach((e=>{for(const a of this.present){const i={probability:a.probability,affs:[...a.affs]};i.affs.includes(e)||(this.affs[e].have=!0,i.affs.push(e)),t.push(i)}})),this.present=t.length>0?t:[{probability:1,affs:[]}],this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`add ${a}`),console.log(JSON.stringify(this.present)))},smart(e){this.logging&&console.log(`smart(${e})`);const t=[];e.forEach((e=>{for(const a of this.present)a.affs.includes(e)||(this.affs[e].have=!0,t.push({probability:a.probability,affs:[...a.affs,e]}))})),this.present.forEach((a=>{e.every((e=>a.affs.includes(e)))&&t.push(a)})),t.length>0&&(this.present=t),this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`smart ${e}`),console.log(JSON.stringify(this.present)))},ordered(e){this.logging&&console.log(`ordered(${e})`);const t=[];for(const a of this.present)for(const i of e)if(!a.affs.includes(i)){this.affs[i].have=!0,t.push({probability:a.probability,affs:[...a.affs,i]});break}this.present.forEach((a=>{e.every((e=>a.affs.includes(e)))&&t.push({...a})})),t.length>0&&(this.present=t),this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`add ${e}`),console.log(JSON.stringify(this.present)))},cure(e){if(this.logging&&console.log(`cure(${e})`),t[e].bals_used.includes("salve")&&this.salveCure(e))return void console.log("salveCure() true return");const a=t[e].order,i=[];let s=!1;this.present.forEach((e=>{const t=e.affs.filter((e=>a.includes(e)));if(this.logging&&console.log("curableCount",t),0!==t.length){s=!0;for(const s of e.affs)if(a.includes(s)){let a=e.affs.filter((e=>e!==s));a.length>0&&i.push({probability:e.probability/t.length,affs:a})}}})),s&&(this.present=i.length>0?i:[{probability:1,affs:[]}]),this.pruneDuplicates(),this.updateAffs(),this.history.push(e),this.logging&&(console.log(`cure ${e}`),console.log(JSON.stringify(this.present)))},salveCure(e){this.logging&&console.log(`salveCure(${e})`);const a=t[e].order;for(const e of a)if(1===this.affs[e].probability)return this.remove(e),!0;return!1},confirm(e,t){this.logging&&console.log(`confirm(${e}, ${t})`);const{probability:a}=this.affs[e];if(t&&1===a||!t&&0===a)return;if(t&&0===a)return void this.add(e);if(!t&&1===a)return void this.remove(e);let i=[];this.present.forEach((a=>{a.affs.includes(e)===t&&i.push(a)})),this.present=i,this.history.push(`${e}:${t}`),this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`confirm ${e} ${t}`),console.log(JSON.stringify(this.present)))},confirmMultiple(e,t){let a=[];this.present.forEach((i=>{e.every((e=>i.affs.includes(e)))===t&&a.push(i)})),this.present=a,this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`confirmMultiple ${e} ${t}`),console.log(JSON.stringify(this.present)))},convert(e,t){let a=[];this.affs[e].have&&(this.affs[t].got(),this.present.forEach((i=>{if(i.affs.includes(e)){const s=i.affs.indexOf(e);i.affs[s]=t,a.push(i)}else a.push(i)})),this.present=a,this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`convert ${e} to ${t}`),console.log(JSON.stringify(this.present))))},readAuraConfirm(e){let{p:t,m:a}=e,i=[...this.present];if(i=i.filter((e=>{const i=e.affs.filter((e=>c.physicals.includes(e))),s=e.affs.filter((e=>c.mentals.includes(e)));return i.length<=t&&s.length<=a})),i.length<t+a)return console.error(`Insight Error: No present branch for physical ${t}, mental ${a}`),!1;this.present=[...i],this.pruneDuplicates(),this.updateAffs(),this.logging&&(console.log(`readAuraConfirm p:${t} m:${a}`),console.log(JSON.stringify(this.present)))},calculateMentalCount(){let e=0;for(const t of this.present)for(const a of t.affs)e+=c.mentals.includes(a)?1:0;return e/this.present.length},affProbability(e){let t=0;return this.present.forEach((a=>{a.affs.includes(e)&&(t+=a.probability)})),parseFloat(t.toFixed(2))},pruneDuplicates(e){if(1===this.present.length)return void(this.present[0].probability=1);const t=new Map;for(const e of this.present){const{probability:a,affs:i}=e,s=i.sort().join(",");t.has(s)?t.set(s,t.get(s)+a):t.set(s,a)}const a=Array.from(t.entries()).map((e=>{let[t,a]=e;return{probability:a,affs:t.split(",")}})),i=a.reduce(((e,t)=>e+t.probability),0);return a.forEach((e=>e.probability=e.probability/i)),this.present=a,a},updateAffs(){this.logging&&console.log("updateAffs()");const e=new Set(this.present.flatMap((e=>e.affs))),t=this.currentAffs.filter((t=>!e.has(t)));t.length>0&&t.forEach((e=>this.affs[e].lost())),this.currentAffs=[...e],this.currentAffs.forEach((e=>{this.affs[e].probability=this.affProbability(e)})),eventStream.raiseEvent("insightUpdateAffs")}};return i},createLimb=e=>{let{id:t,player:a}=e;const i={id:t,player:a,percent:0,timer:r(`insightTimer${t}`,180),hit(e){this.percent=this.percent+e,this.percent>=100?this.break():this.timer.start(),eventStream.raiseEvent("insightLimbHit",this),eventStream.raiseEvent(`insightLimbHit${this.id}`,this)},break(){this.percent=0,eventStream.raiseEvent("insightLimbBreak",this),eventStream.raiseEvent(`insightLimbBreak${this.id}`,this),this.timer.stop()},reset(){this.percent=0,this.timer.stop(),eventStream.raiseEvent("insightLimbReset",this),eventStream.raiseEvent(`insightLimbReset${this.id}`,this)},set(e){this.percent=e,this.percent>=100?this.break():this.timer.start()}};return i.timer.addCallback(i.reset.bind(i)),i},p=["head","torso","leftleg","leftarm","rightleg","rightarm"],generateLimbs=e=>{const t={};return p.forEach((a=>t[a]=createLimb({id:a,player:e}))),t},playerCheck=e=>{if(parseInt(e))return void console.error("Insight playerCheck() id must be a string",e);if(void 0===e)return insight.target;const t=e.toLowerCase();return void 0===insight.players[t]&&(insight.players[t]=(e=>{const t={id:e.toLowerCase(),affs:generateAffs(e),defs:generateDefs(e),stats:generateStats(),bals:generateBals(),limbs:generateLimbs(e)};return t.timeline=createTimeline(t),t})(t)),insight.players[t]},hasAff=e=>{let{id:t,player:a,probability:i=0}=e;i>1&&(i/=100);const s=playerCheck(a).affs[t];return!!(s.have&&s.probability>=i)&&s.probability},hasAffs=e=>{let{ids:t,probability:a=0,player:i}=e;a>1&&(a/=100);const s=playerCheck(i);let r=!1;return Array.isArray(t)&&(r=t.every((e=>s.timeline.currentAffs.indexOf(e)>-1&&s.affs[e].probability>=a))),r},cureBlockersConfirm=(e,a)=>{const i=t[e].blocks;void 0!==i&&i.forEach((e=>{Array.isArray(e)?hasAffs({ids:e})&&e.forEach((e=>person.timeline.confirm(e,!1))):hasAff({id:e})&&a.timeline.confirm(e,!1)}))};__webpack_require__(95),__webpack_require__(389),__webpack_require__(473);const u={version:"0.2.5",reset:e=>{const t=e&&void 0!==insight.players[e]?insight.players[e]:insight.target;t.timeline.reset();for(const e in t.stats)t.stats[e].reset();for(const e in t.defs)t.defs[e].reset();for(const e in t.bals)t.bals[e].reset();for(const e in t.limbs)t.limbs[e].reset();insight.reporting.notices&&s.notice("Reset")},setTarget:e=>{insight.target=playerCheck(e)??insight.target},addAff:e=>{let{id:t,player:a}=e;playerCheck(a).timeline.add(t)},getAff:e=>{let{id:t,player:a}=e;if(void 0!==t)return playerCheck(a).affs[t]},removeAff:e=>{let{id:t,player:a}=e;const i=playerCheck(a);i.affs[t].have&&i.timeline.remove(t)},usedCure:e=>{let{id:a,player:i}=e;if(void 0===a)return;const s=playerCheck(i),r=t[a].bals_req.find((e=>s.bals[e]&&!s.bals[e].have));r?console.error("insight usedCure() off balance",a,s.bals[r]):(cureBlockersConfirm(a,s),a.includes("restoration")?insight.restorationCure={id:a,player:s.id}:s.timeline.cure(a),t[a].bals_used.forEach((e=>{"free"!==e&&s.bals[e].lost()})),eventStream.raiseEvent("insightUsedCure",a),eventStream.raiseEvent(`insightUsedCure${a}`))},confirmAff:e=>{let{id:t,state:a=!0,player:i}=e;playerCheck(i).timeline.confirm(t,a)},confirmAffs:e=>{let{ids:t,state:a,player:i}=e;void 0!==t&&Array.isArray(t)&&playerCheck(i).timeline.confirmMultiple(t,a)},randomAffs:e=>{let{ids:t,player:a}=e;void 0!==t&&playerCheck(a).timeline.random(t)},readAuraConfirm:e=>{let{p:t,m:a,player:i}=e;playerCheck(i).timeline.readAuraConfirm({p:t,m:a})},smartAffs:e=>{let{ids:t,player:a,ordered:i=!1}=e;if(void 0===t)return;const s=playerCheck(a);i?s.timeline.ordered(t):s.timeline.smart(t)},convertAff:e=>{let{id:t,to:a,player:i}=e;void 0!==t&&void 0!==a&&playerCheck(i).timeline.convert(t,a)},addDef:e=>{let{id:t,player:a}=e;playerCheck(a).defs[t].got()},removeDef:e=>{let{id:t,player:a}=e;playerCheck(a).defs[t].lost()},hasAff,hasAffs,hasAnAff:e=>{let{ids:t,player:a,probability:i=0}=e;i>1&&(i/=100);const s=playerCheck(a);let r=!1;return Array.isArray(t)&&(r=s.timeline.currentAffs.some((e=>t.indexOf(e)>-1&&s.affs[e].probability>=i))),r},hasDef:e=>{let{id:t,player:a}=e;return playerCheck(a).defs[t].have},hasBal:e=>{let{id:t,player:a}=e;return playerCheck(a).bals[t].have},lostBal:e=>{let{id:t,player:a}=e;playerCheck(a).bals[t].lost()},balRemaining:e=>{let{id:t,player:a}=e;return playerCheck(a).bals[t].timer.remaining()},setStat:e=>{let{id:t,value:a,player:i}=e;const s=playerCheck(i);s.stats[t].get()!==a&&s.stats[t].set(a)},getStat:e=>{let{id:t,player:a}=e;return playerCheck(a).stats[t].get()},adjustStat:e=>{let{id:t,value:a,player:i}=e;const s=playerCheck(i);let r,n;a<=1&&a>-1?(r=s.stats[`${t}Percent`].get()+a,n=s.stats[`${t}Max`].get()*r):(n=s.stats[t].get()+a,r=n/s.stats[`${t}Max`].get()),r>1||r<0||(s.stats[`${t}Percent`].set(r),s.stats[t].set(n))},getLimb:e=>{let{id:t,player:a}=e;return playerCheck(a).limbs[t].percent},hitLimb:e=>{let{id:t,player:a,value:i}=e;playerCheck(a).limbs[t].hit(i)},resetLimb:e=>{let{id:t,player:a}=e;return playerCheck(a).limbs[t].reset()},breakLimb:e=>{let{id:t,player:a}=e;return playerCheck(a).limbs[t].break()},currentAffs:()=>insight.target.timeline.currentAffs,display:s,nextLine:e=>{let t=!1;for(let a=nexusclient.current_line.index+1;a<nexusclient.current_block.length;a++){const i=nexusclient.current_block[a];if(i.html_text||i.is_prompt||void 0===i.line)continue;const s=i.parsed_line.text();return e instanceof RegExp?t=e.test(s):"string"==typeof e&&(t=s.includes(e)),t}},checkBlock:e=>{const t=nexusclient.current_block;let a=!1;return e instanceof RegExp?a=!!t.find((t=>void 0!==t.line&&e.test(t.line))):"string"==typeof e&&(a=!!t.find((t=>void 0!==t.line&&t.line.includes(e)))),a},venomToAff:{xentio:"",eurypteria:"",kalmia:"asthma",digitalis:"shyness",darkshade:"darkshade",curare:"paralysis",epteth:"",prefarar:"sensitivity",monkshood:"disloyalty",euphorbia:"nausea",oculus:"unblind",vernalius:"weariness",epseth:"",larkspur:"dizziness",slike:"anorexia",delphinium:"sleep",notechis:"haemophilia",vardrax:"addiction",loki:"loki",aconite:"stupidity",selarnia:"",gecko:"slickness",scytherus:"scytherus",nechamadra:"shivering"},target:{},players:{},state:{lastQueue:!1,queues:{},serverAliases:{}},reporting:{notices:!1,shortNames:!1,colors:!0},occultist:c,debug:()=>{console.log(target.id)},currentAffDisplay:()=>{let e=[];return insight.target.timeline.currentAffs.forEach((t=>e.push(`${t}: ${insight.target.affs[t].probability}`))),e}};globalThis.insight=u,globalThis.insight.setTarget("pamxen"),globalThis.insight.reset(),"undefined"!=typeof nexusclient&&((()=>{eventStream.registerEvent("insightLostAff",(e=>{insight.reporting.notices&&insight.target.id===e.player&&s.notice(s.affUpdate(e.id,!1))})),eventStream.registerEvent("insightGotAff",(e=>{insight.reporting.notices&&insight.target.id===e.player&&s.notice(s.affUpdate(e.id,!0))})),eventStream.registerEvent("insightLostDef",(e=>{insight.reporting.notices&&insight.target.id===e.player&&s.notice(s.defUpdate(e.id,!1))})),eventStream.registerEvent("insightGotDef",(e=>{insight.reporting.notices&&insight.target.id===e.player&&s.notice(s.defUpdate(e.id,!0))})),eventStream.registerEvent("IRE.Target.Set",(e=>{"number"!=typeof e&&insight.setTarget(e)})),eventStream.registerEvent("PromptEvent",(()=>{insight.currentAffs().length>0&&nexusclient.add_html_line(s.currentAffDisplayHTML())})),eventStream.registerEvent("nexSkillMatch",(e=>{"secondPerson"!==e.match&&eventStream.raiseEvent(`insight.${e.skill}.${e.id}`,e)})),eventStream.registerEvent("insightLimbBreak",(e=>{switch(e.id){case"leftleg":case"rightleg":case"rightarm":case"leftarm":case"head":insight.hasAff({id:`damaged${e.id}`,player:e.player})?insight.convertAff({id:`damaged${e.id}`,to:`mangled${e.id}`,player:e.player}):insight.hasAff({id:`mangled${e.id}`,player:e.player})||((e.id.includes("leg")||e.id.includes("arm"))&&insight.removeAff({id:`broken${e.id}`,player:e.player}),insight.addAff({id:`damaged${e.id}`,player:e.player}));break;case"torso":insight.hasAff({id:"mildtrauma",player:e.player})?insight.convertAff({id:"mildtrauma",to:"serioustrauma",player:e.player}):insight.addAff({id:"mildtrauma",player:e.player});default:console.error("insight event limbBreak no case found",e)}}));const limbCures=e=>{const t={brokenleftleg:"mangledleftleg",brokenleftarm:"mangledleftarm",brokenrightleg:"mangledrightleg",brokenrightarm:"mangledrightarm"};console.log(e);const a={mangledleftleg:"damagedleftleg",mangledleftarm:"damagedleftarm",mangledrightleg:"damagedrightleg",mangledrightarm:"damagedrightarm",mangledhead:"damagedhead",serioustrauma:"mildtrauma",damagedleftleg:"brokenleftleg",damagedleftarm:"brokenleftarm",damagedrightleg:"brokenrightleg",damagedrightarm:"brokenrightarm"}[e.id];void 0!==t[a]&&insight.hasAff({id:t[a],player:e.player})||insight.addAff({id:a,player:e.player})};eventStream.registerEvent("insightLostAffmangledleftleg",limbCures),eventStream.registerEvent("insightLostAffmangledleftarm",limbCures),eventStream.registerEvent("insightLostAffmangledrightleg",limbCures),eventStream.registerEvent("insightLostAffmangledrightarm",limbCures),eventStream.registerEvent("insightLostAffmangledhead",limbCures),eventStream.registerEvent("insightLostAffserioustrauma",limbCures),eventStream.registerEvent("insightLostAffdamagedleftleg",limbCures),eventStream.registerEvent("insightLostAffdamagedleftarm",limbCures),eventStream.registerEvent("insightLostAffdamagedrightleg",limbCures),eventStream.registerEvent("insightLostAffdamagedrightarm",limbCures)})(),u.reporting.notices=!0,"Khaseem"!==nexusclient.datahandler().GMCP.Character.name&&fetch("https://unpkg.com/nexsight/insight3.nxs",{cache:"no-store"}).then((e=>e.json())).then((e=>{nexusclient.packages().get("insight3").apply(e,nexusclient.reflexes())})))})()})(); |
{ | ||
"name": "nexsight", | ||
"version": "0.2.5", | ||
"version": "0.2.7", | ||
"description": "insight for nexus", | ||
@@ -5,0 +5,0 @@ "main": "insight.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
114876
9
7